#官网地址 http://nginx.org/en/download.html
#安装依赖包 yum -y install pcre pcre-devel zlib openssl openssl-devel yum -y install gcc gcc-c++ yum -y install wget #下载nginx压缩包 wget http://nginx.org/download/nginx-1.20.2.tar.gz
#解压,创建用户 ls mv nginx-1.20.2.tar.gz /opt/ tar zxvf nginx-1.20.2.tar.gz useradd -s /sbin/nologin -M nginx
#安装目录在/usr/local/nginx cd nginx-1.20.2 ./configure --user=nginx --group=nginx --prefix=/usr/local/nginx --with-http_ssl_module --with-http_gzip_static_module --with-http_stub_status_module --with-pcre #编译安装 make && make install
#制作软连接 ln -s /usr/local/nginx/sbin/* /usr/local/bin/ cd /usr/local/nginx/sbin ./nginx nginx -V
#浏览器访问IP