下载到linux和解压
1. 解压到自己想要得目录下面,如将tar上传到/usr/local.
tar -zxvf nginx....tar
2.到nginx-x目录里面去,执行(这里只配置了要安装到那个目录,根据需要进行其他配置)
./configure \ --prefix=/usr/local/nginx \ --pid-path=/var/run/nginx/nginx.pid \ --lock-path=/var/lock/nginx.lock \ --error-log-path=/var/log/nginx/error.log \ --http-log-path=/var/log/nginx/access.log \ --with-http_gzip_static_module \ --http-client-body-temp-path=/var/temp/nginx/client \ --http-proxy-temp-path=/var/temp/nginx/proxy \ --http-fastcgi-temp-path=/var/temp/nginx/fastcgi \ --http-uwsgi-temp-path=/var/temp/nginx/uwsgi \ --http-scgi-temp-path=/var/temp/nginx/scgi
3.还是nginx-x目录里面,执行:make&&make install