搭建wordpress

  • 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_第1张图片
    [root@localhost ~]# systemctl restart httpd
    [root@localhost ~]# netstat -anput | grep httpd
    tcp6 0 0 :::80 :: LISTEN 15871/httpd
  • 测试httpd
    -搭建wordpress_第2张图片
  • 安装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_第3张图片
  • 设置权限
    [root@localhost ~]# chown -R apache:apache /var/www/html/wordpress
    [root@localhost ~]# systemctl restart httpd
  • 再次访问,重新刷新页面
    搭建wordpress_第4张图片
    搭建wordpress_第5张图片
  • 最后登录就ok了
    搭建wordpress_第6张图片

你可能感兴趣的:(小白linux了解,linux,php,mysql,wordpress)