一、安装
1、下载
wget http://nginx.org/download/nginx-1.16.1.tar.gz
2、解压
tar -zxvf nginx-1.16.1.tar.gz
3、安装依赖
yum -y install pcre-devel
yum -y install openssl openssl-devel
4、编译安装
./configure
make
make install
5、默认安装位置
默认安装位置:
/usr/local/nginx/sbin
6、运行
cd /usr/local/nginx/sbin
./nginx
在浏览器中输入ip地址:

Nginx.png
8、修改Nginx配置
默认配置文件在/usr/local/nginx/conf
8.1、打开配置文件
vim /usr/local/nginx/conf/nginx.conf
8.2、修改配置文件
8.3、重新载入配置文件
./nginx -s reload