Ghost Installation Tutorial

In this tutorial, we look at the various means to install the Ghost CMS. The options are to install via Softaculous/QuickInstall, Installing via the auto-install script or manually install Ghost.

Further reading:

Basic Features of the Ghost CMS

How to migrate your website from WordPress to Ghost

 

How to install Ghost via Softaculous

 

In this tutorial we will show you how to install install Ghost via the Softaculous auto-installer. Softaculous is an easy to use cPanel addon which allows you to install more than 150 scripts with just a few clicks.

To install Ghost via Softaculous, you will need to:

Step 1: Locate Ghost in Softaculous
Step 2: Configure and Complete the Installation

Further reading:

Basic Features of the Ghost CMS

How to migrate your website from WordPress to Ghost

 

Locate Ghost in Softaculous

 

To access Softaculous please login your hosting account cPanel and scroll to the Software/Service section.

From the Softaculous main page expand the Blog category on the left and click on the Ghost link.

Via the Ghost Softaculous page you may review features, ratings and Ghost Screenshots.

For this tutorial we will proceed with the installation process by clicking on the Install button from the navigation menu.

Further reading:

Basic Features of the Ghost CMS

How to migrate your website from WordPress to Ghost

 

Configure and Complete the Installation

 

On the Ghost installation page, please select the domain or subdomain for which you would like to install Ghost and set your Data Directory. The Data Directory can be any name of a folder under which your Ghost data will be stored. It is not directly related to the URL via which you will access your Ghost blogging platform. For the purpose of this tutorial we will simply use 'nodeblog'.

When you are ready with your settings, click the 'Install' button to complete the installation. When the installation process is over you will be displayed with all the needed information to access your Ghost blog and the Ghost administrative dashboard.

Be advised that Ghost uses Node which runs on a custom port. This means that your Ghost URL will include a port as a suffix to your URL. For example:

http://blog.example.com:62227

 

Further reading:

Basic Features of the Ghost CMS

How to migrate your website from WordPress to Ghost

 

How to install Ghost with auto-install script

 

We will now guide you through the installation process of Ghost using the CLI auto-installer script. The script is featured on the great website Ghost for Beginners. We are extremely grateful for the wonderful work done by Andy Boutte and David Balderston to make our life a little bit easier and bring this wonderful script to us so more people can easily install the Ghost blogging platform on their own.

In short, you can install Ghost on a clean Ubuntu or CentOS system by running the following command:

wget -O - https://raw.github.com/howtoinstallghost/installghost.sh/master/installGhost.sh | sudo bash

If the following error occurs:

-bash: wget: command not found

most probably you run a minimal OS install and you need to install wget first. This can be easily done on CentOS using the following command:

sudo yum -y install wget

 

When the installation process is over you can access your Ghost blog using your server IP address or domain name in case it is pointed to your server IP address by directly entering the address in your browser. Don't forget to Configure your Ghost blog URL after the installation process.

Let's explain what the auto installer does. The Ghost setup might be a little complicated for most users who are used to the standard installation process of most LAMP-based applications. For example, Ghost required Node.js installation and several reconfigurations to make sure it is fully accessible when you point your domain name.

This auto installer setup Node.js as well as Forever which is a nice way to make sure that your Ghost blog process will run constantly without interruption. Furthermore, the one-click installer downloads and reconfigures the Ghost installation package to make sure it is fully accessible on port 80 which is the default HTTP port. In case you have Apache, nGinx or other web service running you might need to stop them prior the setup. In case you would like to have both your web server and Ghost running but still access your Ghost on port 80, please check our tutorial on how to run Ghost with Apache and Nginx here.

Last but not least, the one-click auto installer creates a Ghost start script and adds it to your server crontab to make sure that the Ghost blog process is automatically started upon server reboot. This way you will not need to manually start your Ghost when your server is restarted

 

How to Manually install Ghost and Node.js

 

In this tutorial, we will follow the steps required to manually install Ghost. While the Ghost installation is a pretty straight forward process, you will still need to obtain and install Node.js first in order to start your Ghost blog platform.

In order to complete the steps below, please log in your server as root using SSH.

To install Ghost and Node.js on CentOS/Ubuntu, you need to complete the following steps:

Step 1: Update your OS
Step 2: Install Node.js
Step 3: Install Ghost
Step 4: Configure the Domain and Port


Update your OS


First, make sure that you have your OS updated and all required packages are installed. You can perform this following the instructions below depending on your server operation system.

Instructions for CentOS using yum:

yum -y update
yum -y groupinstall "Development Tools"

Instructions for Ubuntu using apt-get:

apt-get -y update
aptitude -y install build-essential zip

 

Install Node.js


When your OS is updated, please process with the Node.js installation:

cd /root/
wget http://nodejs.org/dist/node-latest.tar.gz
tar -xzf node-latest.tar.gz

Enter the node folder which you have just extracted from the archive and execute:

./configure
make -s
make install

When the installation is completed you should be able to see node on your server by executing:

[root@ghost ~]# whereis node
node: /usr/local/bin/node

step

Install Ghost


Now we can proceed with the Ghost installation. For this tutorial we will use /var/www directory but you can install Ghost in any folder suitable for your needs. Please execute the following commands:

mkdir -p /var/www
cd /var/www
curl -L -O https://ghost.org/zip/ghost-latest.zip
unzip -d ghost ghost-latest.zip
rm ghost.zip
cd ghost/
/usr/local/bin/npm install --production

 

Configure the Domain and Port


Now that we have Ghost downloaded and installed, we need to apply some final tweaks to configure our Ghost blog with the correct port and domain. There are two important settings to configure -- the IP address for which the Ghost process will listen for new connections and the port on which it will be accessible. As the standard HTTP port is 80 we will reconfigure the config.js to work for any IP on the server on port 80. This can be done using the following command:

sed -e 's/127.0.0.1/0.0.0.0/' -e 's/2368/80/' <config.example.js >config.js

The next step is to configure the domain name of your Ghost blog. This can be done using:

replace my-ghost-blog.com example.com -- config.js

Please make sure to change 'example.com' to your actual domain name.

 

Ghost with MySQL

 

Ghost uses sqlite3 by default. If you would like to have your Ghost blog configured with a MySQL database, please check our tutorial on How to configure Ghost with MySQL.

Now you are ready to start your Ghost blog. This can be done by simply executing:

node index.js
Ghost is running in development...
Listening on 0.0.0.0:80
Url configured as: http://my-ghost-blog.com


We highly recommend to consider installing Forever and create an init script for your Ghost.

 

About Ghost CMS

 

Ghost is a relatively new blogging platform developed with only one central idea in mind -- to provide a beautifully designed, easy-to-use and completely customizable platform for publishing. Ghost provides you with a minimalistic and intuitive interface to start your own blog and publish your content. It has been developed almost entirely by volunteers and the project is run by a small Non-Profit organization called the Ghost Foundation. Still, its development is public and a large number of developers from all over the world have already contributed to the project.

Ghost has been launched as a completely free platform after its original crowdfunding campaign without any legal restrictions. This means that as soon as you download your copy it is your own and you are free to use it, modify it, share or distribute.

Despite the fact that Ghost has not yet fully matured as a project and it is under constant development it provides a great way to publish your content and it is completely mobile-friendly.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Basic Features of the Ghost CMS

Todhost web hosting supports Ghost installation. You can easily setup your website with Ghost...

How to migrate your website from WordPress to Ghost

The Ghost project is led by John O'Nolan and Hannah Wolfe, both of whom have been involved with...

Ghost Configuration Tutorial

By default Ghost uses sqlite3 database. Still, if you would like to have your Ghost Blog...

Ghost Management Tutorial

How to use the Ghost Publishing Platform   In order to make it easier for users to deploy and...

Ghost Backup and Restore Tutorial

We shall in this tutorial cover the steps you need to take to bkkcup your Ghost website and also...

Powered by WHMCompleteSolution