yum和epel配置
ali yum配置
- vim /etc/yum.repos.d/yum.repo
- [base]
- #name=cdrom base
- name=aliyum base
- baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/
- #baseurl=file:///misc/cd
- gpgcheck=1
- gpgkey=https://mirrors.aliyun.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
- enabled=1
- yum clean all
- #清空本地yum缓存
- yum makecache
- #构建yum缓存
本地系统光盘yum仓库
挂载光盘
通过rpm包安装autofs包
进入misc目录下看是否挂载成功
- cd /misc
- cd cd
df命令查看挂载点
配置本地系统光盘yum仓库
- vim /etc/yum.repos.d/yum.repo
- [base]
- name=cdrom base
- #name=aliyum base
- #baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/
- baseurl=file:///misc/cd
- gpgcheck=0
- #gpgkey=https://mirrors.aliyun.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
- enabled=1
- yum clean all
- #清空本地yum缓存
- yum makecache
- #构建yum缓存
配置epel源
- vim /etc/yum.repos.d/epel.repo
- [base]
- name=epel
- baseurl=https://mirrors.aliyun.com/epel/7/x86_64/
- gpgcheck=1
- gpgkey=https://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-7
- enable=1
- yum clean all
- #清空本地yum缓存
- yum makecache
- #构建yum缓存
查看启动的yum
- yum repolist
转载于:https://blog.51cto.com/13586612/2372084