Detailed process of CentOS compiling and installing Nginx

Detailed process of CentOS compiling and installing Nginx

1. Preparations 1.1. Install OpenSSL (search by yourself) 1.2, prepare pcre The library pere is for nginx to support regular expressions. It is just prepared, not installed, to avoid errors in 64-bit systems. wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz tar -zxf pcre-8.30 wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz tar -zxf pcre-8.30 1.3. Prepare the zlib library It is also just preparation, not installation, in order to avoid errors in 64-bit systems. wget http://sourceforge.net/projects/libpng/files/zlib/1.2.6/zlib-1.2.6.tar.gz/download tar -zxf zlib-1.2.6.tar.gz wget http://sourceforge.net/projects/libpng/files/zlib/1.2.6/zlib-1.2.6.tar.gz/download tar -zxf zlib-1.2.6.tar.gz 2. Compile and install 2.1. Download and create a temporary directory wget http://nginx.org/download/nginx-1.1.9.tar.gz tar -zxf nginx-1.1.9.tar.gz cd nginx-1.1.9 mkdir -p /var/tmp/nginx wget http://nginx.org/download/nginx-1.1.9.tar.gz tar -zxf nginx-1.1.9.tar.gz cd nginx-1.1.9 mkdir -p /var/tmp/nginx 2.2, compilation and installation ./configure –prefix=/usr/local/nginx \ –pid-path=/var/run/nginx.pid \ –lock-path=/var/lock/nginx.lock \ –with-http_ssl_module \ –with-http_dav_module \ –with-http_flv_module \ –with-http_realip_module \ –with-http_gzip_static_module \ –with-http_stub_status_module \ –with-mail –with-mail_ssl_module \ –with-pcre=../pcre-8.30 \ –with-zlib=../zlib-1.2.6 \ –with-debug \ –http-client-body-temp-path=/var/tmp/nginx/client \ –http-proxy-temp-path=/var/tmp/nginx/proxy \ –http-fastcgi-temp-path=/var/tmp/nginx/fastcgi \ –http-uwsgi-temp-path=/var/tmp/nginx/uwsgi \ –http-scgi-temp-path=/var/tmp/nginx/scgi make && make install ln -s /usr/local/nginx/sbin/nginx /usr/sbin/ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ./configure –prefix=/usr/local/nginx \ –pid-path=/var/run/nginx.pid \ –lock-path=/var/lock/nginx.lock \ –with-http_ssl_module \ –with-http_dav_module \ –with-http_flv_module \ –with-http_realip_module \ –with-http_gzip_static_module \ –with-http_stub_status_module \ –with-mail –with-mail_ssl_module \ –with-pcre=../pcre-8.30 \ –with-zlib=../zlib-1.2.6 \ –with-debug…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索