zoukankan      html  css  js  c++  java
  • ngnix和负载均衡

    1 准备环境
    =====>part1:
    iptables -F
    #systemctl disable firewalld #开机默认关闭
    #systemctl stop firewalld #立即关闭
    #systemctl status firewalld

    setenforce 0
    #/etc/sysconfig/selinux
    #SELINUX=disabled
    =====>part2:
    配置ip

    2 安装软件包
    二进制方式安装
    yum install epel-release -y
    yum install nginx -y
    源码安装
    yum gcc-* glibc-* make libtool ncurse-devel pcre -y

    tar xvf nginx.....tar.gz
    cd nginx/
    #./configure --prefix=/usr/local/nginx --with-pcre=/usr/lib64/
    ./configure --prefix=/usr/local/nginx --without-http_rewrite_module
    make
    make install

    3 修改配置文件


    4 启动服务
    /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
    #/usr/local/nginx/sbin/nginx -s stop 关闭
    #/usr/local/nginx/sbin/nginx -s reload 重新加载配置文件


    补充:
    状态码:
    200 访问成功
    3开头,重定向
    4开头,客户端的问题
    5开头,服务端的问题

  • 相关阅读:
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    Python, pandas: how to sort dataframe by index// Merge two dataframes by index
    永久修改VS include目录
    <OFFER05> 05_ReplaceSpaces替换空格
    用二叉树进行排序 x (从小到大)
  • 原文地址:https://www.cnblogs.com/pythonclass/p/7794728.html
Copyright © 2011-2022 走看看