CentOS 安装 nginx
安装 nginx 是需主要依赖 pcre, openssl, zlib。
tar zxf nginx-1.8.0.tar.gz cd nginx-1.8.0 mkdir -p /usr/local/websrv/config/nginx groupmems -g wwww > /dev/null 2>&1 || groupadd wwww id www > /dev/null 2>&1 || useradd -M -s /sbin/nologin -g wwww www ./configure --prefix=/usr/local/websrv/program/nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-ipv6 --with-mail --with-mail_ssl_module --with-pcre=/vagrant/tmp/xfcnmp/source/pcre-8.38 --with-openssl=/vagrant/tmp/xfcnmp/source/openssl-1.0.2e --with-zlib=/vagrant/tmp/xfcnmp/source/zlib-1.2.8 --conf-path=/usr/local/websrv/config/nginx/nginx.conf --group=wwww --user=www --error-log-path=/usr/local/websrv/config/nginx/logs/error.log --http-log-path=/usr/local/websrv/config/nginx/logs/access.log --pid-path=/usr/local/websrv/config/nginx/logs/pid.txt --lock-path=/usr/local/websrv/config/nginx/logs/lock.txt make make install if [ -f /usr/bin/nginx ] ; then (rm -rf /usr/bin/nginx) fi ln -s /usr/local/websrv/program/nginx/sbin/nginx /usr/bin/nginx
安装源码下载