centos部署微博_CentOS7下使用ghost-cli部署ghost博客平台

ghost是基于node.js的新一代博客平台——相比日渐臃肿、无所不能的WordPress,Ghost更专注于博客,在官网上打出“只做博客平台”的口号,因此相对WordPress会更加简洁易用。

1.基础配置

1.1安装node.js及nginx

首先是在VPS上安装node.js v6 LTS:

curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash -

然后执行

sudo yum -y install nodejs

以及

sudo yum install gcc-c++ make

接下来安装nginx:

yum install -y nginx

2.安装ghost-cli

ghost-cli是1.0版本之后出现的新工具。

官网介绍:"With Ghost 1.0.0, we have introduced Ghost CLI - a fully loaded tool to help you get Ghost installed, setup & configured and to make it super easy to keep your Ghost install up to date."

简单来说就是它能够帮助我们更加方便地安装,启动,升级和管理我们的ghost-blog.

安装ghost-cli:

sudo npm i -g ghost-cli

不知道是不是因为我的VPS在国内,装了好久= =..墙越来越厉害了...

早知道应该用cnpm的.

3.ghost安装

以文件夹blog为例,我们可以先创建一个叫做blog的文件夹安放我们的博客文件:

mkdir blog

cd blog

然后就可以使用ghost-li来安装ghost了

ghost install [version]

version可为1.0.2等等,如果要安装最新版只需ghost install即可.

warning:

此上安装方法数据库默认为mysql,如果使用sqlite3可以使用一下语句:

ghost install --db sqlite3 --dbpath ./content/data/ghost.db

接下来会有几行warning:

System checks failed with message: 'Linux version is not Ubuntu 16'

Some features of ghost-cli may not work without additional configuration

...

我选择了无视它继续往前走

后面就会是让你输入blogUrl

是否配置nginx SSL Systemd

按照自己意愿做出选择就好.

4.使用

在nginx.conf做好配置后就能够重启nginx了,如果域名解析正确就能够使用了

进入 http://你的域名/ghost

该网址为ghost的管理后台

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值