How to Install the Ghost Blog Platform on CentOS Linux

In this post, we’ll be covering off how to install the Ghost blogging platform on CentOS Linux.

Ghost is minimalist, open-source blogging platform that was recently released. It is very simple to author content and is written in NodeJS.

We’ll also be installing Apache with a basic reverse proxy configuration to access Ghost on port 80, being served from

This tutorial requires extra RPM packages. Before continuing, please enable the EPEL repo first.

1. Installing the Prequisites

Install unzip, Apache, NodeJS and NPM:

yum install unzip httpd nodejs npm

2. Create a Ghost directory

In this example, we’ll create it in /var/www/nodejs/ghost:

mkdir -p /var/www/nodejs/ghost

3. Download and Extract Ghost

Change directory to your Ghost directory, and download the Ghost zip file:

cd /var/www/nodejs/ghost
wget --no-check-cert ''

4. Use NPM to download additional requirements for Ghost

npm install --production

5. Change Ghost URL and Start Ghost with NPM

Edit config.js and change the url: to your URL.

Now start Ghost with NPM. We’ll use nohup to put this process in the background, which will stay alive even after logging out (a better way to do this would be with an init script):

nohup npm start > /tmp/ghost.log &

Ghost should now be running from

6. Configure Simple Apache reverse proxy for Ghost

We’ll create a simple reverse proxy configuration to make Ghost accessible on port 80 via Apache.

a. Uncomment the following from /etc/httpd/conf/httpd.conf:

#NameVirtualHost *:80

b. Create a reverse proxy configuration for Ghost with the following contents (remember to change to your own virtualhost):

vim /etc/httpd/conf.d/ghost.conf


<VirtualHost *:80>


ProxyRequests Off
ProxyPreserveHost On

<Proxy *>
 AddDefaultCharset Off
 Order deny,allow
 Allow from all

ProxyPass /
ProxyPassReverse /


c. Start Apache:

/etc/init.d/httpd start

Go to the URL that you’ve configured and you should see Ghost (if you haven’t set up DNS, use your hosts file to test!).

For more information on Ghost, and how to use Ghost, please see the official site.

Scan to Donate Bitcoin to Curtis K
Did you like this?
Tip Curtis K with Bitcoin
Share This Post

About Author: Curtis K

Hi! My name is Curtis, and I am the author of CentOS Blog. Please feel free to comment with any suggestions, feedback or questions!