美文网首页
GHOST博客部署记录

GHOST博客部署记录

作者: prik丶 | 来源:发表于2021-01-08 09:56 被阅读0次

记录一下捣鼓Ghost的过程。坑很多,好不容易捣鼓好了,却找不到一个好用的主题。还是Hexo香。

原文链接: https://trzoey.github.io/blog-prik/java-blog/156964/

准备一台云服务器

我使用的是CentOS系统,官方建议Ubuntu,最好根据官方的来,CentOS确实有非常多坑。

安装node

yum install -y nodejs
node -v
image
npm cache clean -f
npm install n -g
n stable
image

安装成功,发现版本没有变化。需要将安装目录添加到环境变量

vim /etc/profile
image

保存后刷新

source /etc/profile
node -v
image

安装nginx

yum install -y nginx
image

安装yarn

官方的Yarn存储库会得到持续维护,并提供最新版本。要启用Yarn存储库并导入存储库的GPG密钥:

curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo`
sudo rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg
yum install yarn

注意需要保证在公共目录下

image

安装 ghost-cli

yarn global add ghost-cli@latest

创建新用户

ghost 不能用root用户启动

adduser user_ghost
passwd user_ghost
su user_ghost

安装 ghost

# 创建目录
sudo mkdir /var/www/ghost
# 修改用户/用户组为刚才创建的用户
sudo chown user_ghost:user_ghost /usr/local/ghost
# 进入目录
cd /var/www/ghost
# 执行安装指令
ghost install
image

安装好后会要求输入一些配置,随后可以在配置文件中修改。注意还需要安装mysql,这里省略。

image

CentOS下启动会报错,使用下边指令启动。服务名称看安装时生成的,如上图红框,格式为ghost_[blogUrl].service

# 启动:
sudo systemctl start ghost_118.190.55.152.service
# 查看状态:
sudo systemctl status ghost_118.190.55.152.service
  1. CentOS 7 安装配置 Ghost
  2. Ghost 搭建博客笔记
  3. ghost报错问题及解决方法

相关文章

  • GHOST博客部署记录

    记录一下捣鼓Ghost的过程。坑很多,好不容易捣鼓好了,却找不到一个好用的主题。还是Hexo香。 原文链接: ht...

  • ghost博客docker部署记录

    从来只是磨刀,至于砍柴……将来再说吧 工具: VPS:ubuntu 14.04@SJC LIZCAT Docker...

  • Ghost 博客部署

    ghost 博客部署 还是有些弯路的,记录一下,以后学习 下的版本是英文的,看到中文的所以换了,结果 npm in...

  • Ghost博客部署实践

    最终要实现的效果:点击查看效果 建站思路 购买域名和申请服务器 安装Nginx 安装Nodejs和Ghost 使用...

  • 在Docker中部署Ghost博客

    1.下载Docker Hub 上的官方Ghost镜像 sudo docker pull ghost 2.创建Gho...

  • ghost博客主题自荐

    演示示例 一、ghost-theme-mj主题简介 这是一个Ghost博客主题,Ghost博客是一个很不错的写作平...

  • ghost-theme-mj主题介绍

    演示示例 一、ghost-theme-mj主题简介 这是一个Ghost博客主题,Ghost博客是一个很不错的写作平...

  • 从零到壹——打造专属博客

    基于Node.js 的博客系统——Ghost 这篇文章记录了我是如何从零开始搭建自己的博客。包括从选择博客系统,选...

  • 博客软件ghost

    ghost是用node.js写的博客平台,开源软件,准备用ghost搭一个自己的博客

  • 101-Ghost博客

    Ghost 中国站点Ghost博客 帮助文档 http://docs.ghostchina.com/zh/inst...

网友评论

      本文标题:GHOST博客部署记录

      本文链接:https://www.haomeiwen.com/subject/unmxaktx.html