Compile Nginx service with CentOS

Source: Internet
Author: User

Download the nginx-1.0.0.tar.gz installation package andUnzip the installation package and move it to the/usr/local/nginx directory:

tar xvf nginx-1.0.0.tar.gzmv nginx-1.0.0.tar.gz nginx

2) Compile and install:

./configure --user=apache --group=apache --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/sbin --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/ --lock-path=/var/lock/subsys/nginx --with-http_gzip_static_module --http-client-body-temp-path=/var/cache/nginx/client_body_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --without-http_scgi_module --without-http_uwsgi_module --with-http_ssl_module --with-md5=/usr/lib/openssl/ --with-sha1=/usr/lib/openssl/ --without-http_fastcgi_modulemakemake install

3) create a cache folder and nginx STARTUP script, and set nginx startup:

Mkdir/var/cache/nginxwget (STARTUP script, download unzip to generate nginx file) cp nginx/etc/init. d/nginxchmod + x/etc/init. d/nginxchkconfig -- add nginxchkconfig -- level 2345 nginx on
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.