私人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

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服务搭建

猜你喜欢

转载自blog.51cto.com/kangxi/2406492
今日推荐