下载网站:Index of /download/
yum install -y gcc gcc-c++
yum install -y zlib-devel
yum install -y pcre pcre-devel
或者yum -y install gcc gcc-c++ make libtool zlib zlib-devel openssl openssl-devel pcre pcre-devel
tar -zxvf nginx-1.23.2.tar.gz
cd nginx-1.23.2
不需要SSL
./configure --prefix=/usr/local/nginx
需要SSL
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make
make install
./nginx
echo "/usr/local/lib" >> /etc/ld.so.conf
#立即生效 ldconfig
ps -ef | grep nginx
netstat -ntlp 查看端口
卸载nginx
./nginx -s stop
whereis nginx 或者 find / -name nginx
rm -rf 目录
yum remove nginx