GHOST

Record the process of making a Ghost. Pit a lot, very not easy to tamp good, but can not find a good theme. Turns out it's still Hexo.

Prepare a cloud server

I use CentOS system, the official recommended Ubuntu, it is best to follow the official, CentOS does have many pits.

Install the node

yum install -y nodejs
node -v
Copy the code

npm cache clean -f
npm install n -g
n stable
Copy the code

The installation is successful and the version is not changed. You need to add the installation directory to the environment variable

vim /etc/profile
Copy the code

Refresh after save

source /etc/profile
node -v
Copy the code

Install nginx

yum install -y nginx
Copy the code

Installation of yarn

The official Yarn repository is maintained continuously and the latest version is available. To enable the Yarn repository and import the REPOSITORY’s GPG key:

curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo`
sudo rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg
yum install yarn
Copy the code

Make sure it is in a public directory

Install the ghost – the cli

yarn global add ghost-cli@latest
Copy the code

Creating a New user

Ghost cannot be started as root

adduser user_ghost
passwd user_ghost
su user_ghost
Copy the code

Install the ghost

Sudo chown user_ghost:user_ghost /usr/local/ghost /var/ WWW /ghost # Ghost installCopy the code

Once installed, you will be asked to enter some configuration, which can be modified later in the configuration file. Note that you also need to install mysql, which is omitted here.

CentOS startup error, use the following command to start. The service name is generated during installation, as shown in the red box in the figure, in the format of ghost_[blogUrl].service

Sudo systemctl start ghost_118.190.55.152.service sudo systemctl start ghost_118.190.55.152.serviceCopy the code
  1. CentOS 7 install and configure Ghost
  2. Ghost builds blog notes
  3. Ghost error problems and solutions