如何在Ubuntu Server 14.04 LTS上安装Ghost


Ghost是一个很优秀的博客平台,设计美观,使用简便,且完全免费。同时也是一款开源软件,源代码共享在github上。到2014年1月,我们能感觉到界面更趋于简洁,分析图表可调整,分屏显示的方式让编辑更加的简便。

好了,下面我们讲解下如何在Ubuntu Server 14.04 LTS上来进行Ghost的安装。

1.第一步,让我们通过Ubuntu的更新命令来安装一些我们需要的额外的包

sudo apt-get update
sudo apt-get upgrade -y
sudo aptitude install -y build-essential zip vim wget

2.下载和安装Node.js源码
wget http://nodejs.org/dist/node-latest.tar.gz
tar -xzf node-latest.tar.gz
cd node-v*
安装Node.js
./configure
make
sudo make install

Ubuntu 14.04下搭建Node.js开发环境 

3.下载和安装Ghost
sudomkdir -p /var/www/
cd /var/www/
sudowget https://ghost.org/zip/ghost-latest.zip
sudo unzip -d ghost ghost-latest.zip
cd ghost/
sudonpm install --production

4.配置Ghost
sudonano config.example.js

找到Production一节,将:
host: '127.0.0.1',

修改为:
host: '0.0.0.0',

创建Ghost用户
sudoadduser --shell /bin/bash --gecos 'Ghost application' ghost
sudochown -R ghost:ghost /var/www/ghost/

用“ghost”用户登录
su - ghost
cd /var/www/ghost/

现在你已经用“ghost”用户登录,可以启动Ghost了
npm start --production

相关内容