目录
一、准备
1.可以ping通外网(dhcp手动获取)
2.关闭防火墙(iptables、setenforce、systemctl firewalld)
3.yum通过CentOS-Base.rope获取仓库
二、部署wordpress论坛,并实现正常访问登录论坛。
[root@localhost ~] yum -y install https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-7.rpm
[root@localhost ~] yum -y install php56-php php56-php-mysqlnd
[root@localhost ~] systemctl enable --now httpd #http安装完成
[root@localhost ~] yum -y install mariadb-server
[root@localhost ~] systemctl enable --now mariadb
[root@localhost ~] mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.68-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> create database wordpress; #安装数据库
Query OK, 1 row affected (0.01 sec)
MariaDB [(none)]> grant all on wordpress.* to wordpress@'10.0.0.%' identified by 'skl2023'; #创建书库和用户
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit
Bye
[root@localhost ~] wget https://cn.wordpress.org/latest-zh_CN.zip
[root@localhost ~] unzip latest-zh_CN.zip
[root@localhost ~] mv wordpress/ /var/www/html/
[root@localhost ~] chown -R apache.apache /var/www/html/
三、 主配置文件
[root@localhost wordpress]# vim wp-config-sample.php