centos yum安装nginx设置


centos yum安装nginx设置
 
手工编译安装nginx比较繁琐,我们可以通过centos的yum功能安装nginx,创建nginx.repo
 
vim /etc/yum.repos.d/nginx.repo
 
写入下列信息,
 
[nginx]
 
name=nginx repo
 
baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/
 
gpgcheck=0
 
enabled=1 
 
将OS替换成您的系统信息例如: centos、rhel
 
将OSRELEASE替换成您的系统版本,例如:5、6
 
然后运行
 
yum install nginx
 
就可以安装nginx了

相关内容

    暂无相关文章