在lnmp的基础上部署word press
用YUM安装unzip,用来解包wordpress
[root@localhost ~]# yum -y install unzip
[root@localhost ~]# cd /usr/local/src
上传wordpress软件包
[root@localhost src]# rz
解包
== [root@localhost src]# unzip -n wordpress-5.3.2.zip -d /data/server/==
切换目录
[root@localhost src]# cd /data/server/wordpress/
[root@localhost wordpress]# ls
[root@localhost wordpress]# cd …
[root@localhost server]# ls
移动wordpress到/data/server/nginx/html目录下
== [root@localhost server]# mv wordpress/ /data/server/nginx/html/==
切换目录
== [root@localhost server]# cd /data/server/nginx/html/wordpress/
[root@localhost wordpress]# ls==
== [root@localhost wordpress]# cp wp-config-sample.php wp-config.php ==
修改配置文件
[root@localhost wordpress]# vi wp-config.php
登录到 mysql 中,创建 worepress 数据库
[root@localhost html]# mysql -u root -p
==编辑代码如下:创建wordpress的数据库mysql> create database wordpress;
给wordpress创建用户并增加权限mysql> grant all on wordpress.*to mysql@‘localhost’ identified by ‘123.com’;
刷新权限mysql> flush privileges;
mysql> exit flush privileges; ==
重置nginx
systemctl daemon-reload
关闭防火墙,主机浏览器访问并注册账号