Getting Ghost on Joyent SmartOS

This is a quick post about getting Ghost onto a Joyent cloud instance, with the intention of using dtrace on SmartOS to inspect & optimise Ghost's memory utilisation.

Sign up for an account on Joyent, set up your key, and then hit create instance. It'll ask you to choose an image, I went for the first one:

And all you need is the smallest package:

Give your instance a name, hit 'Create Instance' and wait for it to start. Once it's up and running ssh into the box and run the following commands...

Install unzip, gcc47 and gmake packages:

pkgin install unzip gcc47 gmake

Download the latest Ghost package:

wget --no-check-certificate

Unzip Ghost into a directory called ghost:

unzip -d ghost

Change into your new directory

cd ghost

Install all of Ghost's dependencies:

npm install --production

Create a config file from the example:

cp config.example.js config.js

Open the config file for editing:

vim config.js

Change the IP address and port for development to and 80 respectively. Save, and exit vim.

Finally start up ghost by typing

npm start

And then visit your public IP in a browser to see Ghost running.

Navigate to http://your-ip/ghost/ to create an account and start writing posts.