安装epel# yum install epel-release 清除缓存目录下的软件包及旧的headers# yum clean all 安装基本组件(Apache、MariaDB、PHP)# yum install wget unzip httpd mariadb-server mariadb PHP php-mbstring php-MySQL php-gd phpmyadmin 配置MariaDB启动:systemctl start mariadb systemctl enable mariadb 给MariaDB的root用户设置密码:mysql_secure_installation 创建WordPress数据库登录数据库:# mysql -u root -p CREATE DATABASE wordpress; CREATE USER 'mm'@'localhost' IDENTIFIED BY 'mm'; GRANT ALL PRIVILEGES ON wordpress.* TO 'mm'@'localhost'; FLUSH PRIVILEGES; 配置phpMyAdminvi /etc/httpd/conf.d/phpMyAdmin.conf 将<Directory /usr/share/phpMyAdmin/>中的 Require ip 127.0.0.1 Require ip ::1 替换为Require all granted 重启Apachesystemctl restart httpd systemctl enable httpd 下载WordPresscd /var/www/html 文件夹粘贴到这,到浏览器访问即可 (责任编辑:IT) |