yum update install

Issues related to configuring your network
Post Reply
Rct_Tsoul
Posts: 21
Joined: 2011/04/30 14:21:51
Location: the Mighty American Empire

yum update install

Post by Rct_Tsoul » 2011/08/07 12:22:28

When I try to update and download packages it is as if they are no longer in the stored mirror list within my distro upon the server I am renting, is there a sequence of commands that I must enter to get the new mirrors because I dont even know what version they installed, when I say new mirrors list for my distro I mean:
step 1: Log in as root user
step 2:cd~/mirrors/
step 3:wget http://www.centos.org/mirrorfiles/mirrors2011.txt
THEN
try yum update install

please tell me as I dont know crap about linux, I only kinda know how to run gameserver on them.

Rct_Tsoul
Posts: 21
Joined: 2011/04/30 14:21:51
Location: the Mighty American Empire

Re: yum update install

Post by Rct_Tsoul » 2011/08/08 18:28:07

Well cool I answered my own question, here it is below
The VPS host had an old CentOS mirror that is now shut down or is not up to date and to save bandwith they entered there OWN mirror in for the YUM packages and this needed to be changed, I would need to get this from the web and actually use bandwith, so I needed to do the following:

1.Open the following by typing
[code]vi /etc/yum.repos.d/CentOS-Base.repo[/code]

2.Edit the mirror list line ( this is too hard to do in VI so I just downloaded the file via ftp and edited it with [url=http://www.codeblocks.org/]Code Blocks[/url] )

3.I just deleted and pasted the following working text below:
# 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
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

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

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

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

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

4.Then I save the file in [url=http://www.codeblocks.org/]Code Blocks[/url] then I FTP uploaded the file and replaced the old one, making a backup just in case.

5.The I started updating and installing my YUM packages. :-)

Now a question for you all, would this be the best mirror to use or is there others that are known that have more packages.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

yum update install

Post by pschaff » 2011/08/09 13:49:37

[quote]
Rct_Tsoul wrote:
Well cool I answered my own question, here it is below
The VPS host had an old CentOS mirror that is now shut down or is not up to date and to save bandwith they entered there OWN mirror in for the YUM packages and this needed to be changed,[/quote]
Good that you figured it out as we lacked sufficient information to guess the problem.

[quote]
...
Now a question for you all, would this be the best mirror to use or is there others that are known that have more packages.[/quote]
That question does not make sense. There is no [i]best[/i] mirror for everyone. The best mirror is chosen by yum from the mirrorlist (hopefully using the yum-fastestmirror plugin) when you use the default CentOS-Base.repo configuration shown, rather than the brain-damaged version you inherited. Unless a mirror is not updating frequently, or you catch one in an inconsistent state, all core repo mirrors should have the latest CentOS package versions. Third party repos are a different story but OT for this thread.

Post Reply