1.安装 PCRE pcre-devel
yum install -y pcre pcre-devel
2.安装 Zlib 库
yum install -y zlib zlib-devel
3.安装nginx包
wget -c https://nginx.org/download/nginx-1.19.6.tar.gz
4.拷贝压缩包至/usr/local/src/
cp nginx-1.6.2.tar.gz /usr/local/src/
5.解压并进入nginx目录
tar -zxvf nginx-1.19.6.tar.gz
cd nginx-1.19.6
6.使用nginx的默认配置
./configure
7.安装编译
make
make install
8.查找安装路径
whereis nginx
9.启动nginx
cd /usr/local/nginx/sbin
./nginx
10.关闭防火墙
systemctl stop firewalld --关闭防火墙
systemctl status firewalld -- 查看防火墙的状态
11.访问nginx
网友评论