节点初始化

     1.时间同步 

     2.防火墙端口开放

     3.系统内核参数优化

     

搭建集群步骤注意事项_nginx

     

搭建集群步骤注意事项_nginx_02

     

搭建集群步骤注意事项_html_03

 mysql主从操作

       1.mysql创建用户和授权必须要用root用户登录

      

搭建集群步骤注意事项_nginx_04

      2.mysql导出数据库

     

搭建集群步骤注意事项_mysql_05

     

搭建集群步骤注意事项_nginx_06

    

搭建集群步骤注意事项_html_07

       3.配置mysql slave端 

       mysql>change master to master_host='192.168.1.102',master_user='slaveuser',master_password='a12345',master_port=3307,master_log_file='mysql-bin.000002',master_log_pos=120;

      

搭建集群步骤注意事项_nginx_08

      

搭建集群步骤注意事项_nginx_09

    7.手动初始化数据库数据

      

搭建集群步骤注意事项_html_10

 fdfs文件存储服务搭建排错

      1. 启停fdfs服务

      

搭建集群步骤注意事项_nginx_11

 

搭建集群步骤注意事项_nginx_12

    2.检查fdfs服务是否正常

     

搭建集群步骤注意事项_nginx_13

    

搭建集群步骤注意事项_html_14

   3.重启服务的步骤

     1.重启fdfs

      

搭建集群步骤注意事项_nginx_15

    2.重启调用fdfs的业务应用

     

搭建集群步骤注意事项_html_16

  fastfdfs集成web

        

搭建集群步骤注意事项_mysql_17

        在nginx中给fdfs模块单独配置一个server即可

        要实现HTTP下载必须要求Nginx和fastdfs-nginx-module结合起来

server {
        listen       8999;
        server_name  localhost;



        error_page 400 /400.html;
        error_page 404 /404.html;
        error_page 413 /413.html;
        error_page 502 /50x.html;
        error_page 504 /50x.html;
        location ~/group[0-9]/ {
           #limit_conn one 10;
           limit_rate 10240k;
           ngx_fastdfs_module;

        }
        #charset koi8-r;

        #access_log  logs/host.access.log  main;

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

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }

nginx.conf