Nginx下载地址:http://nginx.org/en/download.html
下载nginx源码包
[root@0003 src]# wget http://nginx.org/download/nginx-1.15.12.tar.gz
安装Nginx需要的依赖软件并安装
[root@Rain src]# yum install -y pcre pcre-devel zlib zlib-devel openssl openssl-devel gcc-c++
[root@Rain src]# tar zxf nginx-1.15.12.tar.gz
[root@Rain src]# cd nginx-1.15.9/
[root@Rain nginx-1.15.9]# ls
auto CHANGES CHANGES.ru conf configure contrib html LICENSE man README src
[root@Rain src]# ./configure
[root@Rain src]# make
[root@Rain src]# make install
启动Nginx
[root@Rain src]# cd /usr/local/nginx/sbin/
[root@Rain src]# ./nginx
[root@Rain src]# ss -antp | grep nginx
[root@nginx-node1 ~]# ss -antp | grep nginx
LISTEN 0 128 *:80 *:* users:(("nginx",pid=1155,fd=7),("nginx",pid=1153,fd=7))
LISTEN 0 128 *:8888 *:* users:(("nginx",pid=1155,fd=6),("nginx",pid=1153,fd=6))
LISTEN 0 128 *:443 *:* users:(("nginx",pid=1155,fd=8),("nginx",pid=1153,fd=8))
网友评论