Header Navigation

Tuesday, February 02, 2016

Change Yellowdog Updater Modifier (Yum) Repository on CentOS

Hi All, it's really boring to read certification book, and do anything. But If I go home, today I can't reach the goal for today. So I try to open ssh client and access my cent-OS server. When I want to Install pinfo in Cent-OS it's really long.. I think mirror choice server from Kartolo, then after yum clean all, I found from axarva, dionpe, and etc (Kind of server in Indonesia). I want to fix my repository server,  So I try to change my repository and steer static to Kambing server  (another sever in Indonesia).. If it's first time you hear about yum. I'll let you know for a little: Yum is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. for further information please visit: http://yum.baseurl.org/





So the step must we do:
  1. Go to Yum Repo directory, do command this
    $ cd /etc/yum.repos.d/ 
    $ ls -l
    After execute the command, you my find CentOS-Base.repo, the file is contained repo source and I want to modify so I just download repo from kambing repository

  2. Before modify the repository file, do copy first for backup
    $ cp CentOS-Base.repo CentOS-Base.repo.standard

  3. Then modify file CentOS-Base.repo, using vim editor
    $ vim CentOS-Base.repo 
    The output from the command:

  4. Now you can change mirrorlist to baseurl parameter in [base], [updates], [extras] with remove the sharp/hashtag icon and add kambing repo's url. Like below:

    Sample for [base] url on kambing website



    so I change the base url refer to kambing
    # CentOS-Base.repo
    #
    # The mirror system uses the connecting IP address of the client and the
    # update status of each mirror to pick mirrors that are updated to and
    # geographically close to the client.  You should use this for CentOS updates
    # unless you are manually picking other mirrors.
    #
    # If the mirrorlist= does not work for you, as a fall back you can try the
    # remarked out baseurl= line instead.
    #
    #
    
    [centosplus]
    name=Kambing-CentOS-Plus
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
    baseurl=http://kambing.ui.ac.id/centos/7.2.1511/centosplus/x86_64/
    enabled=1
    gpgcheck=1
    gpgkey=http://kambing.ui.ac.id/centos/RPM-GPG-KEY-CentOS-7
    
    #released updates
    [updates]
    name=Kambing-CentOS-Updates
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
    baseurl=http://kambing.ui.ac.id/centos/7.2.1511/updates/x86_64/
    enabled=1
    gpgcheck=1
    gpgkey=http://kambing.ui.ac.id/centos/RPM-GPG-KEY-CentOS-7
    
    #additional packages that may be useful
    [extras]
    name=Kambing-CentOS-Extras
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
    baseurl=http://kambing.ui.ac.id/centos/7.2.1511/extras/x86_64/
    enabled=1
    gpgcheck=1
    gpgkey=http://kambing.ui.ac.id/centos/RPM-GPG-KEY-CentOS-7
    
    After that, add some repo key, that kambing give like fasttrack, OS,
    
    [Fasttrack]
    name=Kambing-CentOS-Fastrack
    baseurl=http://kambing.ui.ac.id/centos/7.2.1511/fasttrack/x86_64/
    enabled=1
    gpgcheck=1
    gpgkey=http://kambing.ui.ac.id/centos/RPM-GPG-KEY-CentOS-7
    
    #released OS
    [OS]
    name=Kambing-CentOS-OS
    baseurl=http://kambing.ui.ac.id/centos/7.2.1511/os/x86_64/
    enabled=1
    gpgcheck=1
    gpgkey=http://kambing.ui.ac.id/centos/RPM-GPG-KEY-CentOS-7
    Then pres Esc button then type :wq
  5. After change repository script, you must clean all cache last repo before. with
    $ yum clean all
    then output should be appear

  6. Then download the list with command
    $ yum list
    When the server directed to kambing.ui, the output should be appear like below:

    No more server reachable information because there is one server to get installed file. 

I Hope it can help you to change your repository in your CentOS


1 comment:

  1. Great Article
    Cyber Security Projects

    projects for cse

    Networking Security Projects

    JavaScript Training in Chennai

    JavaScript

    Training in Chennai


    The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals,

    Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer.

    Angular Training

    ReplyDelete