官网:http://nginx.org/en/download.html
[root@localhost local]# mkdir nginx
[root@localhost local]# cd nginx
[root@localhost nginx]# wget http://nginx.org/download/nginx-1.17.9.tar.gz
[root@localhost nginx]# yum install gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel
[root@localhost nginx]# tar -zxvf nginx-1.17.9.tar.gz
[root@localhost nginx-1.17.9]# cd nginx-1.17.9/
[root@localhost nginx-1.17.9]# ./configure
[root@localhost nginx-1.17.9]# make && make install
[root@localhost nginx-1.17.9]# cd /lib/systemd/system/
[root@localhost system]# vim nginx.service
[root@localhost nginx-1.17.9]# cd /lib/systemd/system/
[root@localhost system]# vim nginx.service
[root@localhost system]# systemctl enable nginx.service
[root@localhost system]# systemctl status nginx.service
[重启]
[root@localhost system]# pkill -9 nginx
[root@localhost system]# systemctl start nginx
[root@localhost system]# systemctl status nginx.service
[测试] 访问IP:80