CentOS 7系统安装Ghost

作者:chszs,未经博主允许不得转载。经许可的转载需注明作者和博客主页:http://blog.csdn.net/chszs

一、Ghost介绍

Ghost是一个开源、免费的博客平台,它基于Node.js构建,设计目标是简化在线发布博客的过程。
本文主要讲述怎样在CentOS 7上安装Ghost。

二、安装过程

1、首先确保所有的系统包为最新

# yum -y update

2、安装LAMP服务器

安装基本的LAMP环境是必须的,LAMP是指Linux、Apache、MariaDB、PHP。

1)安装Apache服务器

# yum install httpd openssl mod_ssl

重启Apache服务器

# systemctl restart httpd
# systemctl status httpd
# systemctl enable httpd

2)安装MariaDB数据库

# yum install mariadb mariadb-server mysql

默认情况下,MariaDB并不够安全,故应该修改其默认配置来加固其安全。使用mysql_secure_installation脚本,并注意以下的步骤细节,比如设置root账户的密码、移除匿名用户、不允许root账户远程登录、移除test数据库和时序安全访问MariaDB等。

# mysql_secure_installation

像这样进行配置:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

下一步需要登录到MariaDB控制台并为WikkaWiki创建一个数据库。运行以下命令:

# mysql -u root -p

重启MariaDB

# systemctl restart mariadb
# systemctl status mariadb
# systemctl enable mariadb

3)安装PHP

# yum install php php-mysql

如果PHP应用还需要一些扩展模块,可以选择安装,如下:

php-bcmath          : A module for PHP applications for using the bcmath library
php-cli             : Command-line interface for PHP
php-common          : Common files for PHP
php-dba             : A database abstraction layer module for PHP applications
php-devel           : Files needed for building PHP extensions
php-embedded        : PHP library for embedding in applications
php-enchant         : Enchant spelling extension for PHP applications
php-fpm             : PHP FastCGI Process Manager
php-gd              : A module for PHP applications for using the gd graphics library
php-intl            : Internationalization extension for PHP applications
php-ldap            : A module for PHP applications that use LDAP
php-mbstring        : A module for PHP applications which need multi-byte string handling
php-mysql           : A module for PHP applications that use MySQL databases
php-mysqlnd         : A module for PHP applications that use MySQL databases
php-odbc            : A module for PHP applications that use ODBC databases
php-pdo             : A database access abstraction module for PHP applications
php-pear.noarch     : PHP Extension and Application Repository framework
php-pecl-memcache   : Extension to work with the Memcached caching daemon
php-pgsql           : A PostgreSQL database module for PHP
php-process         : Modules for PHP script using system process interfaces
php-pspell          : A module for PHP applications for using pspell interfaces
php-recode          : A module for PHP applications for using the recode library
php-snmp            : A module for PHP applications that query SNMP-managed devices
php-soap            : A module for PHP applications that use the SOAP protocol
php-xml             : A module for PHP applications which use XML
php-xmlrpc          : A module for PHP applications which use the XML-RPC protocol

4)配置防火墙

CentOS 7的防火墙默认会阻塞一切,故必须在防火墙允许HTTP/HTTPS通过防火墙。执行命令:

# sudo firewall-cmd --permanent --zone=public --add-service=http
# sudo firewall-cmd --permanent --zone=public --add-service=https
# sudo firewall-cmd --reload

3、安装Node.js和npm

运行以下命令安装Node.js和npm:

# yum install nodejs npm --enablerepo=epel

验证安装是否正确,执行:

# node -v && npm -v
v0.10.26
1.3.6

4、安装Ghost

下载并解压Ghost:

# mkdir -p /var/www/html
# cd /var/www/html
# curl -L -O https://ghost.org/zip/ghost-latest.zip
# unzip -d ghost ghost-latest.zip
# cd ghost
# sudo npm install --production

Ghost安装完成后,进行配置并用主机的域名更新配置文件中的URL。

# cp config.example.js config.js

打开配置文件:

# nano config.js

找到“Production”节,用域名更新URL,修改后看起来如下:

// ### Production// When running Ghost in the wild, use the production environment.// Configure your URL and mail settings hereproduction: {url: 'http://your_domain',

至此完成了整个安装过程,可以启动Ghost了。

# npm start –production

三、访问Ghost

Ghost默认在HTTP 80端口下是可用的。所以打开浏览器,访问http://server-ip:2368,完成剩余的安装步骤。如果主机上使用了防火墙,需要允许2368端口通过。

