[SOLVED] Use fixed repository servers

General support questions
Post Reply
makhtux
Posts: 11
Joined: 2018/01/04 06:02:30

[SOLVED] Use fixed repository servers

Post by makhtux » 2018/01/12 18:07:58

Hi

I am a bit used to use fixed repositories using Debian. Just select the server giving good speed, and use it.

But here in centos, by default yum searches fastest mirror, which is hardly giving me speed of 10kbps. I am not using Centos much, but still, if I can use some fixed repos to update or install applications, kindly inform, ... I was unable to find the relevant documentation.

Thanks in advance.
Last edited by makhtux on 2018/01/24 17:54:20, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Use fixed repository servers

Post by TrevorH » 2018/01/12 18:16:12

Fastestmirror is a joke but it's required by yum so the best you can do is just disable it from /etc/yum/pluginconf.d/fastestmirror.conf and set enabled=0.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

makhtux
Posts: 11
Joined: 2018/01/04 06:02:30

Re: Use fixed repository servers

Post by makhtux » 2018/01/13 08:25:30

Hi

Sir!
Ok Sir, I think I can do that, but how to use some specific server? All I do in Debian is edit /etc.apt/sources.list:

Code: Select all

deb server/ stable main
... bingo, nothing else, but here I see:

Code: Select all

# ls /etc/yum.repos.d/
adobe-linux-x86_64.repo  CentOS-Media.repo    nux-dextop.repo
CentOS-Base.repo         CentOS-Sources.repo  skype-stable.repo
CentOS-CR.repo           CentOS-Vault.repo    teamviewer.repo
CentOS-Debuginfo.repo    epel.repo
CentOS-fasttrack.repo    epel-testing.repo
Lets see:

Code: Select all

# cat /etc/yum.repos.d/CentOS-Base.repo 
# 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.
#
#

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates 
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Going through:
https://www.centos.org/download/mirrors/

So I want to use... say:
http://mirror.optus.net/centos/

I only edit the mirrorlist above, to:

Code: Select all

http://mirror.optus.net/centos/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
and then yum update... or I need to edit some other options also (like GPG keys) together with disable?

Thankyou

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Use fixed repository servers

Post by TrevorH » 2018/01/13 10:33:49

You can comment out the mirrorlist= lines in the various /etc/yum.repos.d/*.conf files and uncomment the corresponding baseurl= lines and point those to your chosen mirror. However, based on personal experience at work where fastestmirror reliably picks a "fast" mirror as one that downloads at ~5KB/s, just disabling fastestmiror should be enough to get it to pick a more reliable one. The mirrorlist= line has it send a request for a list of mirrors and you are sent a list of ~10 that are geographically close to you based on geoip. With fastestmirror in the loop it then tests each of those and picks the one where a connect() returns the quickest. Without it, it uses the first one in the list.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply