If we are not particularly familiar with website building, if we want to build a personal website with long-term operation, Laozuo actually suggests using common CMS programs, such as WordPress, Typecho, ZBlog, etc. If we are technology lovers and want to be different, we can explore various new skills. When browsing various netizens' blogs, I saw that some technology experts were not built with the above CMS, but with Ghost , Pagekit, and Hexo.
From a technical point of view, this kind of lightweight blog program can achieve the required copywriting function, but after all, it is less used, so there is not much content to look for in third-party documents and tools. If we only focus on the sorting and writing of words and the occupation of resources, we can really save a lot. In this article, help netizens build a Ghost , so record the steps and installation methods.
Many methods of installing Ghost have also been recorded in Laozuo's blog before, but because of the long time, some one click package environments have failed, so they are recorded here again.
First, preparations
New Ubuntu 16.04 version system, no other data. If there are other data in the server, it is recommended not to install it, because it will definitely conflict. Here, we'd better create a user instead of directly operating at root and adding adduser.
sudo apt-get update && apt-get upgrade
sudo apt-get install build-essential -y
Let's update the system source first. And install the build essential software package. Because gcc and g++need to be used later, it is troublesome to install them separately Ubuntu A build essential software package is provided in the system.
Second, the installation environment process
1. Install Nginx
sudo apt-get install nginx -y
2. Install Database
sudo apt-get install mysql-server -y
During this period, we can see the process of setting passwords.
![Step by step installation of Ghost CMS light blog site in Ubuntu system - Page 1 Step by step installation of Ghost CMS light blog site in Ubuntu system - Page 1](https://images.laozuo.org/wp-content/uploads/2018/06/ub-ghost-1.jpg)
After installing the database, you should also set security settings.
sudo mysql_secure_installation
![Step by step installation of Ghost CMS light blog site in Ubuntu system - Page 2 Step by step installation of Ghost CMS light blog site in Ubuntu system - Page 2](https://images.laozuo.org/wp-content/uploads/2018/06/ub-ghost-2.jpg)
3. Install Node.js
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt install nodejs
4. Installing Ghost CLI
Since the Ghost v1 version, GHOST-CLI has been launched, which makes it easier to build ghost. Ghost CLI is an npm module, which is installed directly using the npm command.
sudo npm install -g ghost-cli@latest
ghost doctor
ghost help
Third, install Ghost
1. Create directory authorization
sudo mkdir -p /var/www/ghostblog
sudo chown laozuo:laozuo /var/www/ghostblog
2. Installation
cd /var/www/ghostblog
ghost install
![Step by step installation of Ghost CMS light blog site in Ubuntu system - Page 3 Step by step installation of Ghost CMS light blog site in Ubuntu system - Page 3](https://images.laozuo.org/wp-content/uploads/2018/06/ub-ghost-3.jpg)
The website is set here.
ghost ls
After setting, we can check the current running status.
![Step by step installation of Ghost CMS light blog site in Ubuntu system - Page 4 Step by step installation of Ghost CMS light blog site in Ubuntu system - Page 4](https://images.laozuo.org/wp-content/uploads/2018/06/ub-ghost-4.jpg)
The problem occurred, and the installation detection found that it could not run. It seems that there is a problem with the above installation, and then go through it again. (Try changing a domain name. It should be the wrong setting. Remember that there was a previous setting where you mistakenly entered "n", which should be "y")
![Step by step installation of Ghost CMS light blog site in Ubuntu system - Page 5 Step by step installation of Ghost CMS light blog site in Ubuntu system - Page 5](https://images.laozuo.org/wp-content/uploads/2018/06/ub-ghost-5.jpg)
It seems no problem.
Fourth, create account settings
After the installation, if there is a domain name bound to it, it can be opened.
Http://Our domain name/ghost
![Step by step implementation of installing Ghost CMS light blog site in Ubuntu system](https://images.laozuo.org/wp-content/uploads/2018/06/ub-ghost-6.jpg)
This process takes 2 hours, which is really troublesome. Later, we will find out if there is an installation method of one click package, and reorganize the script. Otherwise, it would be a waste of time to install this package every time.
Scan the code to follow the official account
Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge