Nginx tar download: nginx.org/download/

Download nginx-9.9.tar. gz to data directory (need to create data directory first)

1. Unpack the

The tar - ZXVF nginx - 1.9.9. Tar. GzCopy the code

2. Configure nginx

/configure --prefix=/data/nginx-1.9.9 make make installCopy the code

3. Check whether the installation is successful

CD/data/nginx - 1.9.9 / sbin/sbin/nginx - tCopy the code

If the following information is displayed, the installation is successful

nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
Copy the code