Lifewithtech

View Original

Install: Ubuntu, Node.js, Git and Ghost

Their seems to be a bit of confusion amongst the Ghost community on how to install Ghosts first weekly update. I am not a developer or part of the Ghost team however I have backed Ghost as a VIP. I figured I could shed some light on how to go about this install. This walk through is intend for other Ghost VIP or higher backers. I will walk through the installation of a Ubuntu server 13.04 server as well as Node.js and Ghost and other recommended and suggested packages.

 

Notes: From the video walkthrough.

  • Ubuntu 13.04 server 64bit - Fresh install
  • Create directory
    • /home/user/Ghost
  • Copy Ghost files to new “Ghost” directory
  • Install the Git package
    • sudo apt-get install git
  • Update Ubuntu packages
    • sudo apt-get update
  • Install Python-software-properties packages
    • sudo apt-get install python-software-properties python g++ make
  • Add chris-lea's Node.js repository
    • sudo add-apt-repository ppa:chris-lea/node.js
  • Update ubuntu packages again since you added a respository
    • sudo apt-get update
  • Install Nodejs
    • sudo apt-get install nodejs
  • Install Ghost
    • Navigate to /home/user/Ghost directory
    • npm install
  • Edit Ghost's config file so it can be seen on the network (by default only works on local machine)
    • Open config.js with in the Ghost directory
    • Replace all "127.0.0.1" with your machines IP "XXX.XXX.XXX.XXX"
    • Save
  • Done

Notes on Ghost:

  • Run Ghost from the Ghost directory with the Command
    • npm start
  • Access Ghost  with
    • http://XXX.XXX.XXX.XXX:2368/
    • http://XXX.XXX.XXX.XXX:2368/ghost

Addition non needed packages

There is a package called forever that I like using with node. Basicly it keeps your node.js application runing forever. So it it crashes it will start it again automaticly

  • Install using
    • sudo npm install -g forever
  • Run using from Ghost directory
    • forever start index.js

Things to keep in mind if your not familiar with Node.js

  • In order to quit a node.js process gracefully use
    • Ctrl + C

If for some reason you did NOT exit gracefully

  • Check node process with
    • ps -ax | grep node
  • Kill process that didn't exit gracefully with
    • Kill -9 (process number)