首页 > 其他 > 详细

ngnix和负载均衡

时间:2017-11-06 19:41:57      阅读:201      评论:0      收藏:0      [点我收藏+]

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开头,服务端的问题

ngnix和负载均衡

原文:http://www.cnblogs.com/pythonclass/p/7794728.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!