zoukankan      html  css  js  c++  java
  • WORDPRESS---搭建个人博客网站

    1. 数据库同在一台服务器安装wordpress
    [root@web01 blog]# rz -y
    [root@web01 blog]# unzip   wordpress-4.6.zip 
    [root@web01 blog]# mv wordpress-4.6.zip /tools/
    [root@web01 blog]# mv wordpress/* .
    [root@web01 blog]# chown -R nginx.nginx blog/
    [root@web01 blog]#  /application/nginx/sbin/nginx  -t
    [root@web01 blog]# /application/nginx/sbin/nginx  -s reload
     
    2. 数据库迁移操作,实现不同服务器搭建
    mysqldump -uroot -p123456 -A -B --events|gzip >/tmp/bak.sql.gz
    scp /tmp/bak.sql.gz root@172.16.1.51:/tools
    改hosts
    172.16.1.8      web01
    172.16.1.51     db01 db01.etiantian.org
     
    3.创建数据库用户和库
    mysql> create database wordpress;
    Query OK, 1 row affected (0.01 sec)
    mysql> grant all on wordpress.* to wordpress@'172.16.1.%' identified by 'oldboy123';
    Query OK, 0 rows affected (0.07 sec)
    mysql> flush privileges;
    Query OK, 0 rows affected (0.09 sec)
    mysql> quit
    Bye
     
     
     

    -------------------------------------------------------------------------------------------------

    Blog标签配置内容:
    server {
            listen       80;
            server_name  blog.etiantian.org;
                root   html/blog;
                index  index.php index.html index.htm;
     
            location / {
                if (-f $request_filename/index.html) {
                    rewrite (.*) $1/index.html break;
                    }
                if (-f $request_filename/index.php) {
                    rewrite (.*) $1/index.php;
                    }
                if (!-f $request_filename) {
                    rewrite (.*) $1/index.php;
                    }
                  }
     
     
             location ~ .*.(php|php5)?$ {
                root html/blog;
                fastcgi_pass  127.0.0.1:9000;
                fastcgi_index index.php;
                include fastcgi.conf;
           }
     
    网页博客规则设置如下:
     

    /archives/%post_id%.html

  • 相关阅读:
    无法将类型为“xxxx”的对象强制转换为类型“Microsoft.SharePoint.WebPartPages.WebPart”。
    [win32 api] FindWindow FindWindowEx EnumChildWindows
    WPF线程中被修改后DataGrid数据不能及时更新的问题
    Android Adapter 与 Listview
    LINQ 查询操作及进行数据转换
    匿名方法lambda表达式
    WPF知识4 依赖属性
    LINQ 入门
    WPF绑定.NET对象(二)Visifire的数据绑定
    LINQ 查询操作中的类型关系
  • 原文地址:https://www.cnblogs.com/liuqiang0/p/8527926.html
Copyright © 2011-2022 走看看