1.在安装Nginx之前,要确保已经安装了需要的软件:gcc、pcre-devel、zlib-devel、openssl-devel。如果没有安装,执行下面命令。
yum -y install gcc pcre-devel zlib-devel openssl openssl-devel
2、进入 /usr/local/文件夹
cd /usr/local
3、下载nginx
wget https://nginx.org/download/nginx-1.18.0.tar.gz
或者直接去官网下载:
https://nginx.org/en/download.html
选择合适的版本下载
4、解压nginx安装包
tar -zxvf nginx-1.18.0.tar.gz
5、进入解压后文件夹
cd nginx-1.18.0
6.配置安装参数
./configure --prefix=/usr/local/nginx
7.编译安装
make
make install
标签:centos,tar,部署,1.18,devel,nginx,usr,安装 From: https://www.cnblogs.com/mayyan/p/17115523.html