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

      

  • 相关阅读:
    vscode配置备份
    正则替换html代码中img标签的src值
    使用css3原生变量实现主题换肤
    vue3基础知识学习系列(二)响应式原理实现
    vue3基础知识学习系列(一)api使用
    eslint规则中文解释
    开发笔记:使用canvas实现3D金字塔比例图表📈
    实用网页UI调试技巧
    2020年特殊的一年,成就特殊的我们
    java设计模式之责任链模式
  • 原文地址:https://www.cnblogs.com/pandj/p/9414426.html
Copyright © 2011-2022 走看看