Nginx编译安装备忘

发布于 2013-08-24  154 次阅读


yum -y install gcc gcc-c++ autoconf automake libtool make subversion wget
yum -y install zlib zlib-devel openssl openssl-devel pcre-devel screen
groupadd -r nginx
useradd -s /sbin/nologin -g nginx -r nginx
id nginx
wget http://nginx.org/download/nginx-1.5.3.tar.gz
tar -zxvf nginx-1.5.3.tar.gz
cd nginx-1.5.3
screen -S nginx
./configure \--prefix=/usr \--with-ld-opt="-Wl,-rpath,$LUAJIT_LIB" \--sbin-path=/usr/sbin/nginx \--conf-path=/etc/nginx/nginx.conf \--error-log-path=/var/log/nginx/error.log \--pid-path=/var/run/nginx/nginx.pid \--user=nginx \--group=nginx \--with-http_ssl_module \--with-http_flv_module \--with-http_gzip_static_module \--http-log-path=/var/log/nginx/access.log \--http-client-body-temp-path=/var/tmp/nginx/client \--http-proxy-temp-path=/var/tmp/nginx/proxy \--http-fastcgi-temp-path=/var/tmp/nginx/fcgi \--with-http_stub_status_module \--add-module=/root/ngx_http_substitutions_filter_module \--add-module=/root/ngx_cache_purge-2.1 \--with-http_gzip_static_module \--with-http_realip_module \--with-ipv6 \--with-http_sub_module \--add-module=/usr/local/src/lua-nginx-module-0.9.1/ \--add-module=/usr/local/src/ngx_devel_kit-0.2.19/
make && make install 
cd /var/tmp mkdir nginx mkdir -p /home/cache/temp mkdir -p /home/cache/path chmod 777 /home/cache/temp chmod 777 /home/cache/path cd nginx mkdir client