LNMP1.7 一键部署 MySQL 5.7 & PHP 7.4 & nginx
cd /usr/local/src
wget http://soft.vpser.net/lnmp/lnmp1.7.tar.gz -cO lnmp1.7.tar.gz && tar zxf lnmp1.7.tar.gz && cd lnmp1.7 && ./install.sh lnmp
4 - MySQL 5.7.30
10 - PHP 7.4.12
# 开放端口 or 禁用防火墙
firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --zone=public --add-port=3306/udp --permanent
systemctl disable firewalld.service
mysql -uroot -p
mysql> use mysql
Database changed
mysql> update user set host = '%' where user = 'root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> exit;
Bye
WordPress配置与安装
新建WordPress数据库
http://192.168.56.1/phpmyadmin/
创建wordpress数据库
下载配置WordPress
cd /usr/local/src
wget https://cn.wordpress.org/wordpress-6.2.2-zh_CN.tar.gz
tar -xzvf wordpress-6.2.2-zh_CN.tar.gz -C /home/wwwroot/default/
http://192.168.56.1/wordpress
cd /home/wwwroot/default/wordpress
vim /home/wwwroot/default/wordpress/wp-config.php
# 复制上图wp-config.php配置到文件后点击继续