How do prevent yum from retrieving mirrorlist?
up vote
2
down vote
favorite
No, this is not a duplicate of disable YUM mirrorlist checking That question was solved by preventing update of all metadata. This is not what I want to do.
I am trying to build images behind a corporate firewall which restricts outside access. I have internal mirrors, to which I point the installer during kickstart. That part works. Image reboots. I have disabled all repos (even tried deleting the existing .repo files), and laid down a custom repo file pointing to our internal mirrors. I've put "enabled = 0" in the fastestmirror.conf file (verified it works, yum doesn't say it's loading the plugin any more), BUT I'm still getting this error, and yum bails out:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#7 - "Failed to connect to 2604:1580:fe02:2::10: Network is unreachable"
Well, yes, I know it is...that's why I disabled fastest mirror. I don't use the mirror list any more, because I've disabled all default repos.
I don't want to disable caching of metadata (nor do I want to extend its life, as was done in the above solution): I want metadata from our repos to be retrieved, but I don't want it to try to access the mirror list; there is no need.
Why is it still trying to access the mirror list? How can I disable that?
centos rhel yum
New contributor
add a comment |
up vote
2
down vote
favorite
No, this is not a duplicate of disable YUM mirrorlist checking That question was solved by preventing update of all metadata. This is not what I want to do.
I am trying to build images behind a corporate firewall which restricts outside access. I have internal mirrors, to which I point the installer during kickstart. That part works. Image reboots. I have disabled all repos (even tried deleting the existing .repo files), and laid down a custom repo file pointing to our internal mirrors. I've put "enabled = 0" in the fastestmirror.conf file (verified it works, yum doesn't say it's loading the plugin any more), BUT I'm still getting this error, and yum bails out:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#7 - "Failed to connect to 2604:1580:fe02:2::10: Network is unreachable"
Well, yes, I know it is...that's why I disabled fastest mirror. I don't use the mirror list any more, because I've disabled all default repos.
I don't want to disable caching of metadata (nor do I want to extend its life, as was done in the above solution): I want metadata from our repos to be retrieved, but I don't want it to try to access the mirror list; there is no need.
Why is it still trying to access the mirror list? How can I disable that?
centos rhel yum
New contributor
Have you tried runningyum clean all
andrm -rf /var/cache/yum
?
– Nasir Riley
Nov 21 at 0:51
Yes I have. Ran that after deleting the .repo files.
– Joshua Kugler
Nov 21 at 0:58
1
Very duct-tape-ish but have you considered redirecting DNS formirrorlist.centos.org
and pointing it to a local-to-you machine and have it serve up a list of your mirror(s)?
– ivanivan
Nov 21 at 2:20
1
Redirecting DNS would do the same thing as editing the file as I suggested below!
– Michael Prokopec
Nov 21 at 2:44
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
No, this is not a duplicate of disable YUM mirrorlist checking That question was solved by preventing update of all metadata. This is not what I want to do.
I am trying to build images behind a corporate firewall which restricts outside access. I have internal mirrors, to which I point the installer during kickstart. That part works. Image reboots. I have disabled all repos (even tried deleting the existing .repo files), and laid down a custom repo file pointing to our internal mirrors. I've put "enabled = 0" in the fastestmirror.conf file (verified it works, yum doesn't say it's loading the plugin any more), BUT I'm still getting this error, and yum bails out:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#7 - "Failed to connect to 2604:1580:fe02:2::10: Network is unreachable"
Well, yes, I know it is...that's why I disabled fastest mirror. I don't use the mirror list any more, because I've disabled all default repos.
I don't want to disable caching of metadata (nor do I want to extend its life, as was done in the above solution): I want metadata from our repos to be retrieved, but I don't want it to try to access the mirror list; there is no need.
Why is it still trying to access the mirror list? How can I disable that?
centos rhel yum
New contributor
No, this is not a duplicate of disable YUM mirrorlist checking That question was solved by preventing update of all metadata. This is not what I want to do.
I am trying to build images behind a corporate firewall which restricts outside access. I have internal mirrors, to which I point the installer during kickstart. That part works. Image reboots. I have disabled all repos (even tried deleting the existing .repo files), and laid down a custom repo file pointing to our internal mirrors. I've put "enabled = 0" in the fastestmirror.conf file (verified it works, yum doesn't say it's loading the plugin any more), BUT I'm still getting this error, and yum bails out:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#7 - "Failed to connect to 2604:1580:fe02:2::10: Network is unreachable"
Well, yes, I know it is...that's why I disabled fastest mirror. I don't use the mirror list any more, because I've disabled all default repos.
I don't want to disable caching of metadata (nor do I want to extend its life, as was done in the above solution): I want metadata from our repos to be retrieved, but I don't want it to try to access the mirror list; there is no need.
Why is it still trying to access the mirror list? How can I disable that?
centos rhel yum
centos rhel yum
New contributor
New contributor
New contributor
asked Nov 21 at 0:26
Joshua Kugler
111
111
New contributor
New contributor
Have you tried runningyum clean all
andrm -rf /var/cache/yum
?
– Nasir Riley
Nov 21 at 0:51
Yes I have. Ran that after deleting the .repo files.
– Joshua Kugler
Nov 21 at 0:58
1
Very duct-tape-ish but have you considered redirecting DNS formirrorlist.centos.org
and pointing it to a local-to-you machine and have it serve up a list of your mirror(s)?
– ivanivan
Nov 21 at 2:20
1
Redirecting DNS would do the same thing as editing the file as I suggested below!
– Michael Prokopec
Nov 21 at 2:44
add a comment |
Have you tried runningyum clean all
andrm -rf /var/cache/yum
?
– Nasir Riley
Nov 21 at 0:51
Yes I have. Ran that after deleting the .repo files.
– Joshua Kugler
Nov 21 at 0:58
1
Very duct-tape-ish but have you considered redirecting DNS formirrorlist.centos.org
and pointing it to a local-to-you machine and have it serve up a list of your mirror(s)?
– ivanivan
Nov 21 at 2:20
1
Redirecting DNS would do the same thing as editing the file as I suggested below!
– Michael Prokopec
Nov 21 at 2:44
Have you tried running
yum clean all
and rm -rf /var/cache/yum
?– Nasir Riley
Nov 21 at 0:51
Have you tried running
yum clean all
and rm -rf /var/cache/yum
?– Nasir Riley
Nov 21 at 0:51
Yes I have. Ran that after deleting the .repo files.
– Joshua Kugler
Nov 21 at 0:58
Yes I have. Ran that after deleting the .repo files.
– Joshua Kugler
Nov 21 at 0:58
1
1
Very duct-tape-ish but have you considered redirecting DNS for
mirrorlist.centos.org
and pointing it to a local-to-you machine and have it serve up a list of your mirror(s)?– ivanivan
Nov 21 at 2:20
Very duct-tape-ish but have you considered redirecting DNS for
mirrorlist.centos.org
and pointing it to a local-to-you machine and have it serve up a list of your mirror(s)?– ivanivan
Nov 21 at 2:20
1
1
Redirecting DNS would do the same thing as editing the file as I suggested below!
– Michael Prokopec
Nov 21 at 2:44
Redirecting DNS would do the same thing as editing the file as I suggested below!
– Michael Prokopec
Nov 21 at 2:44
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
I think this article will solve your issue here is the most relevant part first:
This should be where the mirror is:
baseurl=file:/share/CentOS/$releasever/os/$basearch/
If you want it not to look at all:
- Comment out the repo's
- Remove the baseurl's
- Move the whole file to a .bak version and delete the original.
Set up /etc/yum.repos.d/CentOS-Base.repo like:
[base]
name=CentOS-$releasever - Base
baseurl=file:/share/CentOS/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=1
priority=1
enabled=1
[updates]
name=CentOS-$releasever - Updates
baseurl=file:/share/CentOS/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=1
priority=1
enabled=1
[extras]
name=CentOS-$releasever - Extras
baseurl=file:/share/CentOS/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=1
priority=1
enabled=1
[centosplus]
name=CentOS-$releasever - Plus
baseurl=file:/share/CentOS/$releasever/centosplus/$basearch/
exclude=kernel*
gpgcheck=1
enabled=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=0
priority=1
[contrib]
name=CentOS-$releasever - Contrib
baseurl=file:/share/CentOS/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=0
priority=3
From Here: https://wiki.centos.org/HowTos/CreateLocalMirror
New contributor
He doesn't want to make a mirror (he's done that apparently) he wantsyum
to stop checking the list of available mirrors. Even blocking on a network level will generate his error.
– ivanivan
Nov 21 at 2:19
1
Then comment out the repos in that file. Like #[contrib] or remove the base url... @ivanivan
– Michael Prokopec
Nov 21 at 2:25
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
I think this article will solve your issue here is the most relevant part first:
This should be where the mirror is:
baseurl=file:/share/CentOS/$releasever/os/$basearch/
If you want it not to look at all:
- Comment out the repo's
- Remove the baseurl's
- Move the whole file to a .bak version and delete the original.
Set up /etc/yum.repos.d/CentOS-Base.repo like:
[base]
name=CentOS-$releasever - Base
baseurl=file:/share/CentOS/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=1
priority=1
enabled=1
[updates]
name=CentOS-$releasever - Updates
baseurl=file:/share/CentOS/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=1
priority=1
enabled=1
[extras]
name=CentOS-$releasever - Extras
baseurl=file:/share/CentOS/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=1
priority=1
enabled=1
[centosplus]
name=CentOS-$releasever - Plus
baseurl=file:/share/CentOS/$releasever/centosplus/$basearch/
exclude=kernel*
gpgcheck=1
enabled=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=0
priority=1
[contrib]
name=CentOS-$releasever - Contrib
baseurl=file:/share/CentOS/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=0
priority=3
From Here: https://wiki.centos.org/HowTos/CreateLocalMirror
New contributor
He doesn't want to make a mirror (he's done that apparently) he wantsyum
to stop checking the list of available mirrors. Even blocking on a network level will generate his error.
– ivanivan
Nov 21 at 2:19
1
Then comment out the repos in that file. Like #[contrib] or remove the base url... @ivanivan
– Michael Prokopec
Nov 21 at 2:25
add a comment |
up vote
1
down vote
I think this article will solve your issue here is the most relevant part first:
This should be where the mirror is:
baseurl=file:/share/CentOS/$releasever/os/$basearch/
If you want it not to look at all:
- Comment out the repo's
- Remove the baseurl's
- Move the whole file to a .bak version and delete the original.
Set up /etc/yum.repos.d/CentOS-Base.repo like:
[base]
name=CentOS-$releasever - Base
baseurl=file:/share/CentOS/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=1
priority=1
enabled=1
[updates]
name=CentOS-$releasever - Updates
baseurl=file:/share/CentOS/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=1
priority=1
enabled=1
[extras]
name=CentOS-$releasever - Extras
baseurl=file:/share/CentOS/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=1
priority=1
enabled=1
[centosplus]
name=CentOS-$releasever - Plus
baseurl=file:/share/CentOS/$releasever/centosplus/$basearch/
exclude=kernel*
gpgcheck=1
enabled=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=0
priority=1
[contrib]
name=CentOS-$releasever - Contrib
baseurl=file:/share/CentOS/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=0
priority=3
From Here: https://wiki.centos.org/HowTos/CreateLocalMirror
New contributor
He doesn't want to make a mirror (he's done that apparently) he wantsyum
to stop checking the list of available mirrors. Even blocking on a network level will generate his error.
– ivanivan
Nov 21 at 2:19
1
Then comment out the repos in that file. Like #[contrib] or remove the base url... @ivanivan
– Michael Prokopec
Nov 21 at 2:25
add a comment |
up vote
1
down vote
up vote
1
down vote
I think this article will solve your issue here is the most relevant part first:
This should be where the mirror is:
baseurl=file:/share/CentOS/$releasever/os/$basearch/
If you want it not to look at all:
- Comment out the repo's
- Remove the baseurl's
- Move the whole file to a .bak version and delete the original.
Set up /etc/yum.repos.d/CentOS-Base.repo like:
[base]
name=CentOS-$releasever - Base
baseurl=file:/share/CentOS/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=1
priority=1
enabled=1
[updates]
name=CentOS-$releasever - Updates
baseurl=file:/share/CentOS/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=1
priority=1
enabled=1
[extras]
name=CentOS-$releasever - Extras
baseurl=file:/share/CentOS/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=1
priority=1
enabled=1
[centosplus]
name=CentOS-$releasever - Plus
baseurl=file:/share/CentOS/$releasever/centosplus/$basearch/
exclude=kernel*
gpgcheck=1
enabled=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=0
priority=1
[contrib]
name=CentOS-$releasever - Contrib
baseurl=file:/share/CentOS/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=0
priority=3
From Here: https://wiki.centos.org/HowTos/CreateLocalMirror
New contributor
I think this article will solve your issue here is the most relevant part first:
This should be where the mirror is:
baseurl=file:/share/CentOS/$releasever/os/$basearch/
If you want it not to look at all:
- Comment out the repo's
- Remove the baseurl's
- Move the whole file to a .bak version and delete the original.
Set up /etc/yum.repos.d/CentOS-Base.repo like:
[base]
name=CentOS-$releasever - Base
baseurl=file:/share/CentOS/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=1
priority=1
enabled=1
[updates]
name=CentOS-$releasever - Updates
baseurl=file:/share/CentOS/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=1
priority=1
enabled=1
[extras]
name=CentOS-$releasever - Extras
baseurl=file:/share/CentOS/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=1
priority=1
enabled=1
[centosplus]
name=CentOS-$releasever - Plus
baseurl=file:/share/CentOS/$releasever/centosplus/$basearch/
exclude=kernel*
gpgcheck=1
enabled=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=0
priority=1
[contrib]
name=CentOS-$releasever - Contrib
baseurl=file:/share/CentOS/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
protect=0
priority=3
From Here: https://wiki.centos.org/HowTos/CreateLocalMirror
New contributor
edited Nov 21 at 2:32
New contributor
answered Nov 21 at 1:29
Michael Prokopec
52415
52415
New contributor
New contributor
He doesn't want to make a mirror (he's done that apparently) he wantsyum
to stop checking the list of available mirrors. Even blocking on a network level will generate his error.
– ivanivan
Nov 21 at 2:19
1
Then comment out the repos in that file. Like #[contrib] or remove the base url... @ivanivan
– Michael Prokopec
Nov 21 at 2:25
add a comment |
He doesn't want to make a mirror (he's done that apparently) he wantsyum
to stop checking the list of available mirrors. Even blocking on a network level will generate his error.
– ivanivan
Nov 21 at 2:19
1
Then comment out the repos in that file. Like #[contrib] or remove the base url... @ivanivan
– Michael Prokopec
Nov 21 at 2:25
He doesn't want to make a mirror (he's done that apparently) he wants
yum
to stop checking the list of available mirrors. Even blocking on a network level will generate his error.– ivanivan
Nov 21 at 2:19
He doesn't want to make a mirror (he's done that apparently) he wants
yum
to stop checking the list of available mirrors. Even blocking on a network level will generate his error.– ivanivan
Nov 21 at 2:19
1
1
Then comment out the repos in that file. Like #[contrib] or remove the base url... @ivanivan
– Michael Prokopec
Nov 21 at 2:25
Then comment out the repos in that file. Like #[contrib] or remove the base url... @ivanivan
– Michael Prokopec
Nov 21 at 2:25
add a comment |
Joshua Kugler is a new contributor. Be nice, and check out our Code of Conduct.
Joshua Kugler is a new contributor. Be nice, and check out our Code of Conduct.
Joshua Kugler is a new contributor. Be nice, and check out our Code of Conduct.
Joshua Kugler is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f483092%2fhow-do-prevent-yum-from-retrieving-mirrorlist%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you tried running
yum clean all
andrm -rf /var/cache/yum
?– Nasir Riley
Nov 21 at 0:51
Yes I have. Ran that after deleting the .repo files.
– Joshua Kugler
Nov 21 at 0:58
1
Very duct-tape-ish but have you considered redirecting DNS for
mirrorlist.centos.org
and pointing it to a local-to-you machine and have it serve up a list of your mirror(s)?– ivanivan
Nov 21 at 2:20
1
Redirecting DNS would do the same thing as editing the file as I suggested below!
– Michael Prokopec
Nov 21 at 2:44