Changing repository server
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2011
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Changing repository server

    Hi,
    I am new to fedora and actually Linux in general though i remember that in Ubuntu i could via UI change the main server that is used for checking update. Right now i am in china and the Chinese server are crazzly slow so is there a way to configure my Yum to use general server ?

    BTW i am using fedore 16 beta

    Thanks

  2. #2
    Join Date
    Aug 2009
    Posts
    9,444
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)

    Re: Changing repository server

    yes, there is a way.

    The server information is stored in the repo file for whatever repository that you are using.

    For example, the standard fedora repository is in the fedora.repo file, updates is in the fedora-updates.repo file and the testing updates is in the fedora-updates-testing.repo file. These files are located in /etc/yum.repos.d

    You can specify whatever server you wish to use in the baseurl line in the repo file. (If you wish to force it to use only that server, then you need to comment out the mirror url, and uncomment the baseurl lines)

    Here is the fedora.repo file for F16

    Code:
    [fedora]
    name=Fedora $releasever - $basearch
    failovermethod=priority
    #baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
    enabled=1
    metadata_expire=7d
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
    
    [fedora-debuginfo]
    name=Fedora $releasever - $basearch - Debug
    failovermethod=priority
    #baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch
    enabled=0
    metadata_expire=7d
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
    
    [fedora-source]
    name=Fedora $releasever - Source
    failovermethod=priority
    #baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch
    enabled=0
    metadata_expire=7d
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
    If the baseurl line is uncommented and the mirrorlist line is commented, then it would force yum to always use the download.fedoraproject.org server to download updates from. (The # at the beginning of a line means that line is a comment.)

    While forcing it to use a specific server means that if the server isn't available, then your update will fail. It also isn't a good idea to force a specific server because that places more stress on the server itself. It can't "load balance" requests by sending you off to a mirror site based on usage. But sometimes it is necessary to force it so the option is there to do so.

  3. #3
    Join Date
    Sep 2011
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Changing repository server

    Thanks Belton, Though it seems that i have the same fedora.repo as you have, i assumed that since i selected china when installing it would have added Chinese server by default.
    Strange thing is that on the ubuntu main server i was downloading up to 200kb/s even though the damn "great firewall" as i am right now making updates at 9kb/s

    I found this server in the mirror list http://fedora.mirror.nexicom.net/linux/, should i try to uncomment the basurl line and add this server as a mirror ? Or maybe you would have better idea on how i could increase my repo download speed ?

  4. #4
    Join Date
    Aug 2009
    Posts
    9,444
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)

    Re: Changing repository server

    there is a yum plugin that is supposed to measure mirror speeds and send you to the mirror that you get the faster speeds on. I used it for awhile, and while it delayed things right at the beginning of an update, it usually ended up saving time on most of the updates.

    You can try installing it and see if it helps you out before forcing it to use just one server. If it doesn't work, nothing lost, and you can just remove the plugin the same way you installed it. using yum.

    Edit: Forgot to tell you the package name You can install the package yum-plugin-fastestmirror
    Code:
    yum install yum-plugin-fastestmirror


    And yes, you could use that mirror url in the baseurl and force yum to use just that mirror. (assuming that they have the F16 repos defined since you are using F16.)

    change the baseurl line from

    Code:
    #baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
    
    to
    
    baseurl=http://fedora.mirror.nexicom.net/linux/releases/$releasever/Everything/$basearch/os/
    You must edit that file as root since it's a system file.
    Last edited by DBelton; 28th October 2011 at 03:50 PM.

Similar Threads

  1. How to create a local repository server
    By iosifidis in forum Using Fedora
    Replies: 4
    Last Post: 27th February 2010, 12:48 AM
  2. Problem Setting up local repository server
    By canmasagi in forum Servers & Networking
    Replies: 1
    Last Post: 14th January 2009, 08:49 AM
  3. Building a RPM-Repository server
    By CrasyHorse in forum Using Fedora
    Replies: 3
    Last Post: 23rd October 2008, 11:33 AM
  4. Changing the name of the server (FC6)
    By nomad in forum EOL (End Of Life) Versions
    Replies: 4
    Last Post: 17th January 2008, 06:17 AM
  5. Creating a YUM-Repository on a Windows FTP-Server
    By CrasyHorse in forum Using Fedora
    Replies: 10
    Last Post: 7th December 2007, 12:44 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •