Upgrading CentOS | Rhel in Offline Mode

Опубликовано: 20 Март 2026
на канале: Linux Keeda
5,407
35

In this video you will learn how to upgrade CentOS or rhel system using offline mode (for production environment)

Following are the steps so just copy and happy upgrading :)

Upgrading CentOS to v7.8

1. Login as Supersuer - su
2. Copy CentOS Latest Version to /tmp
3. mkdir /tmp/centos_77
4. md5sum /tmp/centos
5. check Version using cat /etc/centos-release
6. mount -t iso9660 -o loop,ro /tmp/CentOS-7-x86_64-DVD.iso /tmp/centos_77/
7. ls -al /tmp/centos_77/
8. mkdir /repo-bk
9. cd /etc/yum.repos.d
10. mv *.repo /repo-bk/
11. vim /etc/yum.repos.d/local.repo
12. Copy the following details to the vi editor.

[LocalRepo]
name=Local Repository
baseurl=file:///tmp/centos_77
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

13. yum clean all
14. yum check-update ( Make sure internet is off)
15. yum update -y



if you wish to delete & unmount image then follow these setps:

1. cd /
umount /tmp/centos_77
2. rm -rf /tmp//CentOS-7-x86_64-DVD.iso
rm -rf /tmp/centos_77
rm -rf /etc/yum.repos.d/*.repo
3. mv /repo-bk/* /etc/yum.repos.d/
rm -rf /repo.bk/
4. yum clean all
yum check-update









Music credit -

Music: Outside
Music: Sunny
Musician: @iksonofficial