Step 1: Create a directory where packages will be copied
[root@rhel7 ~]# mkdir /yum
Step 2: Now copy all the packages from DVD to /yum location
[root@rhel7 ~]# cp -r * /yum
Step 3: Now configure the repository file
[root@rhel7 yum]# vim /etc/yum.repos.d/sirat.repo
[sirat]
name=Standard Bank Limited
baseurl=file:///yum
gpgcheck=0
[root@rhel7 yum]#
---Following file is use when package will be in network location
[root@rhel7 ~]# vim /etc/yum.repos.d/server.repo
[server]
name= Siratun Jannat
baseurl= http://station.network0.example.com/content/rhel7.0/x86_64/dvd
gpgcheck= 0
Step 4: Now execute the following command to check that yum repository configured or not
[root@rhel7 ~]# yum clean all
[root@rhel7 ~]# yum repolist
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id repo name status
!sirat Standard Bank Limited 4,305
repolist: 4,305
[root@rhel7 yum]#
[root@rhel7 yum]# yum install ftp
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package ftp.x86_64 0:0.17-66.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================================
Package Arch Version Repository Size
================================================================================================================
Installing:
ftp x86_64 0.17-66.el7 sirat 61 k
Transaction Summary
================================================================================================================
Install 1 Package
Total download size: 61 k
Installed size: 96 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : ftp-0.17-66.el7.x86_64 1/1
Verifying : ftp-0.17-66.el7.x86_64 1/1
Installed:
ftp.x86_64 0:0.17-66.el7
Complete!
[root@rhel7 yum]#
Thats it !!!!!!!!!!!!!!