Today I will be showing you how you can install the Ghost CMS on a fresh Ubuntu 20.04 installation. Let's get straight into it.
- Connect to your server with Ubuntu 20.04 (fresh installation)
- add your user (the one that will be used to install and control Ghost) to sudoers
sudo usermode -aG sudo <your_user_name> su - <your_user_name>
- Update system
sudo apt update && sudo apt upgrade -y
- Install NGINX and curl
sudo apt install nginx curl -y
- Install MySQL or mariadb
sudo apt install mysql-server -y
sudo apt install mariadb-server -y
Preform all relevant configurations on MySQL, including creating your user (if you are not using the root user).
If you decided to use MySQL, you will need to amend the password type for the user that will be used by Ghost, below is an example how do to so with the root user:
sudo mysql ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; quit
- Now we will need to install Node.JS
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash sudo apt-get install -y nodejs
- Let get the Ghost-CLI
sudo npm install [email protected] -g
So, we have all the packages that where required for Ghost. To install the Ghost CMS you just need a place for it now.
Create a folder in a location that you want to store the Ghost CMS files, example:
sudo mkdir -p /var/www/sitename sudo chown <your_user_name>:<your_user_name> /var/www/sitename sudo chmod 775 /var/www/sitename cd /var/www/sitename
- Now (in the created folder) just RUN the installation process for Ghost CMS