📒
notebook
  • Notebook
  • DevOps
    • Git
      • 常见 Git 操作
      • 使用 SSH 连接 Git 远程仓库
      • 使用 GPG Keys 签名 Git 提交
      • Git on macOS
    • Docker
      • macOS 安装配置 Docker
      • CentOS7 安装配置 Docker CE
  • Linux
    • CentOS
      • CentOS7 安装配置 vsftpd
      • CentOS7 设置虚拟内存
      • CentOS7 使用 acme.sh 自动申请免费 SSL 证书
      • CentOS7 修改 SSH 端口号
      • CentOS7 主机初始设置
      • 阿里云 CentOS 主机常见设置
      • CentOS7 安装配置 SS
    • nginx
      • nginx 配置 301 永久重定向
      • nginx 使用 SSL证书配置 HTTPS
      • CentOS7 安装配置 nginx
      • nginx 配置 gzip 压缩
      • nginx 代理静态网页
  • Server
    • Ghost
      • macOS 安装配置 Ghost
      • CentOS7 安装配置 Ghost
    • npm & Yarn
      • Yarn 常用命令
      • CentOS7 安装卸载升级 Yarn
      • npm & Yarn 常见错误处理
      • macOS 安装卸载升级 Yarn
    • Node.js
      • Awesome Node.js
      • CentOS7 安装卸载升级 Node.js
      • macOS 安装卸载升级 Node.js
  • Web
    • Ionic
      • 创建 Ionic & Angular 项目
      • 使用 Ionic & Cordova 构建 Android 应用
      • macOS 搭建 Ionic & Cordova 开发环境
    • CSS
      • CSS 排版技巧
      • Awesome CSS
      • CSS 三栏自适应布局
    • Angular
      • Awesome Angular
      • 创建 Angular 项目
    • HTML
      • HTML head 常用标签
      • HTML 常用 DTD 声明
      • 常用网页语义结构
    • Web 技术标准
    • JavaScript
      • Awesome JavaScript
      • JavaScript 的 eval() 函数详解
  • Mobile
    • H5
      • iOS Safari Web App 配置
  • Development Environment
    • Development Utilities
      • Awesome Windows
      • macOS 安装配置 Homebrew
      • Awesome macOS
      • macOS 安装配置 iTerm2
    • FEED
      • 常用 Gulp 插件
  • Network
    • 常见公共 DNS
  • Technology Stacks for Web Front-End Development
Powered by GitBook
On this page
  • 准备工作
  • 安装 Ghost CLI
  • 安装 Ghost
  • 配置 Ghost
  • 管理 Ghost
  • 参考文献

Was this helpful?

  1. Server
  2. Ghost

macOS 安装配置 Ghost

PreviousGhostNextCentOS7 安装配置 Ghost

Last updated 4 years ago

Was this helpful?

准备工作

  • (推荐 node@12)

  • 安装 Yarn 并设置源为 taobao 镜像源

安装 Ghost CLI

使用 Yarn 全局安装 Ghost-CLI:

yarn global add ghost-cli@latest

查看当前安装的 Ghost-CLI 版本:

ghost -v

Ghost-CLI version: 1.11.0

安装 Ghost

使用终端工具进入要安装 Ghost 的目录中:

cd <path>

在当前目录安装 Ghost:

# 安装最新版
ghost install local

# 指定版本号安装
ghost install <version> --local

Tips: 此命令下安装的 Ghost 为development 模式,且使用 SQLite3 数据库。

等待安装完成后,检查当前安装的 Ghost 版本:

ghost -v

Ghost-CLI version: 1.11.0 Ghost version: 2.31.1 (at ~/Dev/ghost)

配置 Ghost

安装完成后,会自动启动 Ghost,使用浏览器访问 http://localhost:2368/ghost/ ,根据提示注册管理员账号。

管理 Ghost

查看已安装的 Ghost 列表:

ghost ls

启动 Ghost:

# 当前目录下安装的 Ghost
ghost start

# 任意目录下指定 name 启动
ghost start <name>

关闭 Ghost:

# 当前目录下安装的 Ghost
ghost stop

# 任意目录下指定 name 关闭
ghost stop <name>

重启 Ghost:

# 当前目录下安装的 Ghost
ghost restart

# 任意目录下指定 name 重启
ghost restart <name>

参考文献

支持的 Node.js 版本
Ghost CLI
How to install Ghost locally