Alma Linux 9 Tutorial - How to Create Local DVD YUM Repository - Setup Yum on Alma Linux 9
set up yum repository for locally-mounted DVD on Alma Linux 9
In this video we are going to see how to create local DVD yum repository using the available Alma linux 9 DVD iso file.
First step is we need to mount the DVD permanently in /media/mount_directory_name.
Second step is under /etc/yum.repos.d, we need to create one .repo or you can modify the available .repo file
and add the entries like this.
[LocalRepo] = Repository ID
name = Name of the repository
baseurl = Location of DVD Mount
Enabled = Enable repository
gpgcheck = Enable secure installation
gpgkey = Location of the key
steps:
mkdir /media/mount_directory_name
blkid -- copy uuid
edit /etc/fstab and add below line
UUID=XXXX-XX-XX-XX-XX-XX-XX /media/mount_directory_name iso9660 defaults 0 0
mount -a
systemctl daemon-reload
cd /etc/yum.repos.d/
vim local_dvd.repo and add below lines
[dvd-BaseOS]
name=DVD - BaseOS
baseurl=file:///media/mount_directory_name/BaseOS
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-XX
[dvd-AppStream]
name=DVD - AppStream
baseurl=file:///media/mount_directory_name/AppStream
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-XX
execute below commands
mount -a
systemctl daemon-reload
After that save the .repo file and execute the below commands to check DVD yum repository is available or not.
yum clean all -- will clear the cache.
yum repolist enabled ---lists the repositories available after clearing cache.
yum list --- will list down the packages or rpms available in the DVD.
yum update --- will update the packages.
yum install httpd --- To test I will be installing httpd server using this command.
#almalinux #almalinux9 #alma #linux #setupyum #linuxrepository #yumdvd #yumsetup