天天看点

如何在Ubuntu Server 14.04 LTS(Trusty) 上安装Ghost如何在Ubuntu Server 14.04 LTS(Trusty) 上安装Ghost

今天我们将会在ubuntu server 14.04 lts (trusty)上安装一个博客平台ghost。

ghost是一款设计优美的发布平台,很容易使用且对任何人都免费。它是免费的开源软件(foss),它的源码在github上。截至2015年1月(lctt 译注:原文为2014,应为2015),它的界面很简单还有分析面板。编辑使用的是很便利的分屏显示。

如何在Ubuntu Server 14.04 LTS(Trusty) 上安装Ghost如何在Ubuntu Server 14.04 LTS(Trusty) 上安装Ghost

因此有了这篇步骤明确的在ubuntu server上安装ghost的教程:

<a target="_blank"></a>

第一步是运行ubuntu软件升级并安装一系列需要的额外包。

sudo apt-get update

sudo apt-get upgrade -y

sudo aptitude install -y build-essential zip vim wget

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

sudo mkdir -p /var/www/

cd /var/www/

sudo wget https://ghost.org/zip/ghost-latest.zip

sudo unzip -d ghost ghost-latest.zip

cd ghost/

sudo npm install --production

sudo nano config.example.js

在“production”字段,将:

host: '127.0.0.1',

修改成

host: '0.0.0.0',

sudo adduser --shell /bin/bash --gecos 'ghost application' ghost

sudo chown -r ghost:ghost /var/www/ghost/

现在启动ghost,你需要以“ghost”用户登录。

su - ghost

cd /var/www/ghost/

现在,你已经以“ghost”用户登录,并可启动ghost:

npm start --production

----------------------------------------------------------------------------------------------------------------------------

原文发布时间:2015-02-24

本文来自云栖合作伙伴“linux中国”