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配置页面

      

  • 相关阅读:
    ACM: Copying Data 线段树-成段更新-解题报告
    POJ 2488 A Knight's Journey
    POJ 3349 Snowflake Snow Snowflakes Hash
    POJ 2299 Ultra-QuickSort 归并排序、二叉排序树,求逆序数
    POJ 1035 Spell checker 简单字符串匹配
    POJ 3267 The Cow Lexicon 简单DP
    POJ 1459 Power Network 最大流(Edmonds_Karp算法)
    POJ 3687 Labeling Balls 逆向建图,拓扑排序
    HDU 1532 Drainage Ditches 最大流 (Edmonds_Karp)
    POJ 3026 Borg Maze bfs+Kruskal
  • 原文地址:https://www.cnblogs.com/pandj/p/9414426.html
Copyright © 2011-2022 走看看