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
Nginx编译安装备忘
发布于 2013-08-24 154 次阅读
Comments 1 条评论
博客作者 风雨无间
这样就完整了
yum -y install gcc gcc-c++ autoconf automake libtool make subversion wget zlib zlib-devel openssl openssl-devel pcre-devel
groupadd -r nginx
useradd -s /sbin/nologin -g nginx -r nginx
id nginx
wget https://nginx.org/download/nginx-1.5.3.tar.gz
tar -zxvf nginx-1.5.3.tar.gz
cd nginx-1.5.3
#git clone git://github.com/yaoweibin/ngx_http_substitutions_filter_module.git
#svn checkout https://substitutions4nginx.googlecode.com/svn/trunk/substitutions4nginx-read-only
./configure –user=www –group=www –prefix=/usr/local/nginx –with-http_stub_status_module –with-http_ssl_module –with-http_gzip_static_module –with-ipv6 –with-http_sub_module –add-module=/root/ngx_http_substitutions_filter_module
./configure
make && make install