[RPM,YUM]RHEL Centos mount local source / RHEL CentOS挂载本地源
RHEL:
使用YUM安装Oracle必要软件包,将操作系统ISO文件“rhel-server-6.5-x86_64.iso”分别上传至两个节点主机“/root”目录,以root用户登录,执行以下命令:
mount -o loop /root/rhel-server-6.5-x86_64-dvd.iso /mnt
配置YUM源参数文件,以root用户登录,编辑“/etc/yum.repos.d/local.repo”文件,增加本地YUM源信息,如下:
cd /etc/yum.repos.d/ mv rhel-source.repo rhel-source.repo.bkp vi /etc/yum.repos.d/local.repo [local] name=LOCAL baseurl=file:///mnt/Server/ enabled=1 gpgcheck=1 gpgkey=file:///mnt/RPM-GPG-KEY-redhat-release
CentOS:
[local-media] name=CentOS-$releasever - Media baseurl=file:///mnt/ gpgcheck=0 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
添加完成之后:
yum makecache yum install vim