node.js+ghost快速搭建
yum install -y epel-release
yum install -y nodejs
yum install -y npm
通过在终端窗口中输入 node -v 和 npm -v检查 Node 和 npm 是否安装成功
curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip
unzip -uo ghost.zip -d ghost
cd ghost
npm install --production
npm install -g knex-migrator
knex-migrator init
vim core/server/config/defaults.json #修改配置
npm start #可以用nohup后台
#Ghost 将会运行在 127.0.0.1:2368 可以在 config.js 中修改IP地址和端口
#访问 127.0.0.1:2368/ghost 并且设置管理员用户并登陆 Ghost 管理员
nginx配置
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}