一、将nginx-1.20.1.tar.gz上传至linux服务器目录下
二、将nginx安装包解压到/usr/local目录下
tar -zxvf /home/local/nginx-1.20.1.tar.gz -C /usr/local/
三、预先安装依赖
yum -y install pcre-devel
yum -y install openssl openssl-devel
yum -y install gcc gcc-c++ autoconf automake make
四、编译安装nginx
进入nginx的可执行目录下
cd /usr/local/nginx
./configure && make && make install
五、启动nginx
/usr/local/nginx/sbin/nginx