Ghost安装

卸载 apache2:####

apt-get remove apache2 && apt-get --purge remove apache-common && apt-get --purge remove apache2 && find /etc -name "*apache*" |xargs rm -rf && rm -rf /var/www && rm -rf /etc/libapache2-mod-jk && dpkg -l |grep apache2|awk '{print $2}'|xargs dpkg -P

安装 Node.js

apt-get update && apt-get upgrade -y && apt-get install gcc g++ make -y

wget https://nodejs.org/dist/v0.10.40/node-v0.10.40.tar.gz && tar xzf node-v0.10.40.tar.gz && cd node-v0.10.40 && ./configure && make && make install

安装 Ghost

wget https://ghost.org/zip/ghost-latest.zip && unzip ghost-latest.zip && cp config.example.js config.js

修改config.js
vim config.js
完成安装
npm install --production
npm install -g forever (Root目录)
NODE_ENV=production forever start index.js

安装Nginx 1.8.0 #### [Header]

echo deb http://nginx.org/packages/debian/ wheezy nginx >> /etc/apt/sources.list && echo deb-src http://nginx.org/packages/debian/ wheezy nginx >> /etc/apt/sources.list && wget http://nginx.org/keys/nginx_signing.key && apt-key add nginx_signing.key && apt-get update && apt-get install nginx

/etc/nginx/conf.d

server {

listen 80;
server_name xxx.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
}