RedHat 6.4使用Centos 6 的yum源 安装出错!!!
redhat吧
全部回复
仅看楼主
level 1
小湿活05 楼主
[root@localhost 下载]# yum makecache
找不到配置文件 /etc/yum/pluginconf.d/product-id.conf
找不到插件 product-id 的配置文件
找不到配置文件 /etc/yum/pluginconf.d/subscription-manager.conf
找不到插件 subscription-manager 的配置文件
已加载插件:fastestmirror
Repository base is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Loading mirror speeds from cached hostfile
错误:Cannot retrieve metalink for repository: epel. Please verify its path and try again
2015年04月22日 02点04分 1
level 1
Use a text editor such as vi:
# vi /etc/yum/pluginconf.d/product-id.conf /etc/yum/pluginconf.d/subscription-manager.conf
Setenabledto0as follows in both files:
[main]enabled=0
Save and close the file. Finally, type the following command to clean cache:
rm -rfv /var/cache/yum/*yum clean all
2017年04月25日 13点04分 2
level 9
第1步:首先咱们要进入到"/etc/yum.repos.d/"目录中(因为该目录存放着yum仓库的配置文件)
第2步:使用vim编辑器创建一个名为rhel7.repo的新配置文件(文件名称可随意,但后缀必需为repo),逐项写入配置参数并保存退出。
[rhel-media]:yum仓库唯一标识符,避免与其他仓库冲突。
name=linuxprobe :yum仓库的名称描述,易于识别仓库用处。。
baseurl=file:///media/cdrom :提供方式包括FTP(ftp://..)、HTTP(http://..)、本地(file:///..)
enabled=1 : 设置此源是否可用,1为可用,0为禁用。
gpgcheck=1 : 设置此源是否校验文件,1为校验,0为不校验。
gpgkey=file:///media/cdrom/RPM-GPG-KEY-redhat-release :若为校验请指定公钥文件地址。
第3步:按配置参数的路径将光盘挂载,并将光盘挂载信息写入到/etc/fstab文件中。
第4步:使用"yum install httpd -y"命令检查Yum仓库是否已经可用。
进入到/etc/yum.repos.d目录中后创建Yum配置文件:
[root@linuxprobe ~]# cd /etc/yum.repos.d/[root@linuxprobe yum.repos.d]# vim rhel7.repo[rhel7]name=rhel7baseurl=file:///media/cdromenabled=1gpgcheck=0
创建挂载点后进行挂载操作,并设置成开机自动挂载:
[root@linuxprobe yum.repos.d]# mkdir -p /media/cdrom[root@linuxprobe yum.repos.d]# mount /dev/cdrom /media/cdrommount: /dev/sr0 is write-protected, mounting read-only[root@linuxprobe yum.repos.d]# vim /etc/fstab/dev/cdrom /media/cdrom iso9660 defaults 0 0
尝试使用Yum仓库来安装Web服务,出现“Complete”则代表Yum仓库配置正确:
[root@linuxprobe yum.repos.d]# yum install httpdLoaded plugins: langpacks, product-id, subscription-managerrhel7 | 4.1 kB 00:00(1/2): rhel7/group_gz | 134 kB 00:00(2/2): rhel7/primary_db | 3.4 MB 00:00Resolving Dependencies……………………………………………………Complete!
希望我的回答能够帮到你,新手学习Linux可以关注---Linux就该这么学。一起加油学习吧。
2017年04月26日 08点04分 3
1