after we know about linux, sometimes we must know where location the
package installer it’s. this time we will discuss about how to setting
local repository, what is the repository? repository is a group of linux
installer package that stored in a server that can be accessed via
Internet or intranet, now how about someone who want install package and
they don’t have internet connection. for detail about repository will
discussed later, now we will explain how to setting repository from
cdrom . this is following step to setting local repository from ISO file :
1. copy iso file to /data/rhel-server-6.6-x86_64-dvd.iso
2. create directory /mnt
# mkdir mnt
# chmod -R 777 mnt
# df -kh
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 193G 90G 94G 49% /
tmpfs 9.3G 8.8M 9.3G 1% /dev/shm
/dev/sda1 194M 34M 151M 19% /boot
# cd /
# cd /
#
3.mounting ISO file to directory /mnt
# mount -o loop rhel-server-6.6-x86_64-dvd.iso /mnt
4. Checking mounting disk
# df -kh
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 173G 19G 146G 12% /
tmpfs 6.9G 148K 6.9G 1% /dev/shm
/dev/sda1 190M 32M 149M 18% /boot
/data/rhel-server-6.6-x86_64-dvd.iso
3.6G 3.6G 0 100% /mnt
5. backup yum.repos.d/rhel-source.repo
# cp /etc/yum.repos.d/rhel-source.repo /etc/yum.repos.d/rhel-source.repo.ori
6. check before edit /etc/yum.repos.d/rhel-source.repo
# cat /etc/yum.repos.d/rhel-source.repo
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
#baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/
baseurl=file:///media/RHEL_6.5\ x86_64\ Disc\ 1
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-source-beta]
name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/SRPMS/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
#
7. change location baseurl
baseurl=file:///mnt
8. check after edit /etc/yum.repos.d/rhel-source.repo
# cat /etc/yum.repos.d/rhel-source.repo
# cat /etc/yum.repos.d/rhel-source.repo
# cat /etc/yum.repos.d/rhel-source.repo
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
#baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/
#baseurl=file:///media/RHEL_6.5\ x86_64\ Disc\ 1
baseurl=file:///mnt
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-source-beta]
name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/SRPMS/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
#
9. Clean all
# yum clean all
# subscription-manager clean
All local data removed
10. test setting repository is succed you can check with install nmap
# yum install nmap
11. Check rhel version before upgrade
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)
# cat /etc/issue
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Kernel \r on an \m
# cat /etc/issue.net
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Kernel \r on an \m
# uname -r
2.6.32-431.el6.x86_64
# uname -a
Linux SAMLab 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
#
12. Upgrade RHEL/Redhat/Centos
# yum check-update
# yum list
# yum update -y
13. Check rhel version after upgrade
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.6 (Santiago)
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.6 (Santiago)
# cat /etc/issue.net
Red Hat Enterprise Linux Server release 6.6 (Santiago)
Kernel \r on an \m
# cat /etc/issue
Red Hat Enterprise Linux Server release 6.6 (Santiago)
Kernel \r on an \m
# uname -a
Linux SAMLab 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
# uname -r
2.6.32-431.el6.x86_64
#
Dear Team,
ReplyDeletePlease share us Red Hat Enterprise Linux Server release 6.6 (Santiago) iso path.