linux7系统能用ghost,CentOS 7系统安装Ghost博客平台
一、Ghost介绍
Ghost是一个开源、免费的博客平台,它基于ode.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
)安装PHP
# yum install php php-mysql
如果PHP应用还需要一些扩展模块,可以选择安装,如下:
php-bcmath : A module for PHP applicati 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 applicati
php-devel : Files needed for building PHP extensi
php-embedded : PHP library for embedding in applicati
php-enchant : Enchant spelling extension for PHP applicati
php-fpm : PHP FastCGI Process Manager
php-gd : A module for PHP applicati for using the gd graphics library
php-intl : Internationalization extension for PHP applicati
php-ldap : A module for PHP applicati that use LDAP
php-mbstring : A module for PHP applicati which need multi-byte string handling
php-mysql : A module for PHP applicati that use MySQL databases
php-mysqlnd : A module for PHP applicati that use MySQL databases
php-odbc : A module for PHP applicati that use ODBC databases
php-pdo : A database access abstraction module for PHP applicati
: 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 applicati for using pspell interfaces
php-recode : A module for PHP applicati for using the recode library
php-snmp : A module for PHP applicati that query SMP-managed devices
php-soap : A module for PHP applicati that use the SOAP protocol
php-xml : A module for PHP applicati which use XML
php-xmlrpc : A module for PHP applicati 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
、安装ode.js和npm
运行以下命令安装ode.js和npm:
# yum install nodejs npm --enablerepo=epel
验证安装是否正确,执行:
# node -v && npm -v
v0.10.26
1..6
4、安装Ghost
下载并解压Ghost:
# mkdir -p /var/www/html
# cd /var/www/html
# curl -L -O https://ghost/zip/ghost-latest.zip
# unzip -d ghost ghost-latest.zip
# cd ghost
# sudo npm install --production
Ghost安装完成后,进行配置并用主机的域名更新配置文件中的URL。
# cp 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 here
production: {
url: http://your_domain ,
至此完成了整个安装过程,可以启动Ghost了。
# npm start –production
三、访问Ghost
Ghost默认在HTTP 80端口下是可用的。所以打开浏览器,访问http://server-ip:268,完成剩余的安装步骤。如果主机上使用了防火墙,需要允许268端口通过。
#感谢您对电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格的认可,转载请说明来源于"电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格
上一篇:智能手机没电亏电了,怎么办?
下一篇:余额宝收益对比余利宝收益
推荐阅读
留言与评论(共有 20 条评论) |
本站网友 遇到未知的自己 | 8分钟前 发表 |
A module for PHP applicati which use the XML-RPC protocol 4)配置防火墙 CentOS 7的防火墙默认会阻塞一切,故必须在防火墙允许HTTP/HTTPS通过防火墙 | |
本站网友 面向 | 19分钟前 发表 |
本文主要讲述怎样在CentOS 7上安装Ghost | |
本站网友 yycf | 13分钟前 发表 |
# npm start –production 三 | |
本站网友 ald | 13分钟前 发表 |
PHP Extension and Application Repository framework php-pecl-memcache | |
本站网友 坐好我自己动 | 27分钟前 发表 |
一 | |
本站网友 阳江房地产 | 17分钟前 发表 |
# npm start –production 三 | |
本站网友 北京天之骄子 | 13分钟前 发表 |
所以打开浏览器,访问http | |
本站网友 万达电影城 | 21分钟前 发表 |
//ghost/zip/ghost-latest.zip # unzip -d ghost ghost-latest.zip # cd ghost # sudo npm install --production Ghost安装完成后,进行配置并用主机的域名更新配置文件中的URL | |
本站网友 宿主机 | 24分钟前 发表 |
A module for PHP applicati for using the bcmath library php-cli | |
本站网友 霉菌图片 | 14分钟前 发表 |
二 | |
本站网友 合肥小区地图 | 0秒前 发表 |
本文主要讲述怎样在CentOS 7上安装Ghost | |
本站网友 苹果系统升级 | 25分钟前 发表 |
Ghost介绍 Ghost是一个开源 | |
本站网友 绿地梧桐院 | 0秒前 发表 |
Modules for PHP script using system process interfaces php-pspell | |
本站网友 人民币兑美元升值 | 6分钟前 发表 |
# npm start –production 三 | |
本站网友 疤痕切除 | 13分钟前 发表 |
一 | |
本站网友 山东肥城吧 | 1分钟前 发表 |
//your_domain | |
本站网友 乐小米微博 | 7分钟前 发表 |
A module for PHP applicati that use LDAP php-mbstring | |
本站网友 疯狂抄手 | 25分钟前 发表 |
PHP FastCGI Process Manager php-gd | |
本站网友 五个基本建设 | 13分钟前 发表 |
MariaDB |