centos 下的 nginx 安装与配置
- 下载最新版nginx nginx 1.12.0
- 依赖安装 yum -y install gcc gcc-c++ automake pcre pcre-devel zlib zlib-devel openssl openssl-devel
- 解压缩 tar -xf nginx-1.12.0.tar.gz
- ln -s nginx-1.12.0.tar.gz nginx
- cd nginx
./configure --prefix=/lnmp/nginx --with-http_ssl_module
- make
make install
<—————configure参数说明——————>
–prefix=path nginx安装路径
–sbin-path=path 启动程序路径
–pid-path=path pid路径
–error-log-path=path
–http-log-path=path acess.log
–user=name 用户
–group=name 用户组
–without-http_rewrite_module
–without-http_proxy_module
–without-http_gzip_module
–with-http_ssl_module