- To learn more about Ghost, visit www.ghost.org.
- Assume you have already added your domain (example.com) to Plesk. If not, please follow the instructions to do so.
- To get started, connect to your server via SSH as the root user.
- My server info:
> cat /etc/redhat-release
CentOS release 6.6 (Final)
> python -V
Python 2.6.6
> yum groupinstall "Development Tools"
> yum install screen
> cd /opt
> wget http://nodejs.org/dist/v0.10.36/node-v0.10.36.tar.gz
> tar xzf node-v0.10.36.tar.gz
> cd node-v0.10.36
> ./configure
> make
> make install
> node -v
v0.10.36
Go to working directory
> cd /var/www/vhosts
> curl -L -O https://ghost.org/zip/ghost-latest.zip
> unzip -d example.com ghost-latest.zip
> cd example.com
> cp config.example.js config.js
> vim config.js
In production section, edit:
url: 'http://example.com'
host: 'YOUR-IP-ADDRESS'
port: '2368'
> vim ../conf/vhost.conf
Add the following code:
ProxyPass / http://YOUR-IP-ADDRESS:2368/
ProxyPassReverse / http://YOUR-IP-ADDRESS:2368/
> npm install --production
> npm start --production
Go to http://example.com
> npm -g install forever
> vim ghostStart.sh
Add
#!/bin/bash
NODE_ENV=production forever start index.js
> vim ghostStop.sh
Add
#!/bin/bash
forever stop index.js
> chmod 750 ghostSt*
> ./ghostStart.sh
> web
> /etc/init.d/httpd restart
If the alis 'web' is not setup run the command below
> /usr/local/psa/admin/sbin/httpdmng --reconfigure-domain example.com
> /etc/init.d/httpd restart
Go to http://example.com