This site uses affiliate links as a means of monetization.
I happen to use Servint and today, I'm going to show you how to to set up Ghost on it in a few short, simple steps.
Servint offers the perfect environment to install Ghost (the new blogging platform) on.
I'm going to walk you through the process quickly and easily with a number of straightforward steps. Let's get started.
First, log into your WHM as root and navigate to Service Configuration >> Apache Configuration >> Reserved IPs Editor. From here, choose an IP address you wish to reserve for Ghost and click the checkmark in the Reserved box. This will release the IP address from Apache when you click save.
Once this is complete, you'll need to assign the IP address to the domain you wish to use. If you haven't set up your domain within WHM as of yet, you'll need to Create a New Account for the domain. You can do so at Account Functions » Create a New Account.
Once the account is created, it's time to assign the IP address you reserved to the domain you wish to use. To get started, go to Account Information » List Accounts. Find the domain in question and click on the + sign beside it. This will give you a number of buttons and options. Click on Change IP Address. You will be presented with a dropdown box of IP addresses, find the one that you reserved and select it. Click save. It may take upwards of 24 hours for the changes to propogate globally so if you cannot access the domain on that newly assigned IP address quite yet, don't worry, it will work soon. In the interim, you can access your ghost install via your IP address when we are done.
The next step will be to FTP into your account using the domain (or IP address you just assigned) and the credentials you specified when you created the new account in step 2. You'll want to have downloaded the Ghost source code from http://ghost.org and extracted the file. Now, connect using an FTP client and upload the contents of this folder into your www directory. Do not upload the ghost folder itself, just the contents (ie: folders and files within the zip).
Now it's time to SSH into your server and get things set up. If you do not have root access via SSH to your server, you can submit a request to ServInt via the support portal and they will activate it for you straight away. Do be careful, however, as root access to your server enabled can be dangerous if you do not have a strong password. In the hands of the wrong person, they can wipe all of your stuff and cause some serious damage. Once you have root access, ssh into your box using a program such as Putty or something similar.
Now, we're going to install node and npm. Thankfully, ServInt uses CentOS and already has the right repository set up so that makes it easy. Run the command
yum install npm --enablerepo=epel. This will begin the installation process. When complete, run
node -vand you should get back version numbers for each. If you do, you are ready for the next step.
From within your www (or public html) folder, run the command
npm install --production. This will install Ghost and get it ready for your site.
Now, the first time you run Ghost it will copy the config.example.js file to config.js. Personally, I did this myself and then made the necessary modifications, so go ahead and run the command
cp config.example.js config.js. Now you'll need to edit this file, so run
With the file open in the editor, change all instances of
http://my-ghost-blog.comto your own domain. You will find it listed twice, once under Development and once under Production. Now change all instances of
127.0.0.1to your IP address (the one you assigned to your domain) and all instances of
80. Now hit
Now, in my instance, I didn't want to have to keep a ssh session open to run Ghost so I decided to do so using forever. Forever is an app that will monitor your node.js (Ghost) session and keep it running. If it stops for some reason it will restart it for you automatically. To install forever run these commands:
npm -g install forever.
Once installed, you can start your new Ghost installation. The first time you start it, set the environment to production using this command:
NODE_ENV=production forever start index.js. Once you've started it, you can leave the shell and access your new Ghost installation on either your domain or the IP address followed by /ghost in your browser. The first time you access Ghost, you'll need to set up a user. Once done, you'll be up and running. To stop your installation in the future, SSH into your server and run
forever stop index.jsfrom within the www directory for your account (ie: /home/domain/www/).
If you are interested in trying out these steps, grab an inexpensive VPS or hosting solution from ServInt.
That's it. Best of luck, hope it helps and if you get stuck or have questions, let me know in the comments below.