@JackZheng
2016-12-20T18:24:22.000000Z
字数 621
阅读 872
Raspberry-Pi
Ghost 需要有 Node.js 作为支持,检查它是否被正确安装。如果未安装,按照以下操作安装:
$ curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
$ sudo apt-get install -y nodejs
下载:$ curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip
解压:$ unzip -uo ghost.zip -d ghost
安装:$ cd ghost && npm install --production
编辑 config.js,将
// #### Server// Can be host & port (default), or socketserver: {// Host to be passed to node's `net.Server#listen()`host: '127.0.0.1',// Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT`port: '2368'},
中的 127.0.0.1 改为 0.0.0.0 以便外部访问。
启动:$ npm start
在浏览器中访问 /ghost 路径以管理 Ghost。
如果出现 unmet dependency 错误尝试删除 node_modules 目录:$ rm -rf node_modules