私人Blog服务搭建

这是一个简单的架构主要是为了说明问题:如何搭建私人博客服务
采用的项目是wordpress官网下载的项目
项目版本:https://cn.wordpress.org/wordpress-4.9.4-zh_CN.tar.gz
系统是CentOS7-LNMP模式
基础环境:关闭安全机制
下载 nginxweb服务、mysql数据库、php语言解析库、php-mysql链接数据库工具、php-fpm(使nginx服务解析php语言库)
#yum install -y nginx mariadb mariadb-server php php-mysql php-fpm

安装《数据库缓存》减轻了数据库访问压力,提升了用户体验
缓存服务软件memcached 关联php服务软件:php-pecl-memcache
#yum -y install –enablerepo=rpmforge memcached php-pecl-memcache
#systemctl start memcached
#systemctl enable memcached
#systemctl reload nginx.service

安装《php二进制缓存》避免同样的代码重复编译,提高访问质量体验
#yum install -y php-xcache
#systemctl reload nginx.service

1、nginx部分:设置启动并开启自启动
#systemctl start nginx
#systemctl enable nginx
关于nginx配置文件部分请参考其它章节

2、mysql部分:设置启动并开启自启动
#systemctl # systemctl enable mariadbstart mariadb
#systemctl enable mariadb

3、上传项目到/usr/share/nginx/html 并授权777
上传就省略了;# chmod 777 /usr/share/nginx/html

4、给数据设置登录密码
#mysqladmin -uroot password '123'

5、创建项目使用的数据库
MariaDB [(none)]> create database wordpress;
Query OK, 1 row affected (0.00 sec)

6、创建一个专用的WordPress blog管理用户
MariaDB [(none)]> grant all on wordpress.* to wordpress@'localhost' identified by '123';
Query OK, 0 rows affected (0.00 sec)

7、测试登录
私人Blog服务搭建
私人Blog服务搭建
私人Blog服务搭建
私人Blog服务搭建
私人Blog服务搭建
私人Blog服务搭建
私人Blog服务搭建

转载于:https://blog.51cto.com/kangxi/2406492

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值