2014-04-08 Setup Ghost blog system on Ubuntu

Installation

Make sure you have install all required package
1
sudo apt-get install npm nodejs
Copied!
Goto https://ghost.org/download/ , download the latest zip file
1
$ wget https://ghost.org/zip/ghost-0.4.2.zip
2
$ unzip ../ghost-0.4.2.zip -d ghost
3
$ cd ghost
4
$ npm install --production
5
...
6
$ npm start
7
8
> [email protected] start /home/simon/downloads/ghost
9
> node index
10
11
Ghost is running in development...
12
Listening on 127.0.0.1:2368
13
Url configured as: http://my-ghost-blog.com
14
Ctrl+C to shut down
Copied!
Now you can browse your own Ghost blog at http://127.0.0.1:2368
It's very possible that you got the below error when you run
1
npm install --production
Copied!
[email protected] install /home/simon/downloads/ghost/node_modules/sqlite3 node-pre-gyp install --fallback-to-build
1
/usr/bin/env: node: No such file or directory
2
npm WARN This failure might be due to the use of legacy binary "node"
3
npm WARN For further explanations, please read
4
/usr/share/doc/nodejs/README.Debian
5
6
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
7
npm ERR! `sh "-c" "node-pre-gyp install --fallback-to-build"` failed with 127
8
npm ERR!
9
npm ERR! Failed at the [email protected] install script.
10
npm ERR! This is most likely a problem with the sqlite3 package,
11
npm ERR! not with npm itself.
12
npm ERR! Tell the author that this fails on your system:
13
npm ERR! node-pre-gyp install --fallback-to-build
14
npm ERR! You can get their info via:
15
npm ERR! npm owner ls sqlite3
16
npm ERR! There is likely additional logging output above.
17
18
npm ERR! System Linux 3.11.0-13-generic
19
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--production"
20
npm ERR! cwd /home/simon/downloads/ghost
21
npm ERR! node -v v0.10.15
22
npm ERR! npm -v 1.2.18
23
npm ERR! code ELIFECYCLE
24
npm ERR!
25
npm ERR! Additional logging details can be found in:
26
npm ERR! /home/simon/downloads/ghost/npm-debug.log
27
npm ERR! not ok code 0
Copied!
This error is caused by the wrong
1
node
Copied!
command symblic link in your system. To fix this, run the following command, then run
1
npm install --production
Copied!
again.
1
sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
Copied!
It should work now.

Configuration

After start the Ghost successfully, you need to go to administration page to configure your Blog or write a new post.
First, go to
1
http://127.0.0.1:2368/ghost/
Copied!
. It will redirect to sign up page.
Then, type your inforamtion and 'Sign Up', you will be redirect to the administration page.
最近更新 1yr ago
复制链接