首页 > 技术文章 > nginx安装

manongrensheng 2017-08-24 15:07 原文

1、下载nginx-1.12.1.tar.gz

2、解压,得到nginx-1.12.1目录

  tar -zxvf nginx-1.12.1.tar.gz

3、进入nginx目录

  #cd nginx-1.12.1

4、配置

  ./configure --prefix=/usr/local/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --pid-path=/usr/local/nginx/conf/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 --with-http_ssl_module

5、编译

  make

6、安装

  make install

推荐阅读