zoukankan      html  css  js  c++  java
  • WordPress 开源博客搭建

    一、前提,在服务器上已经部署完成nginx + mysql + php 的环境,且通过web浏览器能访问到php页面。php测试可以正常访问到数据库

    二、部署整备:

      1、在MySQL中创建一个库

    [root@localhost html]# mysql -uroot -p     //连接数据库
    Enter password: 
    MariaDB [(none)]> show databases;        //查看当前数据库中有那些库
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | mysql              |
    | performance_schema |
    +--------------------+
    3 rows in set (0.00 sec)
    MariaDB [(none)]> create database wordpress;  //创建一个wordpress库
    Query OK, 1 row affected (0.00 sec)
    
    MariaDB [(none)]> show databases;
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | mysql              |
    | performance_schema |
    | wordpress          |
    +--------------------+
    4 rows in set (0.00 sec)
    MariaDB [(none)]> select user();             //查看当前管理库的用户
    +----------------+
    | user()         |
    +----------------+
    | root@localhost |
    +----------------+
    1 row in set (0.00 sec)
    MariaDB [(none)]> grant all on *.* to wordpress@'localhost' identified by '123456';       //创建一个wordpress用户并做一个授权
    Query OK, 0 rows affected (0.00 sec)
    MariaDB [(none)]> flush privileges;
    Query OK, 0 rows affected (0.00 sec)
    

      2、调整nginx的配置内容并重启nginx  /application/nginx/sbin/nginx -s reload

            location / {
                root   html;
                index  index.php index.html index.htm;
            }
    

      3、下载配置wordpress

    [root@localhost html] wget https://cn.wordpress.org/wordpress-4.5.1-zh_CN.tar.gz       //我这里的下载目镜是/home/pandj/tools
    [root@localhost html] cp -a wordpress/* /application/nginx/html/      //将workpress的配置文件放入nginx的/html目录下
    

      4、浏览器访问ip.进去wordpress配置页面

      

  • 相关阅读:
    IP地址和进制转换
    Cisco交换机常见配置
    macOS上的autoreconf错误导致无法安装问题
    LG P5147 随机数生成器
    LG P1879 [USACO06NOV]Corn Fields G
    LG P5017 [NOIP2018]摆渡车
    mysql触发器trigger详解
    MybatisPuls中QueryWrapper的select、update的用法
    @Transactional各属性详解
    Linux如何查看进程、杀死进程、启动进程等常用命令(包括常用的命令,如查看文件,修改文件读写权限、寻找文件等)
  • 原文地址:https://www.cnblogs.com/pandj/p/9414426.html
Copyright © 2011-2022 走看看