In this article, we're going to show you how to install Ghost CMS for a lightweight and sleek blogging experience.
Prerequisites for Installation
We'll begin with an update.
apt update && apt upgrade -y
Next, we'll create a user for Ghost to use. Our new user cannot be named ghost due to conflicts, so please pick something different.
adduser blogmanager usermod -aG sudo blogmanager
Now we will switch to our new user.
su - blogmanager
Installing our packages
We're going to install the packages that we will use to install and run Ghost CMS. These include CURL, NGINX, MySQL, Node.js, NVM,
sudo apt install curl nginx mariadb-server npm
curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh -o install_nvm.sh
nvm install 12
sudo mariadb use mysql; update user set authentication_string=password(''), plugin='mysql_native_password' where user='root'; exit; sudo mysql_secure_installation
sudo npm install ghost-cli@latest -g
# We are going to name directory 'blogaway' in this example; you may use whatever name you'd like sudo mkdir -p /var/www/blogaway # Replace blogmanager with the name of your user we created earlier sudo chown blogmanager:blogmanager /var/www/blogaway # Set the correct permissions sudo chmod 775 /var/www/blogaway # Then navigate into it cd /var/www/blogaway # Run the installer ghost install
Follow the prompts and fill in the questions with your site's information.
Now we'll visit our site URL that was defined during the Ghost setup.
Success! You have installed Ghost CMS and can now begin editing your site.
For more information, check out the official Ghost documentation over at: https://ghost.org/docs/