yum安装Nginx

2013-11-03 16:47:33

[开发运维 | Dev Ops] ,

Nginx在默认的yum 源里面是没有的,需要手动添加yum源, 也就是.repo 文件

yum源所在的目录一般情况下为,yum会读取里面所有以.repo结尾的文件

cd /etc/yum.repos.d/

 

创建一个以.repo结尾的文件,里面写上以下内容(请根据需要修改系统名称和版本号)

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/6/$basearch/
gpgcheck=0
enabled=1

 

用yum 安装

yum install nginx

 

完成!

 

 

 

这篇博文发表在 开发运维 | Dev Ops 目录下,标签为 ,
如需引用,请使用链接:https://note.mc256.dev/?p=13

This article published in 开发运维 | Dev Ops with tags , .
Cite this page using this link:https://note.mc256.dev/?p=13

您的邮箱地址不会被公开,评论使用Gravatar头像。
Your email address will not be published. This blog is using Gravatar.

正在提交评论... Submitting ...
正在为您准备评论控件 Loading Comment Plugin
Copyright © 2013-2024 mc256. All Rights Reserved.
Powered by WordPress on top of a dual-stack k3s Cluster using JuiceFS.
Wordpress Theme Designed By mc256.
Encrypted By Let's Encrypt.  Hosted On Linode + OVH + AWS.
DNS Provided By Hostker.
Status Page by CloudFlare Worker.