Ghost is a modern Node.js based CMS. Its core benefit is to create publications and send newsletters to readers.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Linux system Node js queries.
In this context, we shall look into how to install Ghost on Ubuntu 20.04 LTS.
Before performing this Installation procedure, ensure that the prerequisite are met. Therefore, we need to ensure that the latest LTS version of Node, Nginx, and MySQL are installed and running on your system. To do this, simply run the below commands:
$ node --version
$ npm --version
$ nginx --version
$ mysql --version
If they are not installed then use the following commands to install them:
$ sudo apt update
$ sudo apt install node
$ sudo apt install npm
$ sudo apt install nginx
$ sudo apt install mysql
To install MySQL, you will need a username and password during the process. MySQL, during the installation process, will ask you to enter a database username and password itself.
Next follow the below steps to install Ghost.
Run the following npm command to install Ghost CLI. Ghost CLI is the core component to manage a Ghost instance, and it can only be installed globally. It doesn't work if you try to install it into a specific directory. However, in this guide, you will see how to create a new directory in the next step:
$ sudo npm install ghost-cli@latest -g
Upon executing the above command, Ghost will be successfully installed on the system.
Create a new directory using mkdir command, name it, and change the directory path. It will be ghostCMS in our case:
$ mkdir ghostCMS
$ cd ghostCMS/
Now run the install command as follows to install Ghost Instance:
$ ghost install
Ghost CLI will ask you some questions like setting up your publication's name, URL, and related details.
Answer them as per your desire, and you will be all good.
Once done you will be able to set up your new website admin in the browser as follows:
This will take you to Ghost Dashboard where you would be able to create an account and perform other tasks via the dashboard.
To remove Ghost CMS you would need to issue the following command:
$ sudo npm remove ghost
This command will remove all Ghost CMS's related packages from the system.
This article covers the installation procedure of Ghost CMS on Ubuntu 20.04 LTS. In fact, Ghost is a lightweight, open-source Content Management System (CMS) and blogging platform built with Node.js. It is easy to install and update with Ghost-CLI.
How to Troubleshoot Ghost CMS ?
1. Troubleshoot the system for any potential issues when installing or updating Ghost:
$ ghost doctor
2. Get help about Ghost:
$ ghost --help