ghost64怎么装linux,CentOS 7.5上安装Node.js搭建Ghost个人博客
Ghost简介
Ghost 是基于 Node.js 构建的开源博客平台,由前 WordPress UI 部门主管 John O’Nolan 和 WordPress 高级工程师(女) Hannah Wolfe 创立。Ghost 具有易用的书写界面和体验,博客内容默认采用Markdown 语法书写。Ghost 的目标是取代臃肿的 Wordpress。目的是为了给用户提供一种更加纯粹的内容写作与发布平台。
开始搭建Ghost博客系统
1、本机测试环境
[linuxidc@localhost ~]$ cat /etc/RedHat-release
CentOS Linux release 7.5.1804 (Core)
[linuxidc@localhost ~]$ uname -r
3.10.0-862.el7.x86_64
2、 安装Node.js
#更新yum源
[root@mingc ~]# sudo yum update -y
#安装软件组包Development Tools
[linuxidc@localhost ~]$ sudo yum groupinstall -y "Development Tools"
#安装NodeSource Node.js 6.x repo
[root@localhost ~]# curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
#yum安装 nodejs
[root@localhost ~]# yum -y install nodejs
#npm国内镜像(npm是随同NodeJS一起安装的包管理工具)
[root@localhost ~]# npm config set registry https://registry.npm.taobao.org
#安装cnpm模块(因为国内网络的关系,也同时安装了 cnpm 模块,后续将使用该命令代替 npm 命令。)
[root@localhost ~]# npm i -g cnpm
#通过node -v 和npm -v命令查看是否安装成功。
[root@localhost ~]# node -v
v6.14.4
[root@localhost ~]# npm -v
3.10.10
[root@localhost ~]#
3.、安装 Ghost
①安装 Ghost Client (ghost-cli)
[root@localhost ~]# cnpm i -g ghost-cli
#安装成功后通过运行 ghost -v,出现版本号即可表示安装成功。
[root@localhost ~]# ghost -v
Ghost-CLI version: 1.9.6
[root@localhost ~]#
②添加 Ghost 运行用户并创建目录
[root@localhost ~]# adduser ghost
[root@localhost ~]# mkdir /var/www
[root@localhost ~]# mkdir /var/www/ghost
[root@localhost ~]# chown ghost /var/www/ghost
③安装SQLite3 数据库
#新版本不允许root用户安装,需要切换普通用户进行安装。
[root@localhost ~]# su - ghost
[ghost@localhost ~]$ 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 v2.3.0
✔ Finishing install process
✔ Configuring Ghost
✔ Setting up instance
ℹ Ensuring user is not logged in as ghost user [skipped]
ℹ Checking if logged in user is directory owner [skipped]
✔ Checking current folder permissions
✔ Validating config
✔ Checking memory availability
✔ Starting Ghost
Ghost uses direct mail by default. To set up an alternative email method read our docs at https://ghost.org/mail
------------------------------------------------------------------------------
Ghost was installed successfully! To complete setup of your publication, visit:
④启动 ghost
安装成功后 Ghost 默认就已经启动的
# 停止host
[ghost@localhost ghost]$ ghost stop
✔ Stopping Ghost
# 启动ghost
[ghost@localhost ghost]$ ghost start
#重启ghos
[ghost@localhost ghost]$ ghost restart
安装成功后默认是运行在http://localhost:2368/
可使用如下方式访问:
[ghost@localhost ghost]$ curl http://localhost:2368/
4. 安装 Nginx和整合nodejs
[ghost@localhost ghost]$ su - root
[root@localhost ~]# yum install -y nginx
#启动 Nginx
[root@localhost ~]# systemctl start nginx.service
#查看nginx是否运行
[root@localhost ~]# ps -ef|grep nginx
#查看是否启动成功 http://你的ip
#设置开机自启动
[root@localhost ~]# systemctl enable nginx.service
#整合nodejs
[root@localhost ~]# cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.ori
[root@mingc nginx]# vi /etc/nginx/nginx.conf +47
server {
···
location / {
proxy_pass http://127.0.0.1:2368;
proxy_redirect default;
root /usr/share/nginx/html;
index index.html index.htm;
}
···
[root@localhost ~]# nginx -s reload
5. 访问搭建的ghost博客
前台页面:http://你的ip/
host博客
后台登录页面:http://你的ip/ghost
后台管理页面:
Ghost作为一个新兴的博客系统肯定会有一些不足,但是我们相信它会越来越好的,希望大家都能用它来记录生活中一些美好的时刻,分享自己的精彩的创意,共同建立并且维护这样一个和谐的互联网大家庭。
以上搭建过程本人亲自操作可用,有问题可留言评论。
ghost64怎么装linux,CentOS 7.5上安装Node.js搭建Ghost个人博客相关推荐
- centos+7.2+linux版本,在Linux Centos 7.2 上安装指定版本Docker。
相关资料链接: 先清空下"历史" yum remove docker \ docker-common \ docker-selinux \ docker-engine 安装必要的包 ...
- 如何在Linux上安装Node.js
Node.js简介 Node.js是一个基于JavaScript的开源平台,用于开发服务器端和网络应用程序. Node.js是跨平台的,因此以Node.js编写的应用程序可以在任何平台上运行.它是建立 ...
- (转)在Windows平台上安装Node.js及NPM模块管理
本文转载自:http://www.cnblogs.com/seanlv/archive/2011/11/22/2258716.html 之前9月份的时候我写了一篇关于如何在Windows平台上手工管理 ...
- 如何在Mac上安装Node.js和NPM
原作者:Dave McFarland 翻译转载:https://blog.teamtreehouse.com/install-node-js-npm-mac 如何在Mac上安装Node.js和NPM ...
- 在CentOS 7上安装Node.js的4种方法(yum安装和源码安装)
CentOS 7上的安装方法,其中涵盖了源码安装,已编译版本安装,EPEL(Extra Packages for Enterprise Linux)安装和通过NVM(Node version mana ...
- linux安装nodejs 7,在CentOS 7上安装Node.js的4种方法
Node.js和Javascript有着千丝万缕的联系,可以说Node.js让Javascript显得从未如此强大.好吧-微魔其实是个门外汉-但是这并不能阻碍微魔学习探索未知的信心~今天在国外闲逛,看 ...
- 在Windows平台上安装Node.js及NPM模块管理
1. 下载Node.js官方Windows版程序:http://nodejs.org/#download 从0.6.1开始,Node.js在Windows平台上提供了两种安装方式,一是.MSI ...
- mac 移动硬盘装linux系统安装教程,移动硬盘上安装Ubuntu系统
8种机械键盘轴体对比 本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选? https://lhy0609.github.io/ 这次瞎折腾的缘由一是一直想体验一下linux系统,到底好不好用,毕 ...
- linux上安装python2.6.9_在Linux CentOS 6.6上安装Python 2.7.9
CentOS 6.6自带的是Python 2.6.6,而编译llvm需要Python 2.7以上. checking for python... /usr/bin/python checking fo ...
- linux服务器新装hba卡,Linux系统上安装FC HBA卡驱动-weiyonghz-ChinaUnix博客
一.老版本的FC HBA卡驱动安装(qlinstall命令直接安装): 1.首先下载Qlogic HBA卡的驱动(qlafc-linux-8.02.23-3-install.tgz),上传到tmp目录 ...
最新文章
- 深度学习中IU、IoU(Intersection over Union)的概念理解以及python程序实现
- 华为鸿蒙官方翻译_鸿蒙系统官方译名来了?华为在欧盟注册Harmony商标
- 织梦DedeCMS自定义表单限制IP24小时只能提交多少次
- 17秋 软件工程 团队第五次作业 Alpha Scrum12
- WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
- 若依框架集成redis缓存
- python写脚本的优势_python写脚本的优势玩被叫
- html整体居中文字,html文字居中 html图片居中代码
- 蓝桥杯第七届省赛 模拟风扇控制系统 by YYC
- 当代计算机科学的先驱John Todd逝世
- 图像处理工具包实现应用图像效果
- 记录今天用ETL工具KETTLE遇到打不开job问题
- 台式机和台式计算机的区别,台式机和一体机区别是什么
- 高通Q888内核源码分析--概述篇
- 2020-03-26
- 双绞线与PCB差分信号布线
- 中国互联网25年:成也资本,败也资本!
- 网站关键词该如何优化?
- 微信小程序实现字体渐变
- 企业网站首页设计常见的6种布局方式
热门文章
- jQuery实现留言板
- Oracle数据库学习笔记(一)
- 学习笔记之《Android应用案例开发大全》(全部调试过代码)
- 佳能g2800加墨水后发生打印机错误5b00_备注!淳安县联想LJ4000D黑白激光打印机销售,县联想M7400Pro打印机长租...
- 简明python教程 沈洁元_Python简明教程-沈洁元
- 海军装备、舰船电子设备|环境可靠性试验|GJB150A\GJB4
- Everything 如何搜索共享文件夹的内容
- 定积分计算(谭浩强c语言第5版p272)
- java开发简历专业技能怎么写,附赠复习资料
- j2me怎么运行java_Eclipse开发J2ME环境安装及配置