yum仓库配置

扫描光驱的命令别名
alias scandisk=‘echo - - - > /sys/class/scsi_host/host0/scan;echo - - - > /sys/class/scsi_host/host1/scan;echo - - - > /sys/class/scsi_host/host2/scan’
安装httpd开启服务共享文件
yum -y install httpd
systemctl ebable --able httpd
创建文件夹存放共享的文件
cd /var/www/html
mkdir centos/{7,8} -pv
把文件挂载到共享文件夹上面去
mount /dev/sr1 /var/www/html/centos/7
然后配置yum仓库
echo -e '[base]
name=Centos
baseurl=file:/// /var/www/html/centos/7
https://mirror.tuna.tsinghua.edu.cn/centos/ r e l e a s e v e r / o s / releasever/os/ releasever/os/basearch/
https://mirrors.huaweicloud.com/centos/ r e l e a s e v e r / o s / x 8 6 6 4 / o s / h t t p s : / / m i r r o r s . c l o u d . t e n c e n t . c o m / c e n t o s / releasever/os/x86_64/os/ https://mirrors.cloud.tencent.com/centos/ releasever/os/x8664/os/https://mirrors.cloud.tencent.com/centos/releasever/os/ b a s e r c h h t t p s : / / m i r r o r s . a l i y u n . c o m / c e n t o s / baserch https://mirrors.aliyun.com/centos/ baserchhttps://mirrors.aliyun.com/centos/releasever/os/ b a s e a r c h / g p g c h e c k = 0 [ e p e l ] n a m e = e p e l b a s e u r l = h t t p s : / / m i r r o r . t u n a . t s i n g h u a . e d u . c n / e p e l / basearch/ gpgcheck=0 [epel] name=epel baseurl=https://mirror.tuna.tsinghua.edu.cn/epel/ basearch/gpgcheck=0[epel]name=epelbaseurl=https://mirror.tuna.tsinghua.edu.cn/epel/releasever/ b a s e a r c h h t t p s : / / m i r r o r s . h u a w e i c l o u d . c o m / e p e l / basearch https://mirrors.huaweicloud.com/epel/ basearchhttps://mirrors.huaweicloud.com/epel/releasever/ b a s e a r c h h t t p s : / / m i r r o r s . c l o u d . t e n c e n t . c o m / e p e l / basearch https://mirrors.cloud.tencent.com/epel/ basearchhttps://mirrors.cloud.tencent.com/epel/releasever/ b a s e r c h h t t p s : / / m i r r o r s . a l i y u n . c o m / e p e l / baserch https://mirrors.aliyun.com/epel/ baserchhttps://mirrors.aliyun.com/epel/releasever/$basearch
gpgcheck=0

[extras]
name=extras
baseurl=https://mirror.tuna.tsinghua.edu.cn/centos/ r e l e a s e v e r / e x t r a s / releasever/extras/ releasever/extras/basearch
https://mirrors.huaweicloud.com/centos/ r e l e a s e v e r / e x t r a s / x 8 6 6 4 / o s h t t p s : / / m i r r o r s . c l o u d . t e n c e n t . c o m / c e n t o s / releasever/extras/x86_64/os https://mirrors.cloud.tencent.com/centos/ releasever/extras/x8664/oshttps://mirrors.cloud.tencent.com/centos/releasever/extras/ b a s e r c h h t t p s : / / m i r r o r s . a l i y u n . c o m / c e n t o s / baserch https://mirrors.aliyun.com/centos/ baserchhttps://mirrors.aliyun.com/centos/releasever/extras/$basearch
gpgcheck=0’

CentOS-Base.repo

查看是否已经成功配置
yum repolist

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值