1、安装依赖包
yum install gcc openssl* pcre* zlib* libgd gd gd-devel
2、创建nginx用户
groupadd nginx
useradd -g nginx -d /usr/local/nginx
3、下载fair模块(http://wiki.nginx.org/HttpUpstreamFairModule)
wget gnosek-nginx-upstream-fair-a18b409.tar
4、编译
./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_spdy_module --with-http_stub_status_module --with-pcre --with-http_gunzip_module --with-http_gzip_static_module --with-openssl --pid-path=/usr/local/nginx/pid --add-module=/usr/local/nginx/gnosek-nginx-upstream-fair-a18b409/ --with-cc-opt=‘-O3‘ --with-file-aio --with-http_realip_module --with-http_image_filter_module --with-http_secure_link_module --without-poll_module --with-google_perftools_module
5、安装
make && make install
时间: 2024-10-10 01:04:55