Monday, 13 April 2015

Create Local Repo on CentOS 7


Hi, here I share how to create local repo on CentOS 7 to you. and absolutly here nothing difficult to do. You only need laptop and CentOS 7. without that, you really could not create local repo. LOL. just kidding. okay, let's moved.
  1. Create mount on your drive. example : I used my drive CDROM. sintaks is: mount /dev/sr0 /media/amril
  2.  Create folder on /etc/yum.repos.d with name "local.repo",sintaks is :   mkdir local.repo /etc/yum.repos.d
  3. run vi /etc/yum.repos.d/local.repo
[LocalRepo]
          name=Local Repository

          baseurl=file:/media/amril

          enabled=1

          gpgcheck=1

          gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

     4. save --> :wq 

     5. move to  yum.repos.d/Centos-Base and set enable=1 to enabled=0 on base url line.
       6. Finish. 

No comments:

Post a Comment