RedHat下用系统镜像配置本地yum源

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:342

RedHat下用系统镜像配置本地yum源

[font="][size=10.0pt]一、挂在本地ISO系统文件在系统中建立/Rethat_iso/iso文件#mkdir /Rethat_iso#mkdir /Rethat_iso/iso挂在本地iso文件(将rethat6.5镜像系统上传至/Rethat_iso/iso下)# mount -o loop -t iso9660/Rethat_iso/RetHat-server-6.5-x86_64-dvd.iso /Rethat_iso/iso ls #查看挂载目录,光盘挂载成功 [font="][size=10.0pt]二、配置本地yum源[size=11.0pt] #cd/etc/yum.repos.d/ #[size=11.0pt]进入[size=11.0pt]yum[size=11.0pt]配置目录[size=11.0pt] #mvrhel-source.repo rhel-source.repo.bak[size=11.0pt] #touch rhel.repo #[size=11.0pt]建立[size=11.0pt]yum[size=11.0pt]配置文件[size=11.0pt] #vi rhel.repo #[size=11.0pt]编辑配置文件,添加以下内容[size=11.0pt] [size=11.0pt] #[rhel]#自定义名称name=Red Hat EnterpriseLinux 6.5#本地光盘挂载路径 baseurl=file:///Rethat_iso/iso#启用yum源,0为不启用,1为启用 enabled=1#检查GPG-KEY,0为不检查,1为检查 gpgcheck=1#GPG-KEY路径 gpgkey=file:///Rethat_iso/iso/RPM-GPG-KEY-redhat-release [font="][size=10.0pt]三、清除yum缓存,使用yum install自动安装软件 yum cleanall #清除yum缓存 yum installphp #安装php[font="][size=10.0pt]四、设置开机自动挂载系统镜像文件[size=11.0pt]vim /etc/fstab[size=11.0pt]内如如下:注意文件路径和空格/ Rethat_iso /RedHat_Enterprise6.5x86_64.iso Rethat_iso/iso /iso9660 defaults,ro,loop 0 0

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】