一、nginx 安装

添加官方 yum 源

1 vim /etc/yum.repos.d/nginx.rep

输入以下内容(OS为你的系统,OSRELEASE 系统版本)

1 [nginx]
2 name=nginx repo
3 baseurl=http://nginx.org/packages/mainline/OS/OSRELEASE/$basearch/
4 gpgcheck=0
5 enabled=1

列出可安装的 nginx

yum list |grep nginx

安装 nginx

1 yum install nginx 

查看安装版本以及编译参数

1 # 安装版本
2 nginx -v
3 # 编译参数
4 nginx -V
原文地址:https://www.cnblogs.com/jogen/p/8127273.html