[关闭]
@JackZheng 2016-12-20T18:24:22.000000Z 字数 621 阅读 872

安装 Ghost

Raspberry-Pi


准备

Ghost 需要有 Node.js 作为支持,检查它是否被正确安装。如果未安装,按照以下操作安装:

$ curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -

$ sudo apt-get install -y nodejs

流程

  1. 下载:$ curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip

  2. 解压:$ unzip -uo ghost.zip -d ghost

  3. 安装:$ cd ghost && npm install --production

  4. 编辑 config.js,将

    1. // #### Server
    2. // Can be host & port (default), or socket
    3. server: {
    4. // Host to be passed to node's `net.Server#listen()`
    5. host: '127.0.0.1',
    6. // Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT`
    7. port: '2368'
    8. },

    中的 127.0.0.1 改为 0.0.0.0 以便外部访问。

  5. 启动:$ npm start

  6. 在浏览器中访问 /ghost 路径以管理 Ghost。

问题

如果出现 unmet dependency 错误尝试删除 node_modules 目录:$ rm -rf node_modules

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注