CentOS安装Ghost博客

安装Node.js node

yum -y install gcc-c++ openssl-devel  bzip2-devel

接下来检查Python的版本 python

python -V
Python 2.4.3

因为python版本比较低, 安装nodejs时候会出现错误, 这里首先升级python c++

wget -c http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
tar jxvf Python-2.7.3.tar.bz2
cd Python-2.7.3

这个时候就能够安装了 shell

./configure
make && make install
这里有个小技巧, 就是 make install的时候后面跟参数, -j 4, 4表明多少核, 你若是想提升你的速度的话, 首先看看你的机器是多少核的? 而后用<=核就好了. 这样子速度会更快


我这个是个便宜货, 就是单核的, 就放弃了. npm

安装完毕之后实际上仍是不起做用的,默认的仍是2.4.3版本的,因此咱们要用新版本替换到旧版本成为默认 python2.7

mv /usr/bin/python /usr/bin/python.bak
ln -s /usr/local/bin/python2.7 /usr/bin/python
这时候再运行如下命令看看是否是已经升级成功。
python -V
这时候Python虽然升级成功了,可是yum仍是须要旧版本的才能够正常运行,若是咱们调试升级整个yum不必,因此只须要修改yum的配置文件就能够了。
vi /usr/bin/yum
#!/usr/bin/python修改成#!/usr/bin/python2.4

安装nodejs spa

wget http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz
 
tar zxvf node-v0.10.24.tar.gz
 
cd node-v0.10.24
 
./configure
 
make && make install

安装Ghost博客 调试

wget --no-check-certificate https://ghost.org/zip/ghost-latest.zip
 
unzip  ghost*.zip -d ghost
 
cd ghost
 
npm install --production

接下来就是启动了 code

npm start
相关文章
相关标签/搜索