公司内网yum源

新增yum源配置文件

vi /etc/yum.repos.d/szyum.repo

内容如下:

#【redhat6.3】
[base]
name=redhat63
baseurl=http://10.5.145.250/rhel63
gpgcheck=1
gpgkey=http://10.5.145.250/rhel63/RPM-GPG-KEY

#【redhat6.5】
[base]
name=redhat65
baseurl=http://10.5.145.250/rhel65
gpgcheck=1
gpgkey=http://10.5.145.250/rhel65/RPM-GPG-KEY

#【centos6.5】
[base]
name=centos65
baseurl=http://10.5.145.250/centos65
gpgcheck=1
gpgkey=http://10.5.145.250/centos65/RPM-GPG-KEY

#【centos7】
[base]
name=centos7
baseurl=http://10.5.145.250/centos7
gpgcheck=1
gpgkey=http://10.5.145.250/centos7/RPM-GPG-KEY

【suse11sp3】
列出已定义的仓库
# zypper repos
添加仓库
# zypper ar http://10.5.145.250/suse11sp3 suse11sp3
刷新仓库
# zypper ref
安装软件包
# zypper install {软件包名}

【注意】

1、清除/etc/yum.repos.d/**.repo文件:

rm -f /etc/yum.repos.d/*.repo
或
rename '*.repo' '*.repo.bak' *.repo

2、(内网忽略该步骤)开通外网云服务器访问yum源服务器的防火墙策略:
DMZ(外网云服务器IP)-->内网(10.5.145.250yum源服务器) 的80端口。

转载于:https://www.cnblogs.com/music378/p/7513423.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值