YUM repository configure

 Configuring YUM server in RHEL 7.0


It is a local repository server.

Follow below steps to configure the repository server.


Step1: Mount the ISO image into a local folder. 


[root@localhost /] # mount -o loop /dev/sr0 /iso_image 


Remember to create the folder iso_image in /


Step2: See the contents.


[root@localhost /iso_image] # ls

addons images    Packages                 RPM-GPG-KEY-redhat-release

EFI     isolinux    release-notes            TRANS.TBL

EULA    LiveOS      repodata

GPL     media.repo  RPM-GPG-KEY-redhat-beta


Step3: Run below command


[root@localhost /iso_image] # createrepo /iso_image/Packages


Step4: go to /etc/yum.repos.d/ directory


[root@localhost /etc/yum.repos.d] # vi local.repo


[Local] [ID-must be 1 word similar to file name]

name=LocalRepository [name it as your wish]

baseurl=file:///iso_image/Packages [put the local repository file path]

enabled=1

gpgcheck=0


:wq!


Step5: Run below commands.


 [root@localhost /etc/yum.repos.d] # yum clean all


 [root@localhost /etc/yum.repos.d] # yum list all


 [root@localhost /etc/yum.repos.d] # yum install ntp*  [ To check if you can install any package or not.]


*** Let me know if you have any query. 

Comments

Popular posts from this blog

Disabling Zimbra's AntiSpam, Amavis and AntiVirus filtering

Cambium cnPilot E400/E410/E500 Configuration Tutorial

Error "Unable to retrive Zimbra GPG key for package validation"