Nginx 的编译安装
# tar zxvf nginx-0.6.29-tar.gz
# cd nginx-0.6.29
./configure \
"--prefix=/usr/local/nginx" \
"--sbin-path=/usr/local/nginx/sbin/nginx" \
"--conf-path=/usr/local/nginx/conf/nginx.conf" \
"--error-log-path=/usr/local/nginx/logs/error.log" \
"--http-log-path=/usr/local/nginx/logs/access.log" \
"--pid-path=/usr/local/nginx/var/nginx.pid" \
"--lock-path=/usr/local/nginx/var/nginx.lock" \
"--http-client-body-temp-path=/dev/shm//nginx_temp/client_body" \
"--http-proxy-temp-path=/dev/shm/nginx_temp/proxy" \
"--http-fastcgi-temp-path=/dev/shm/nginx_temp/fastcgi" \
"--user=www" \
"--group=www" \
"--with-cpu-opt=pentium4F" \
"--without-select_module" \
"--without-poll_module" \
"--with-http_realip_module" \
"--with-http_sub_module" \
"--with-http_gzip_static_module" \
"--with-http_stub_status_module" \
"--without-http_ssi_module" \
"--without-http_userid_module" \
"--without-http_geo_module" \
"--without-http_memcached_module" \
"--without-http_map_module" \
"--without-mail_pop3_module" \
"--without-mail_imap_module" \
"--without-mail_smtp_module" \
"--with-pcre"
# make
# make install
# mkdir /dev/shm/nginx_temp
注:有时会因为pcre编译不过去,需要修改一下 --with-pcre=/usr/local/src/pcre-7.8,前提是已经下载了pcre源码包,并解压,不需要编译pcre。
# cd nginx-0.6.29
./configure \
"--prefix=/usr/local/nginx" \
"--sbin-path=/usr/local/nginx/sbin/nginx" \
"--conf-path=/usr/local/nginx/conf/nginx.conf" \
"--error-log-path=/usr/local/nginx/logs/error.log" \
"--http-log-path=/usr/local/nginx/logs/access.log" \
"--pid-path=/usr/local/nginx/var/nginx.pid" \
"--lock-path=/usr/local/nginx/var/nginx.lock" \
"--http-client-body-temp-path=/dev/shm//nginx_temp/client_body" \
"--http-proxy-temp-path=/dev/shm/nginx_temp/proxy" \
"--http-fastcgi-temp-path=/dev/shm/nginx_temp/fastcgi" \
"--user=www" \
"--group=www" \
"--with-cpu-opt=pentium4F" \
"--without-select_module" \
"--without-poll_module" \
"--with-http_realip_module" \
"--with-http_sub_module" \
"--with-http_gzip_static_module" \
"--with-http_stub_status_module" \
"--without-http_ssi_module" \
"--without-http_userid_module" \
"--without-http_geo_module" \
"--without-http_memcached_module" \
"--without-http_map_module" \
"--without-mail_pop3_module" \
"--without-mail_imap_module" \
"--without-mail_smtp_module" \
"--with-pcre"
# make
# make install
# mkdir /dev/shm/nginx_temp
注:有时会因为pcre编译不过去,需要修改一下 --with-pcre=/usr/local/src/pcre-7.8,前提是已经下载了pcre源码包,并解压,不需要编译pcre。
none