CentOS 7系统安装Ghost相关推荐

  1. linux7系统能用ghost,CentOS 7系统安装Ghost博客平台

    一.Ghost介绍 Ghost是一个开源.免费的博客平台,它基于Node.js构建,设计目标是简化在线发布博客的过程. 本文主要讲述怎样在CentOS 7上安装Ghost. 二.安装过程 1.首先确保 ...

  2. centos linux7 系统安装

    centos linux7 系统安装 author:WYF 第一步把光盘放入服务器光驱内,服务器开机进去界面 第二部按F12或者F11进入安装选择界面 其中有三个选择 1.直接安装 centos li ...

  3. CentOS操作系统安装BT宝塔面板

    CentOS操作系统安装BT宝塔面板教程 服务器放行以下端口: 宝塔面板默认安装端口(TCP:8888) phpmyadmin端口(TCP:888) mysql端口(TCP:3306) 使用Xshel ...

  4. VM_Ware虚拟机+CentOS 7 系统安装教程

    镜像下载.域名解析.时间同步请点击 阿里云开源镜像站 VM_Ware虚拟机+CentOS 7 系统安装教程 0.安装环境 Windows 10 + vmware 15 + centos 7.9 1.准 ...

  5. CentOS 7系统安装配置图文详解

    一.安装CentOS 7 成功引导系统后,会出现下面的界面 界面说明: Install CentOS Linux 7 #安装CentOS 7 Test this media & install ...

  6. u 盘安装linux系统,CentOS 7 系统安装之 U 盘安装法

    [TOCM] 一.前言 家里闲置一台神州牌笔记本电脑,由于配置比较低,年代为古董级别,恋旧物情节严重,实在不忍心将其抛弃,于是乎,重新启用,安装 Linux 系统最小安装,用于测试程序开发调试,发挥余 ...

  7. windows10 Centos双系统安装且启动修复引导

    提醒:我是先安装Windows10,然后安装Centos7,这是方便引导的调整,我装了几次先装centos,然后再装win10,每次引导都会覆盖,出错. 一 安装Windows系统 1. U盘制作启动 ...

  8. CentOS 7系统安装配置图解教程

    操作系统:CentOS 7.3 备注: CentOS 7.x系列只有64位系统,没有32位.生产服务器建议安装CentOS-7-x86_64-Minimal-1611.iso版本 一.安装CentOS ...

  9. centos window系统安装django

    方法一:不使用虚拟环境 查看python安装路径 whereis python whereis python3 whereis python3.9#我的安装位置在usr/local/bin/pytho ...

最新文章

  1. sudo提权实战讲解 对用户对组的权限配置分析
  2. java王者归来pdf_《JAVA WEB整合开发王者归来》刘京华.pdf
  3. 串行 spi Flash 跨页编程的注意点
  4. c#动态修改代码的crackme
  5. was java heap space_实战项目中Java heap space错误的解决
  6. 图像中某点绕点旋转后的坐标,图像旋转坐标位置
  7. Hadoop不适合哪些场景 哪些场景适合?
  8. Android应用开发—RecyclerView绘制蒙层
  9. A*算法(一)算法导言
  10. python中and和or的惰性求值特点_python中的惰性求值
  11. c++学习笔记(13) 继承和多态
  12. Springboot创建webService接口时的cxfconfi文件报错出现DispatcherServletPath不能找到
  13. Windows Server AppFabric正式发布
  14. matlab 滤波器设计 coe_巴特沃斯滤波器
  15. Linux:chattr、lsattr、chage、history和/etc/login.defs解读
  16. 贪吃蛇html对战,贪吃蛇.html
  17. 江南鹤微信公众号文章采集器,开发完成了!以后再也不发愁采集微信公众号文章了!
  18. 计算机读不到u盘如何修复u盘,U盘读不出来怎么办?U盘无法读取修复方法
  19. Unity3D 参数曲线 实现曲线上的匀速运动
  20. 互联网晚报 | 10月10日 星期日 | 湖南卫视回应《快本》停播传言;淘特上线微信扫码付;SpaceX成全球第二大创业公司...

热门文章

  1. 巴厘岛旅行摄影调色效果lr预设
  2. 谈谈papi酱的价值
  3. 计算机counta函数怎么用,COUNTA函数的基本用法
  4. ctex安装及使用技巧
  5. 素描java字母_生成素描图片
  6. A股上市公司裁判文书数据
  7. JLINK SW接线方式
  8. 用Tab键的程序员为什么瞧不起用Space键的?
  9. Nancy和ASP.NET MVC的简单对比
  10. 微信分享自定义多次分享设置