nginx-1.19.1编译安装
[root@centos8 ~]#cd /usr/local/src
[root@centos8 src]#tar xvf nginx-1.19.1.tar.gz
[root@centos8 src]#cd nginx-1.19.1
[root@centos8 nginx-1.19.1]#./configure --prefix=/apps/nginx --with-http_gunzip_module --with-http_ssl_module
[root@centos8 nginx-1.19.1]#yum install pcre-devel
[root@centos8 nginx-1.19.1]#yum -y install openssl-devel
[root@centos8 nginx-1.19.1]#make -j 4
[root@centos8 nginx-1.19.1]#make install
[root@centos8 nginx-1.19.1]#tree /apps
/apps
├── cmatrix
│ ├── bin
│ │ └── cmatrix
│ └── share
│ └── man
│ └── man1
│ └── cmatrix.1
└── nginx
├── conf
│ ├── fastcgi.conf
│ ├── fastcgi.conf.default
│ ├── fastcgi_params
│ ├── fastcgi_params.default
│ ├── koi-utf
│ ├── koi-win
[root@centos8 nginx-1.19.1]#echo 'PATH=/apps/nginx/sbin/:$PATH' > /etc/profile.d/nginx.sh
. /etc/profile.d/nginx.sh
[root@centos8 nginx-1.19.1]#which nginx
/usr/local/bin/nginx
刷新网络即可