[root@localhost ~]# yum install gcc
Loaded plugins: product-id, refresh-packagekit, subscription-manager
Updating Red Hat repositories.
...(output ommited)
...
No package gcc available <-- here i'm try to install pacakage called 'gcc'
Error: Nothing to do
[root@localhost ~]#
reason is we do not have access to RHN
Solution :- use DVD as base repository
[1]switch to the root
[shehan@localhost ~]$ su -Password:
[root@localhost ~]#
[2]Create DVD based repo
[root@localhost ~]# vim /etc/yum.repos.d/iso.repoFollowing text should be added to above file (iso.repo)
[base]
name=CDROM
baseurl=file:///mnt/cd/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[3]mount installation DVD
make a directory called /mnt/cd and it should be similar to baseurl
[root@localhost ~]# mkdir /mnt/cd
[root@localhost ~]# mount /dev/cdrom /mnt/cd
[4]now try previous command again. it should work !
[root@localhost ~]# yum install gcc
---
tips :- How to mount iso image ??
baseurl of " iso.repo " file should be changed as
file://mnt/iso/Server ( I created /mnt/iso directory)
mount command is
mount -o loop /home/shehan/redhatiso/h-rel62x6.iso /mnt/iso
it's worked ,,Thank you :)
ReplyDelete