在lnmp上搭建wordpress
在lnmp安装完成后。
准备好已经下载完成的wordpress包。
进入xshell用rz命令传送到虚拟机中,查看。
[root@localhost ~]# ls
anaconda-ks.cfg wordpress-5.3.2.zip
zip文件解压需要用yum安装unzip。
[root@localhost ~]# yum -y install unzip
将其解压到/data/server/中。
[root@localhost ~]# unzip -n wordpress-5.3.2.zip -d /data/server/
进入查看wordpress文件是否存在。
[root@localhost server]# ls
libmcrypt-2.5.8 mysql mysql-5.6.19 nginx nginx-1.11.5 php php-7.2.0 wordpress
将wordpress文件移动到nginx下的html中。查看。
[root@localhost server]# mv wordpress/ /data/server/nginx/html/
[root@localhost server]# cd /data/server/nginx/html/
[root@localhost html]# ls
1.php 50x.html index.html wordpress
查看wordpress中的文件并将wp-config-sample.php改名。
[root@localhost wordpress]# cp wp-config-sample.php wp-config.php
编辑文件,按照图片修改,保存退出。
[root@localhost wordpress]# vi wp-config.php
创建mysql数据库。
[root@localhost wordpress]# mysql -uroot -p
关闭防火墙,启动服务,浏览器访问IP/wordpress。