Why do we need to create repository?
The purpose of creating a repository is we wants to install offline. If we don't have an internet connection to external, we unable to download package by yum command. This time we can used local repository, in other word, yum install package from local disk. We have to mount it first, and used yum command it will automatic download from the mount place.Overall it 's a offline install package. I have provided RHEL 6 and RHEL 7.
------------------------------------RHEL7---------------------------------------
1)Create the new directory and mount the RHEL 7 DVD.
2)Navigate to /etc/yum.repos.d/ directory.
3) Create a new file with below contents with extension of “.repo” .
4) After Modify the file, please yum clean it
5)Done
reference: http://www.unixarena.com/2015/04/how-to-create-the-yum-repository-on-rhel-7.html
------------------------------------RHEL6---------------------------------------
1)Create the new directory and mount the RHEL 7 DVD.
[broexperts]
mediaid=XXXXXX.XXXX ==> look for mediaid (.diskinfo located in DVD)
name=Local Media Repo
baseurl=file:///dvd/
enabled=1
gpgcheck=0
Find what is our mediaid
Modify broexperts.repo
3. save and exit
reference: https://www.youtube.com/watch?v=NrwDVccKuKw
------------------------------------Let try to see if it work or not---------------------------------------
yum install httpd