当前位置: > CentOS > CentOS教程 >

CentOS7上安装WordPress

时间:2017-02-24 02:22来源:linux.it.net.cn 作者:IT

安装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;

配置phpMyAdmin

vi /etc/httpd/conf.d/phpMyAdmin.conf

将<Directory /usr/share/phpMyAdmin/>中的  Require ip 127.0.0.1  Require ip ::1  替换为Require all granted

重启Apache

systemctl restart httpd  systemctl enable httpd

下载WordPress

cd /var/www/html

文件夹粘贴到这,到浏览器访问即可

如遇到重启apache报错,可能是启动了多个服务,可重启云服务器主机,再启动 

(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容