在Ubuntu系统上安装Ghost博客平台的教程
今天我们将会在UbuntuServer14.04LTS(Trusty)上安装一个博客平台Ghost。
Ghost是一款设计优美的发布平台,很容易使用且对任何人都免费。它是免费的开源软件(FOSS),它的源码在Github上。截至2015年1月(LCTT译注:原文为2014,应为2015),它的界面很简单还有分析面v板。编辑使用的是很便利的分屏显示。
因此有了这篇步骤明确的在UbuntuServer上安装Ghost的教程:
1.升级Ubuntu
第一步是运行Ubuntu软件升级并安装一系列需要的额外包。
sudoapt-getupdate sudoapt-getupgrade-y sudoaptitudeinstall-ybuild-essentialzipvimwget
2.下载并安装Node.js源码
wgethttp://nodejs.org/dist/node-latest.tar.gz tar-xzfnode-latest.tar.gz cdnode-v*
现在,我们使用下面的命令安装Node.js:
./configure make sudomakeinstall
3.下载并安装Ghost
sudomkdir-p/var/www/ cd/var/www/ sudowgethttps://ghost.org/zip/ghost-latest.zip sudounzip-dghostghost-latest.zip cdghost/ sudonpminstall--production
4.配置Ghost
sudonanoconfig.example.js
在“Production”字段,将:
host:'127.0.0.1',
修改成
host:'0.0.0.0',
创建Ghost用户
sudoadduser--shell/bin/bash--gecos'Ghostapplication'ghost sudochown-Rghost:ghost/var/www/ghost/
现在启动Ghost,你需要以“ghost”用户登录。
su-ghost cd/var/www/ghost/
现在,你已经以“ghost”用户登录,并可启动Ghost:
npmstart--production