码迷,mamicode.com
首页 > 其他好文 > 详细

aliyun yum源的搭建

时间:2019-11-19 09:17:31      阅读:62      评论:0      收藏:0      [点我收藏+]

标签:follow   aliyun   package   epo   local   x86   enable   dia   str   

Redhat8.0系统
rpm -ivh https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm
Centos8.0系统
rpm -ivh https://mirrors.aliyun.com/centos/8.0.1905/extras/x86_64/os/Packages/centos-release-stream-8.0-0.1905.0.9.el8.x86_64.rpm
本地yum源搭建脚本
#/bin/bash
mount /dev/sr0 /mnt
cp -ra /mnt/media.repo /etc/yum.repos.d/local.repo

/etc/yum.repos.d/local.repo
echo ‘[BaseOS]‘ >> /etc/yum.repos.d/local.repo
echo ‘name=BaseOS‘ >> /etc/yum.repos.d/local.repo
echo ‘baseurl=file:///mnt/BaseOS‘ >> /etc/yum.repos.d/local.repo
echo ‘gpgcheck=0‘ >> /etc/yum.repos.d/local.repo
echo ‘gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release‘ >> /etc/yum.repos.d/local.repo
echo ‘enabled=1‘ >> /etc/yum.repos.d/local.repo
echo -n
echo ‘[AppStream]‘ >> /etc/yum.repos.d/local.repo
echo ‘name=AppStream‘ >> /etc/yum.repos.d/local.repo
echo ‘baseurl=file:///mnt/AppStream‘ >> /etc/yum.repos.d/local.repo
echo ‘enabled=1‘ >> /etc/yum.repos.d/local.repo
echo ‘gpgcheck=0‘ >> /etc/yum.repos.d/local.repo
echo ‘gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta‘ >> /etc/yum.repos.d/local.repo
yum repolist

aliyun yum源的搭建

标签:follow   aliyun   package   epo   local   x86   enable   dia   str   

原文地址:https://blog.51cto.com/10223750/2451149

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!