1、下载Nginx源码:
wget http://nginx.org/download/nginx-1.19.4.tar.gz
2、解压Nginx源码:
tar -zxvf nginx-1.19.4.tar.gz
3、安装相关依赖
sudo apt-get install openssl libssl-dev libpcre3 libpcre3-dev zlib1g-dev -y
4、进入nginx-1.19.4目录,进行配置
cd nginx-1.19.4
./configure --prefix=/home/lhy/nginx