Ghost is a fabulous new open-Source and non-profit-based blogging platform. This is a short tutorial on how-to install ghost on Linux Mint/Ubuntu or any other Linux system. This tutorial works sucessfully on Mint Linux 15, CentOs/RedHat or Ubuntu 14.04.
There exists an official installation doc at docs.ghost.org, however it still does not work, even now that it is August 5th 2014.
If you run into the following error when trying to start ghost ..
module.js:333 throw err; ^ Error: Cannot find module ./core/config-loader.js’.
firstname.lastname@example.org install /Users/a000/Downloads/ghost-0.4.2/node_modules/sqlite3
node-pre-gyp install --fallback-to-build
If you get above errors you did most probably follow the official ghost install instructions. They leave out dependencies related to node 10.x and re-direct you to install node 11.
This is how I would suggest to proceed and how to make sure you have the correct versions of node and dependencies installed.
Checking out node should create a new directory. Better don’t delete the folder after you are finishedwith compiling it in case you want to do a “make uninstall” later. This approach is always a good idea if you compile from source.
git clone https://github.com/joyent/node.git && cd node && git tag | grep v0.10.
Above command will clone into node’s git repository and give back a long list of v.0.10.x versions. Make sure to pick the latest one: v0.10.30 was the latest 10.x version at the time of writing.
Then issue a
git checkout v0.10.30 && python2.7 configure && make && sudo make install && node -v
This should give you back a v0.10.30 and install it. If not, you should make a symbolic link from /usr/bin/node to the location where node actually installed.
python2.7 configure - because node won't compile with python2.4, just in case you have a python2.4 installed, like on legacy RedHat or legacy CentOS. If you have to install python2.7 on CentOS make sure to use
make altinstall, otherwise you will break CentOS. Better don't CentOS or RedHat, but there exist legitimate business-reasons for why you might have to.
Make sure no old ghost installs are present, then create a new ghost directory, preferably within your web server directory structure, but you could choose any destination.
To finally pull ghost do a
curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip
unzip -uo ghost.zip -d ghost
Then finally a
npm install -production
You want to see this response:
[sqlite3] Success: "lib/node_sqlite3.node" is installed
└── email@example.com (firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, ...
If there are no red-colored prompts or other errors you should be good to go for a
npm start in your terminal window inside the ghost folder.
If you did however run into errors while following above instructions, you could try to reproduce the commands step-by-step and work your way through the errors with the help of the community at the official help forum.
Google Analytics and Disqus
Plug-Ins do not work right now, because the API is not finished yet. In case you want to be ahed of the game and add Google Analytics, Disqus and other Cloud-services (consider the surveillance though), you can do so by editing the default.hbs file in your ghost theme directory.
You can use above technique and read the great tutorials about this at http://ghost.pellegrom.me/adding-disqus-comments-to-ghost/.
I successfully implemented MathJax into my Ghost install by putting the following call into default.hbs of my theme:
Now use the double
$$ delimiter as described here http://docs.mathjax.org/en/latest/start.html. Even HTML5MathML worked, in case you want to score that distinction in your next university assignment by using advanced latex-based mathematical animations.
Have fun with ghost!