1、下载
wget http://nginx.org/download/nginx-1.23.1.tar.gz
2、 安装相关依赖包
- sudo apt-get install libpcre3 libpcre3-dev
- sudo apt-get install zlib1g zlib1g-dev
- sudo sudo apt-get install openssl
- sudo sudo apt-get install libssl-dev
3、 解压安装
- tar -zxvf nginx-1.18.0.tar.gz -C /opt/nginx-1.23.1
-
- cd /opt/nginx-1.23.1
- # 设置安装目录为/usr/local/nginx
- ./configure --prefix=/usr/local/nginx
- make
- make install
后续修改参考之前写过centos安装步骤