实现 wordpress 应用部署
范例:CentOS 8 利用RPM包部署wordpress
[root@centos8 ~]#dnf -y install httpd php php-json php-mysqlnd mariadb-server
[root@centos8 ~]#systemctl start httpd mariadb
[root@centos8 ~]#mysql
MariaDB [(none)]> create database wordpress;
MariaDB [(none)]> grant all on wordpress.* to wordpress@'localhost' identified by 'magedu';
[root@centos8 ~]#tar xvf wordpress-5.3-zh_CN.tar.gz
[root@centos8 ~]#mv wordpress/* /var/www/html/
[root@centos8 ~]#chown -R apache.apache /var/www/html/
#浏览器访问
http://LAMP服务器/wordpress
#安全加固
#用浏览器访问https://api.wordpress.org/secret-key/1.1/salt/,替代下面wp-config.php内容
[root@centos8 ~]#vim /var/www/html/wp-config.php
范例:CentOS 7 利用RPM包部署wordpress
#下载官网地址:https://cn.wordpress.org/
#解压缩WordPress博客程序到网页站点目录下
unzip wordpress-5.1.1-zh_CN.zip
mv wordpress /var/www/html/
#新建wpdb库和wpuser用户
mysql> create database wpdb;
mysql> grant all on wpdb.* to wpuser@'%' identified by "wppass";
setfacl –R –m u:apache:rwx /var/www/html/wordpress/
#或者chown –R apache.apache /var/www/html/wordpress
#打开http://LAMP服务器IP/wordpress进行页面安装
本文链接:http://www.yunweipai.com/36060.html
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/52440.html