2018年10月

一、Nginx 安装配置

1.下载并安装Nginx

[root@localhost ~]# yum -y install wget gcc gcc-c++ autoconf automake pcre pcre-devel zlib zlib-devel openssl openssl-devel

[root@localhost ~]# groupadd nginx
[root@localhost ~]# useradd -r -s /sbin/nologin -g nginx nginx -d /usr/local/nginx

[root@localhost ~]# wget https://nginx.org/download/nginx-1.15.3.tar.gz
[root@localhost ~]# tar zxvf nginx-1.15.3.tar.gz
[root@localhost ~]# cd nginx-1.15.3

[root@localhost nginx-1.15.3]# ./configure --prefix=/usr/local/nginx \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--pid-path=/var/run/nginx/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_gzip_static_module \
--http-log-path=/var/log/nginx/access.log \
--http-client-body-temp-path=/var/tmp/nginx/client/ \
--http-proxy-temp-path=/var/tmp/nginx/proxy/ \
--http-fastcgi-temp-path=/var/tmp/nginx/fcgi/

[root@localhost nginx-1.15.3]# make 
[root@localhost nginx-1.15.3]# make install

- 阅读剩余部分 -