Update Ghost cause 502 Bad Gateway
Last Day In 2016 Feel free to Update the Blog System
After use the method in last post to update Ghost the server become 502 error.
Before Update the Ghost I have update the OS version look the issue cause because the OS and NodeJS is too Newest than Current Ghost Can support.
Solve the SQLite3 module issue
sudo npm install -g node-gyp
sudo apt-get install build-essential
sudo apt-get install python-software-properties python g++ make
npm install sqlite3 --build-from-source
Get the Latest 6.X Node.JS and Install Method
But this method may Install the version Ghost Unsupported version.
wget -qO- https://deb.nodesource.com/setup_6.x | sudo bash -
sudo apt-get install nodejs
Get the Latest Node.JS and Install Method
This method Will Install the Latest version Ghost Unsupported version. Like my case this method will install v7.2.1 Current Ghost only support v6.9.0
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/node
The Solution
Install the specific version the Ghost Support Method
sudo npm cache clean -f
sudo npm install -g n
sudo n 6.9.0
npm install --production
sudo service ghost restart