Couple of months back, I switched to FreeBSD and started everything fresh. I just prefer FreeBSD.

I didn’t want to run WordPress, I want something light and simple, like Jekyll. But I also want to be able to blog with my iPad or even my mobile phone. So, I ended up with Ghost, and I’m liking it.

Installing

Installing node and npm are pretty straightforward.

cd /usr/ports/www/node
sudo make install clean
cd /usr/ports/www/npm
sudo make install clean

Once done, I tried to install Ghost but got a sqlite3 error due to g++. After some googling, the solution is very simple.

We will need to install sqlite3.

cd /usr/ports/databases/sqlite3
sudo make install clean

Now we can start installing Ghost.

cd /usr/local/www/ghost
setenv CXX c++ ; npm install sqlite3 --sqlite=/usr/local

Now Ghost is installed, just follow Ghost document to complete your configuration.

Running Ghost

I prefer to run Ghost as a service using forever module.

npm install forever -g

Copy this script.

Now, just start Ghost like any FreeBSD services.

PS: This my script, I have it inside /usr/local/etc/rc.d/. Also, my log file is inside /var/log/ghost/ghost.log. This is a sh script, you will need to +x to run it, duh. And never run as root, create a ghost user or something.