li
  当前位置:主页 > 集群技术 > 文章内容
li
nginx简明教程负载均衡和php解释
来源: www.ixdba.net  作者: IXDBA.NET官方    时间:2008-07-01   阅读:22  
本文章共5637字,分4页,当前第1页,快速翻页:
 

下载  wget http://sysoev.ru/nginx/nginx-0.5.35.tar.gz
 
解压后安装到/usr/local/nginx
./configure --with-http_ssl_module  --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_stub_status_module --prefix=/usr/local/nginx
make
make install
 
创建用户,建立web根目录
useradd -d /dev/null -s /sbin/nologin www
cd /
mkdir web
cd web
mkdir htdocs
cd /
chown -R www:www web
cd /usr/local/nginx
mkdir var
cd ..
chown -R www:www nginx
cd nginx
 
配置nginx.conf
vi /usr/local/nginx/conf/nginx.conf
内容示例为
user  www www;
worker_processes 2;
error_log  /usr/local/nginx/logs/error.log;
pid        /usr/local/nginx/var/nginx.pid;
worker_rlimit_nofile 51200;
events
{
       use epoll;
       worker_connections 51200;
}
http
{
       include       conf/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" ';
       access_log  /usr/local/nginx/logs/access.log  main;
 
       keepalive_timeout 30;
    
       tcp_nopush        on;
       tcp_nodelay       off;
 
       upstream test {
           server 127.0.0.1:81 fail_timeout=60;
           server 127.0.0.1:82 fail_timeout=60;
       }
 
       limit_zone  httplimit $binary_remote_addr 10m;
       server
       {
           listen       80;
           client_max_body_size  50M;
           server_name
www.2tutu.com 192.168.1.33;
           index index.php index.htm index.html;
           root  /web/htdocs;
           limit_conn httplimit 8;



阅读更多内容1 · 2 · 3 · 4 · 下一页>>


  上一篇: Red Hat集群(Cluster)套件介绍   下一篇: Linux下双网卡绑定为一块网卡实现...
li
 §相关评论  
 热点文章

·Linux RAC OCFS文件系统与INOD
·Oracle10g R2 Installing RAC
·Linux服务器集群系统(lvs)
·Linux对存储文件系统的技术架构
·linux常用集群文件系统简介
·如何选择合适的双机和集群软件
·LifeKeeper软件介绍
·纯软件方式的双机热备方案深入
·双机热备:基于共享存储与纯软
·双机热备与数据备份,数据安全的
·双机热备常见问题释疑
li
 编辑推荐
·Linux RAC OCFS文件系统与INOD
·Oracle10g R2 Installing RAC
·Linux服务器集群系统(lvs)
·Linux对存储文件系统的技术架构
·linux常用集群文件系统简介
·如何选择合适的双机和集群软件
·LifeKeeper软件介绍
·纯软件方式的双机热备方案深入
·双机热备:基于共享存储与纯软
·双机热备与数据备份,数据安全的
·双机热备常见问题释疑
li
 相关篇章
·Red Hat集群(Cluster)套件介绍
·redhat linux下GFS与RHCS安装日记
·oracle rac日常基本维护命令
·oracle 10g dataguard 在windows...
·Rose HA日常相关维护命令与技巧
·构建基于Linux具有高可用性的集群...
·硬件的负载均衡器和LVS实现负载均...
·Linux下多网卡实现负载均衡技术
·ORACLE FailSafe与rac(ops)的区别
·ROSE HA双机软件全程图解安装配置
·Linux下双网卡绑定为一块网卡实现...
·linux as5下双网卡绑定技术的实现...
·linux Bonding技术的实现
·使用IPMI工具实现对服务器的远程...
 
li
设为首页 | 关于我们 | 技术服务 | 收藏本站 | 网站地图 | 联系方式 | 本站友情连接