redhat怎样搭建本地yum源
发布网友
发布时间:2022-02-27 03:29
我来回答
共2个回答
热心网友
时间:2022-02-27 04:59
如果你购买了正版的licence,可以直接用官方的yum,如果你没买,就直接搭建本地yum仓库吧。要说区别,因为版本不一样,部分rpm包不一样罢了,大多数是一样的。
热心网友
时间:2022-02-27 06:17
一、光驱挂载镜像
[root@getlnx06 ~]# mkdir /mnt/cdrom
[root@getlnx06 ~]# mount -t iso9660 /dev/cdrom /mnt/cdrom
mount: block device /dev/sr0 is write-protected, mounting read-only
二:配置本地YUM源
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
redhat.repo rhel-source.repo
[root@localhost yum.repos.d]touch rhel-media.repo
[root@localhost yum.repos.d]# vi rhel-media.repo
[media]
name=Red Hat Enterprise Linux 6.6
baseurl=file:///mnt/cdrom
enabled=1
gpgcheck=1
gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release
清除原有缓存
[root@localhost ~]# yum clean all
Loaded plugins: proct-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: media
Cleaning up Everything
三、验证yum配置是否成功
[root@localhost ~]# yum grouplist | grep Server
Network Infrastructure Server
Server Platform
Web Server
Backup Server
Directory Server
Identity Management Server
Network Storage Server
Print Server
Server Platform Development