接着装Ghost



install Ghost via ghost-cli

配合上一个shadowsocks的安装, 然后开始Ghost的安装

先装这个ghost-cli

sudo npm i -g ghost-cli

哎呀, 然后才开始了Ghost最新版的安装, 就是这最新版醉了醉了

(自己删了好几次, 都不知道删干净没有, 反正有都又装好了)

这个ghost-cli的速度还好, 但是就是下面这个,才让我前面折腾了这么久shadowsocks

正式安装Ghost

ghost install

之前等了快一个小时都没搞好我都怀疑电脑挂了

然后终于出现

▶ ghost install
✔ Checking system Node.js version
✔ Checking current folder permissions
System checks failed with message: 'Linux version is not Ubuntu 16'
Some features of Ghost-CLI may not work without additional configuration.
For local installs we recommend using `ghost install local` instead.
? Continue anyway? Yes
✔ Checking operating system
Local MySQL install not found. You can ignore this if you are using a remote MySQL host.
Alternatively you could:
a) install MySQL locally
b) run `ghost install --db=sqlite3` to use sqlite
c) run `ghost install local` to get a development install using sqlite3.
? Continue anyway? Yes
✔ Checking MySQL is installed
✔ Checking for latest Ghost version
✔ Setting up install directory
☱ Downloading and installing Ghost v1.0.0 > Installing dependencies > yarn install☲ Downloading and installing Ghost v1.0.0 > Installing dependencies > yarn install☴ Downloading and installing Ghost v1.0.0 > Installing dependencies > yarn install☱ Downloading and installing Ghost v1.0.0 > Installing dependencies > [1/4] Resolv☲ Downloading and installing Ghost v1.0.0 > Installing dependencies > [1/4] Resolv☴ Downloading and installing Ghost v1.0.0 > Installing dependencies > [1/4] Resolv☱ Downloading and installing Ghost v1.0.0 > Installing dependencies > [1/4] Resolv☲ Downloading and installing Ghost v1.0.0 > Installing dependencies > [1/4] Resolv☴ Downloading and installing Ghost v1.0.0 > Installing 
------
    (此处略去几万字..节...(都差不多重复的))
------
 dependencies > [4/4] Buildi☴ Downloading and installing Ghost v1.0.0 > Installing dependencies > [4/4] Buildi✔ Downloading and installing Ghost v1.0.0
✔ Finishing install process
? Enter your blog URL: http://blog.marryjianjian.xin/
? Enter your MySQL hostname: ***
? Enter your MySQL username: ***
? Enter your MySQL password: [hidden]
? Enter your Ghost database name: ***
✔ Configuring Ghost
✔ Setting up instance
Running sudo command: useradd --system --user-group ghost
[sudo] password for ***:
Running sudo command: chown -R ***
✔ Setting up "ghost" system user
? Do you wish to set up Nginx? Yes
Nginx is not installed. Skipping Nginx setup.
ℹ Setting up Nginx [skipped]
Task ssl depends on the 'nginx' stage, which was skipped.
ℹ Setting up SSL [skipped]
? Do you wish to set up "ghost" mysql user? Yes
MySQL user is not "root", skipping additional user setup
ℹ Setting up "ghost" mysql user [skipped]
? Do you wish to set up Systemd? Yes
✔ Creating systemd service file at /var/www/ghost/system/files/ghost_blog-***.service
Running sudo command: ln -sf /var/www/ghost/system/files/ghost_***-xin.service /lib/systemd/system/ghost_blog-***.service
Running sudo command: systemctl daemon-reload
✔ Setting up Systemd
Running sudo command: -E -u ghost /usr/lib/node_modules/ghost-cli/node_modules/.bin/knex-migrator-migrate --init --mgpath /var/www/ghost/current
[2017-07-26 01:08:52] INFO Finished database migration!
✔ Running database migrations
? Do you want to start Ghost? Yes
✔ Validating config
Running sudo command: systemctl start ghost_blog-***
✔ Starting Ghost
Running sudo command: systemctl enable ghost_blog-*** --quiet
☲ Starting GhostThe unit files have no [Install] section. They are not meant to be enabled
using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).
✔ Starting Ghost
You can access your blog at ******

Ghost uses direct mail by default
To set up an alternative email method read our docs at https://docs.ghost.org/docs/mail-config

哎, 被坑了几次, 算是终于成功了 , 大半了吧, 基本东西撘好了; 还顺便学习了一波Linux配置翻墙, 学习了;

Ghost的安装也参考了这个

因为我之前MysqlNginx都已经装好了, 稍改配置即可,参考的教程只是使用的Ghost版本更老(最新版才发布, 改的还不少),但是过程和内容都十分详细,有介绍Nginx, Mysql, SSL, 备案等诸多话题;

没有障碍的话,还可参考官网的文档 install ghost via ghost-cli