• Centos 7 安装 wordpress
    [root@localhost ~]# yum -y install httpd php php-mysql mariadb mariadb-server
  • #编辑httpd的网页根目录,进行测试
    [root@localhost ~]# vim /var/www/html/index.php
    搭建wordpress_wordpress
    [root@localhost ~]# systemctl restart httpd
    [root@localhost ~]# netstat -anput | grep httpd
    tcp6 0 0 :::80 ::???? LISTEN 15871/httpd
  • 测试httpd
    -搭建wordpress_wordpress_02
  • 安装wordpress
    root@localhost ~]# cd /var/www/html/
    [root@localhost ~]# cp ‘/tmp/VMwareDnD/56cda4d0/wordpress-4.8.1-zh_CN.tar.gz’ ./
    [root@localhost ~]# tar xf wordpress-4.8.1-zh_CN.tar.gz
  • 访问wordpress
  • !在这里插入图片描述
  • 创建数据库,并创建管理员
    [root@localhost ~]# systemctl start mariadb.service
    [root@localhost ~]# mysql
    MariaDB [(none)]> create database wordpress charset utf8;
    MariaDB [(none)]> grant all on wordpress.* to ‘aaa’@‘localhost’ identified by ‘123’;
    MariaDB [(none)]> flush privileges;
    MariaDB [(none)]> quit
  • 再次访问wordpress
    搭建wordpress_wordpress_03
  • 设置权限
    [root@localhost ~]# chown -R apache:apache /var/www/html/wordpress
    [root@localhost ~]# systemctl restart httpd
  • 再次访问,重新刷新页面
    搭建wordpress_wordpress_04
    搭建wordpress_wordpress_05
  • 最后登录就ok了
    搭建wordpress_wordpress_06