nginx(一)--centos下yum源安装nginx

目录

1、建立repo文件

2、将下列信息写入其中

3、安装nginx


1、建立repo文件

在/etc/yum.repo.d/中建立nginx的repo文件。

touch /etc/yum.repo.d/nginx.repo

2、将下列信息写入其中

[nginx]

name=nginx repo

baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/

gpgcheck=0

enabled=1

OS对应着rhel和centos

OSRELEASE 对应着6或者7

选择合适的信息

3、安装nginx

yum install nginx

猜你喜欢

转载自blog.csdn.net/nowzhangjunzhe/article/details/84395637