Home >Web Front-end >JS Tutorial >Tutorial on installing Ghost blogging platform on Ubuntu system_node.js

Tutorial on installing Ghost blogging platform on Ubuntu system_node.js

WBOY
WBOYOriginal
2016-05-16 15:54:441230browse

Today we will install Ghost, a blogging platform on Ubuntu Server 14.04 LTS (Trusty).

Ghost is a beautifully designed publishing platform that is easy to use and free for anyone. It is free open source software (FOSS) and its source code is on Github. As of January 2015 (LCTT translation annotation: the original text is 2014, it should be 2015), its interface is very simple and there is an analysis panel. The editor uses a very convenient split-screen display.
So here is a step-by-step tutorial on how to install Ghost on Ubuntu Server:
1. Upgrade Ubuntu

The first step is to run the Ubuntu software upgrade and install a series of required additional packages.

 sudo apt-get update
 sudo apt-get upgrade -y
 sudo aptitude install -y build-essential zip vim wget

2. Download and install Node.js source code

 wget http://nodejs.org/dist/node-latest.tar.gz
 tar -xzf node-latest.tar.gz
 cd node-v*

Now, we install Node.js using the following command:

 ./configure
 make
 sudo make install

3. Download and install Ghost

 sudo mkdir -p /var/www/
 cd /var/www/
 sudo wget https://ghost.org/zip/ghost-latest.zip
 sudo unzip -d ghost ghost-latest.zip
 cd ghost/
 sudo npm install --production

4. Configure Ghost

 sudo nano config.example.js

In the “Production” field, change:

 host: '127.0.0.1',

was changed to

 host: '0.0.0.0',

Create Ghost user

 sudo adduser --shell /bin/bash --gecos 'Ghost application' ghost
 sudo chown -R ghost:ghost /var/www/ghost/

Now to launch Ghost, you need to log in as the "ghost" user.

 su - ghost
 cd /var/www/ghost/

Now, you are logged in as the "ghost" user and can start Ghost:

 npm start --production

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn