<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
    <channel>
        <title>恐龙志 - evolve the web!</title>
        <link>http://www.w3cool.com/</link>
        <description>The Place where deploy our Ideas and Paranoeas!</description>
        <language>zh-cn</language>
        <copyright>Copyright 2010</copyright>
        <lastBuildDate>Sun, 16 Dec 2007 23:47:21 +0800</lastBuildDate>
        <generator>http://www.sixapart.com/movabletype/</generator>
        <docs>http://www.rssboard.org/rss-specification</docs>
        
        <item>
            <title>安装Nginx,最近在研究这个，鄙视用F5的</title>
            <description><![CDATA[<p>一、) 安装Nginx<br />
1.) 安装<br />
Nginx发音为[engine x]，是由俄罗斯人Igor Sysoev建立的项目,基于BSD许可。据说他当初是F5的成员之一，英文主页：http://nginx.net。俄罗斯的一些大网站已经使用它超过两年多了，一直表现不凡。<br />
Nginx的编译参数如下：<br />
[root@localhost]#./configure --prefix=/usr/local/server/nginx --with-openssl=/usr/include \<br />
--with-pcre=/usr/include/pcre/ --with-http_stub_status_module --without-http_memcached_module \<br />
--without-http_fastcgi_module --without-http_rewrite_module --without-http_map_module \<br />
--without-http_geo_module --without-http_autoindex_module</p>

<p>在这里，需要说明一下，由于Nginx的配置文件中我想用到正则，所以需要 pcre 模块的支持。我已经安装了 pcre 及 pcre-devel 的rpm包，但是 Ngxin 并不能正确找到 .h/.so/.a/.la 文件，因此我稍微变通了一下：</p>

<p>[root@localhost]#mkdir /usr/include/pcre/.libs/<br />
[root@localhost]#cp /usr/lib/libpcre.a /usr/include/pcre/.libs/libpcre.a<br />
[root@localhost]#cp /usr/lib/libpcre.a /usr/include/pcre/.libs/libpcre.la</p>

<p>然后，修改 objs/Makefile 大概在908行的位置上，注释掉以下内容：</p>

<p>./configure --disable-shared</p>

<p>接下来，就可以正常执行 make 及 make install 了。</p>

<p>2.) 修改配置文件 /usr/local/server/nginx/conf/nginx.conf<br />
以下是我的 nginx.conf 内容，仅供参考：</p>

<p>#运行用户<br />
user  nobody nobody;</p>

<p>#启动进程<br />
worker_processes  2;</p>

<p>#全局错误日志及PID文件<br />
error_log  logs/error.log notice;<br />
pid        logs/nginx.pid;</p>

<p>#工作模式及连接数上限<br />
events {<br />
        use epoll;<br />
        worker_connections      1024;<br />
}<br />
</p>]]></description>
            <link>http://www.w3cool.com/2007/12/16/nginxf5.html</link>
            <guid>http://www.w3cool.com/2007/12/16/nginxf5.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">系统|System</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">负载均衡|Nginx,AB</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">linux</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">负载均衡</category>
            
            <pubDate>Sun, 16 Dec 2007 23:47:21 +0800</pubDate>
        </item>
        
    </channel>
</rss>

