CentOS搭建Ghost博客
参考:腾讯云手动实验https://cloud.tencent.com/developer/labs/lab/10281
Ghost 是一款非常出色的开源博客平台,界面简洁,专注写作。CentOS 7 上安装 Ghost ,包括安装 Nodejs 环境以及配置
Nginx 对 Ghost 的代理请求等步骤。
安装Node.js及相关包
限制使用node.js版本^8.16.0 || ^10.13.0 || ^12.10.0
[root@localhost ~]# yum -y update
[root@localhost ~]# yum groupinstall -y "Development Tools" \
--setopt=group_package_types=mandatory,default,optional
[root@localhost ~]# wget https://npm.taobao.org/mirrors/node/v12.16.2/node-v12.16.2-linux-x64.tar.xz
[root@localhost ~]# tar xf node-v12.16.2-linux-x64.tar.xz
[root@localhost ~]# mv node-v12.16.2-linux-x64 /usr/local/nodejs
[root@localhost ~]# vim /etc/profile
# 末尾添加
export PATH=$PATH:/usr/local/nodejs/bin
[root@localhost ~]# source /etc/profile
[root@localhost ~]# node -v
v12.16.2
[root@localhost ~]# npm -v
6.14.4
[root@localhost ~]# npm config set registry https://registry.npm.taobao.org
[root@localhost ~]# npm i -g cnpm
安装成功后通过运行node -v及npm -v 出现版本号即可表示安装成功。
因为国内网络的关系,也同时安装了 cnpm 模块,后续将使用该命令代替 npm 命令。
安装Ghost Client
[root@localhost ~]# cnpm i -g ghost-cli
...
[ghost-cli@1.13.1] link /usr/bin/ghost@ -> /usr/lib/node_modules/ghost-cli/bin/ghost
[root@localhost ~]# ghost -v
Ghost-CLI version: 1.13.1
一般而言,安装成功后通过运行 ghost -v,出现版本号即可表示安装成功。但因为国内的网络问题,安装后请检查下终端的 log,如果有出现任意红色报错信息,则证明只有部分安装成功,需要重新执行命令安装。
安装Ghost
添加Ghost程序用户,并创建目录
[root@localhost ~]# adduser ghost
[root@localhost ~]# mkdir -p /var/www/ghost
[root@localhost ~]# chown ghost /var/www/ghost/
安装Ghost
[root@localhost ~]# su ghost
[ghost@localhost root]$ cd /var/www/ghost/
[ghost@localhost ghost]$ ghost install local --db=sqlite3
# 这里需要相当长的时间
✔ Checking system Node.js version
✔ Checking current folder permissions
✔ Checking memory availability
✔ Checking for latest Ghost version
✔ Setting up install directory
✔ Downloading and installing Ghost v3.14.0
✔ Finishing install process
✔ Configuring Ghost
✔ Setting up instance
✔ Starting GhostGhost uses direct mail by default. To set up an alternative email method read our docs at https://ghost.org/docs/concepts/config/#mail------------------------------------------------------------------------------Ghost was installed successfully! To complete setup of your publication, visit: http://localhost:2368/ghost/
启动Ghost
[ghost@localhost ghost]$ ghost start
Ghost is already running! For more information, run: ghost ls
[ghost@localhost ghost]$ ghost ls
┌─────────────┬────────────────┬─────────┬───────────────────────┬────────────────────────┬──────┬─────────────────┐
│ Name │ Location │ Version │ Status │ URL │ Port │ Process Manager │
├─────────────┼────────────────┼─────────┼───────────────────────┼────────────────────────┼──────┼─────────────────┤
│ ghost-local │ /var/www/ghost │ 3.40.5 │ running (development) │ http://localhost:2368/ │ 2368 │ local │
└─────────────┴────────────────┴─────────┴───────────────────────┴────────────────────────┴──────┴─────────────────┘
安装nginx
配置yum源
[ghost@localhost ghost]$ exit
exit
[root@localhost ~]# rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
安装nginx
[root@localhost ~]# yum -y install nginx
启动nginx
[root@localhost ~]# systemctl start nginx
配置反向代理
修改nginx配置文件
[root@localhost ~]# vim /etc/nginx/conf.d/default.conflocation / {proxy_pass http://127.0.0.1:2368;proxy_redirect default;root /usr/share/nginx/html;index index.html index.htm;}
重启nginx
[root@localhost ~]# nginx -s stop
[root@localhost ~]# nginx
验证
访问http://192.168.1.10/ghost/
http://192.168.1.10
CentOS搭建Ghost博客相关推荐
- ghost博客mysql_centos 上快速搭建ghost博客方法分享
1. 介绍 Ghost 是一套基于 Node.js 构建的开源博客平台,具有易用的书写界面和体验,博客内容默认采用 Markdown 语法书写,目标是取代臃肿的 Wordpress.本篇文章主要是介绍 ...
- docker-compose搭建ghost博客系统
ghost的官网开发文档地址:https://ghost.org/docs/ 其对应的详细配置地址说明如下: https://ghost.org/docs/config/#configuration- ...
- Ghost博客手动搭建
Ghost博客手动搭建 操作场景 示例软件版本 前提条件 操作步骤 操作场景 Ghost 是使用 Node.js 语言编写的开源博客平台,您可使用 Ghost 快速搭建博客,简化在线出版过程.本文档介 ...
- 在CentOS 搭建 自己的Ghost博客教程
可以点击查看我的Ghost博客 欢迎转载,请注明出处: http://zyden.vicp.cc/centos-ghost-blog/ 谢谢 目前网络上对搭建Ghost的教程明显比较旧了,一个流程下来 ...
- 手把手教你搭建一个属于自己的Ghost博客
介绍 Ghost 是基于 Node.js 的开源博客平台,由前 WordPress UI 部门主管 John O'Nolan 和 WordPress 高级工程师(女) Hannah Wolfe 创立, ...
- 运用BT在centos下搭建一个博客论坛
在日常的工作和学习中,我们都很希望有自己的工作站,就是自己的服务器,自己给自己搭建一个博客或者是论坛,用于自己来写博客和搭建网站论坛.现在我们就用一个简单的方法来教大家如何30分钟内部署一个博客网站. ...
- 【Microsoft Azure 的1024种玩法】六十.通过Azure Virtual Machines快速搭建个人Ghost博客系统
[简介] Ghost 是一套基于Node.js 语言开发构建的开源博客系统,它的整体架构为前端管理系统基于Ember.js, 后端的模板引擎采用的handlebars, 数据库是基于MySQL的,本篇 ...
- CentOS 7下简单搭建个人博客——wordpress
CentOS 7下简单搭建个人博客--wordpress 前言: CentOS 7及以上版本不能安装Mysql数据库,我们用的MariaDB数据库代替.mariadb的简单安装与配置可参考:https ...
- 搭建WordPress博客平台,云计算技术与应用实验报告
实验环境:阿里云云产品资源ECS服务器 题目:基于ECS部署LAMP环境 实验内容和要求: LAMP 是 Linux.Apache.MySQL和PHP的缩写,是搭建网站系统依赖的基础运行环境.本实验使 ...
- wordpress搭建个人博客
wordpress搭建个人博客 用途:搭建wordpress个人博客,可以整理归纳自己的知识,方便个人查找曾经所涉猎的,当然最重要的是资源共享,服务大家,帮助别人少走弯路! 1. ECS购买 云服务器 ...
最新文章
- c语言程序能够在不同的操作系统下运行,这说明c语言具有很好的,程序设计(C)作业一(有答案)...
- 根据各工序时间画aoe网_曲靖被动防护网RXI150被动网厂家
- 第33讲:可见即可爬,Appium 的使用
- 贝塞尔修正_贝塞尔修正背后的推理:n-1
- kmeans聚类算法matlab代码,K-Means算法实现(Matlab)
- 完全备份、差异备份以及增量备份的区别
- python_day4作业
- Ubuntu中添加应用程序快速启动器的方法
- tensorflow summary demo with linear-model
- 微信小程序 java高校科研管理系统
- Jquery UI 教程
- H264___DCT蝶形算法____理解
- pip install 安装的问题
- TTL与非门多余的输入端处置办法及其优缺点
- make px4fmu-v2_default报错:ninja:no work to do
- SYN480R模块解码EV1527教程
- 2022T电梯修理考试题库及模拟考试
- 《疯狂Java讲义(第4版)》-----第4章【控制台五子棋】
- 西安电子科技大学计算机研一水课答案整理
- 发现细分赛道:费控SaaS跨越资本寒冬