Ghost with the Most
Ghost Installation - as part of the Big Bad Blog project, I lightly followed http://support.ghost.org/installing-ghost-linux/ - which directs you first to install NodeJS - and recommends 0.10.x.
Once you have NodeJS installed, you grab the Ghost zip and set up a template Ghost installation in /var/www/ghost.
Once your Ghost install is complete, you can Instantiate a New Blog.
Install NodeJS
The NodeJS instructions are at http://github.com/nodesource/distributions
sudo -i # need to get to the root of the problem
npm # maybe nodejs is installed? nope - failed.
apt-get install curl # nodejs install
apt-get install ca-certificates # nodejs install - nodejs repo key is checked
# Running a script off the internet as root - unsafe? check it first!
# I installed the 6-series first but Ghost didn't like that
curl -sL https://deb.nodesource.com/setup_0.10 | bash -
apt-get install nodejs
# Check that it worked by running `npm` - if npm is NOT FOUND,
# you've installed the Jessie nodejs package - rerun setup_0.10
# and carefully check that it ran without error
Install Ghost
# We will create a template-ghost installation
# which will later get copied into each blog-site.
cd /var/www
apt-get install sqlite3 # ghost datastore
apt-get install unzip # ghost install
# Get URL for latest versions from https://ghost.org/developers/
wget https://ghost.org/zip/ghost-0.8.0.zip
# Alternate - but you won't get a version-named zip
# curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip
# We are creating a template installation folder in /var/www/ghost,
# this gets copied into site folders for distinct blogs
unzip ghost-0.8.0.zip -d ghost
cd ghost
# This takes a while - make sure it completes without any errors.
# There are a couple of NodeJS version warnings.
npm install --production
# prepare the config.js template for our websites
cp config.example.js config.js
# Set the following in both PRODUCTION and DEVELOPMENT,
# You don't want your password in clear-text over the internet, do you!
vi config.js
forceAdminSSL: true,
# test Ghost - Ctrl-C to finish
npm start --production
# We now have a working Ghost template installation in /var/www/ghost
Useful links
Follow-up Needed
- This is a great write-up - https://www.digitalocean.com/community/tutorials/how-to-create-a-blog-with-ghost-and-nginx-on-ubuntu-14-04
- create restricted priv ghost user
- use forever or systemctl to start blogs on server reboot
- subscribe to nodejs and ghost security lists for updates