Create a local YUM Server on RHEL7

Himanshu Pratap
Dec 26, 2020

1. Mount RHEL DVD to the drive

#mount /dev/sr0 /cdrom

2. Copy content of Package folder in the DVD to local directory

#cd /cdrom/
#cp -rvf Packages/ /
#umount /cdrom
#chmod -R 755 /Packages

3. Create database for yum by using createrepo command

#createrepo /Packages/

4. create a local .repo file

#cd /etc/yum.repos.d/
#vim local.repo
[local]
name=local
baseurl=file:///Packages
enabled=1
gpgcheck=0

5. Update yum server

#yum clean all
#yum repolist all

6. Verify that yum is successfully configured

#yum install vsftpd

--

--