一、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

 

posted @ 2017-12-27 19:02  卡莫  阅读(182)  评论(0编辑  收藏  举报