zoukankan      html  css  js  c++  java
  • nginx *mysql

    必须是nginx 1.9以上版本

    ./configure --prefix=/export/servers/nginx --sbin-path=/export/servers/nginx/sbin/nginx --conf-path=/export/servers/nginx/conf/nginx.conf --error-log-path=/export/servers/nginx/logs/error.log --http-log-path=/export/servers/nginx/logs/access.log --pid-path=/export/servers/nginx/var/nginx.pid --lock-path=/export/servers/nginx/var/nginx.lock --http-client-body-temp-path=/dev/shm/nginx_temp/client_body --http-proxy-temp-path=/dev/shm/nginx_temp/proxy --http-fastcgi-temp-path=/dev/shm/nginx_temp/fastcgi --user=admin --group=admin --with-cpu-opt=pentium4F --without-select_module --without-poll_module --with-http_realip_module --with-http_sub_module --with-http_gzip_static_module --with-http_stub_status_module --without-http_ssi_module --without-http_userid_module --without-http_ssi_module --without-http_userid_module --without-http_geo_module --without-http_map_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --without-http_proxy_module --with-stream

    make && make install 

    user  admin;
    #user root;
    worker_processes  8;
    error_log  /export/Logs/servers/nginx/logs/error.log warn;
    pid        /var/run/nginx.pid;
     
    events {
        worker_connections  1024;
    }
     
    http {
        include       /etc/nginx/mime.types;
        default_type  application/octet-stream;
        log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                          '$status $body_bytes_sent "$http_referer" '
                          '"$http_user_agent" "$http_x_forwarded_for"';
        access_log  /export/Logs/servers/nginx/logs/access.log  main;
        sendfile        on;
        #tcp_nopush     on;
        keepalive_timeout  65;
        #gzip  on;
        include /etc/nginx/conf.d/*.conf;
    }
    stream{
            upstream mysql{
                   server 192.168.115.125:3358 weight=1;
                   
            }
            
            server{
                   listen 3358;
                   proxy_pass mysql;
            }
    }

    ------------------------------------------------------Tanwheey-------------------------------------------------------------------------

    爱生活,爱工作。

  • 相关阅读:
    HBase启动遇到Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0警告
    hadoop伪分布式安装之Linux环境准备
    个人作业收官——软件工程实践总结
    K米测试
    K米评测
    第三次作业-结对编程
    关于第二次作业的改进之处
    第二次作业——结对项目之需求分析与原型设计
    调研《构建之法》指导下的全国高校的历届软工实践作品
    PSP总结报告
  • 原文地址:https://www.cnblogs.com/Tanwheey/p/12177063.html
Copyright © 2011-2022 走看看