在lnmp的基础上部署word press

word press

使用rz先将事先准备好的wordpress上传到centos7上
[[email protected] src]# rz
在lnmp的基础上部署word press
安装unzip,并将word press解压到/data/server下
yum -y install unzip
unzip wordpress-5.3.2.zip
mv wordpress /data/server/nginx/html/
cd wordpress/
mv * …/
然后修改配置文件
cd /data/server/nginx/html
cp wp-config-sample.php wp-config.php
vim wp-config.php
修改前
在lnmp的基础上部署word press
修改后
在lnmp的基础上部署word press
重启nginx

mysql数据库准备

登录mysql
[[email protected] html]# [[email protected] html]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 74
Server version: 5.5.22-log Source distribution
Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql>
创建wordpress的数据库
mysql> create database wordpress;
给wordpress创建用户并增加权限
mysql> grant all on wordpress.* to [email protected]‘localhost’ identified by ‘123’;
刷新权限
mysql> flush privileges;
关闭防火墙,主机浏览器访问并注册账号
在lnmp的基础上部署word press