|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
欢迎大家来到仓酷云论坛!纲目1、媒介
2、情况筹办
3、装置与设置Nginx
4、Nginx之反向代办署理
5、Nginx之负载平衡
6、Nginx之页面缓存
7、Nginx之URL重写
8、Nginx之读写分别 注,操纵体系为CentOS6.4x86_64,Nginx是版本是最新版的1.4.2,体系能够到这里下:http://www.centoscn.com/CentosSoft/iso/2013/0720/371.html
1、媒介
在后面的几篇博文中我们次要解说了Nginx作为Web办事器常识点,次要的常识点有nginx的实际详解、nginx作为web办事器的操纵解说、nginx作为LNMP架构的解说,不分明的博友能够转头看看,在这一篇博客中我们次要解说,nginx的反向代办署理、负载平衡、缓存、URL重写和读写分别详解。好了,上面我们来详细说一说。
2、情况筹办
1.操纵体系
2.软件版本
3.实行拓扑
注,实行拓扑见下文。
4.装置yum源
[size=1em][size=1em][root@nginx~]#rpm-ivhhttp://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
[size=1em][root@web1~]#rpm-ivhhttp://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
[size=1em][root@web2~]#rpm-ivhhttp://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
5.各节点工夫同步
[size=1em][size=1em][root@nginx~]#ntpdate202.120.2.101
[size=1em][root@web1~]#ntpdate202.120.2.101
[size=1em][root@web2~]#ntpdate202.120.2.101
6.封闭防火墙与SELinux
[size=1em][size=1em][root@nginx~]#serviceiptablesstop
[size=1em][root@nginx~]#chkconfigiptablesoff
[size=1em][root@nginx~]#getenforce
[size=1em]Disabled
[size=1em][root@web1~]#serviceiptablesstop
[size=1em][root@web1~]#chkconfigiptablesoff
[size=1em][root@web1~]#getenforce
[size=1em]Disabled
[size=1em][root@web2~]#serviceiptablesstop
[size=1em][root@web2~]#chkconfigiptablesoff
[size=1em][root@web2~]#getenforce
[size=1em]Disabled
3、装置Nginx
1.解压
[size=1em][size=1em][root@nginxsrc]#tarxfnginx-1.4.2.tar.gz
2.新建nginx用户与组
<divstyle="padding:0px;margin:0px;color:rgb(85,85,85);font-family:宋体,ArialNarrow,arial,serif;font-size:14px;line-height:28px;"><divclass="syntaxhighlighterbash"id="highlighter_73430"style="width:720px;padding:0px!important;margin:0.3em0px!important;border-top-left-radius:0px!important;border-top-right-radius:0px!important;border-bottom-right-radius:0px!important;border-bottom-left-radius:0px!important;border:0px!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;outline:0px!important;overflow-y:visible!important;overflow-x:auto!important;position:relative!important;right:auto!important;top:auto!important;vertical-align:baseline!important;box-sizing:content-box!important;font-family:Consolas,BitstreamVeraSansMono,CourierNew,Courier,monospace!important;font-size:1em!important;min-height:inherit!important;background-image:none!important;background-attachment:initial!important;background-size:initial!important;background-origin:initial!important;background-clip:initial!important;background-position:initial!important;background-repeat:initial!important;"><divclass="container"style="padding:0px!important;margin:0px!important;border-top-left-radius:0px!important;border-top-right-radius:0px!important;border-bottom-right-radius:0px!important;border-bottom-left-radius:0px!important;border:0px!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;outline:0px!important;overflow:visible!important;position:relative!important;right:auto!important;top:auto!important;vertical-align:baseline!important;width:auto!important;box-sizing:content-box!important;font-size:1em!important;min-height:inherit!important;background:none!important;"><divclass="linenumber1index0alt2"style="white-space:nowrap;padding:0px1em!important;margin:0px!important;border-top-left-radius:0px!important;border-top-right-radius:0px!important;border-bottom-right-radius:0px!important;border-bottom-left-radius:0px!important;border:0px!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;outline:0px!important;overflow:visible!important;position:static!important;right:auto!important;top:auto!important;vertical-align:baseline!important;width:auto!important;box-sizing:content-box!important;font-size:1em!important;min-height:inherit!important;background-image:none!important;background-attachment:initial!important;background-size:initial!important;background-origin:initial!important;background-clip:initial!important;background-position:initial!important;background-repeat:initial!important;">[root@nginxsrc] |
|