CentOS7快速安装Nginx

版本

nginx-1.19.0open in new window

首先安装所需依赖项

sudo yum install openssl openssl-devel pcre pcre-devel

安装Nginx

cd /usr/local
# 下载
wget http://nginx.org/download/nginx-1.19.0.tar.gz
tar -zxvf nginx-1.19.0.tar.gz
cd nginx-1.19.0
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make
sudo make install
cd ../nginx
# 启动
./sbin/nginx
更新日期:
作者: 丁乾文