my super empyy installation didn't give me any repositories
/etc/yum.conf
plugins=1
reads: yum.repos.d CentOS-Base.repo CentOS-Media.repo
it should have?
[base] name=CentOS-5.3-Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 protect=1
additionally ensure that plugins=1 and that you've installed "fastestmirror" as it will dramatically help...
su -c 'yum install yum-plugin-fastestmirror'
IF YOU CAN'T FIND SOMETHING, E.G. YUM INSTALL ICEWM
http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
RPMForge - This repository is a collaboration of Dag (who also maintains an individual archive), Dries and other packagers. Dag is a CentOS team member. The archive provides over 4000 packages for CentOS, including mplayer, xmms-mp3 and other popular media tools. You can find more information about rpmforge at http://rpmforge.net/ or read the instructions on Installing RPMForge.
first make sure we don't break anything important...
yum install yum-priorities
/etc/yum/pluginconf.d/priorities.conf [main] enabled=1
.repo files in /etc/yum.repos.d/
The recommended settings are: [base], [addons], [updates], [extras] ... priority=1 [centosplus],[contrib] ... priority=2 Third Party Repos such as rpmforge ... priority=N (where N is > 10 )
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
yum search icewm //now brings up rpmforge
412 packages excluded due to repository priority protections ========================================== Matched: icewm ================ icewm.i386 : Fast and small X11 window manager
man yum
yum update //be careful as this can take awhile on a newly installed system //additionally it may "break" something...
yum list yum clean
yum search string1 (string2 etc.)
yum install virtualbox //doesn't work
elinks
http://www.virtualbox.org/wiki/Linux_Downloads
and download and save the rpm
PACKAGE INFO (is it installed) rpm -qi foo
LIST FILES IN PACKAGE rpm -qlfoo
INSTALL THE PACKAGE rpm -ivh VirtualBox-3.0.4_50677_rhel5-1.i386.rpm
error: Failed dependencies: libSDL-1.2.so.0 is needed by VirtualBox-3.0.4_50677_rhel5-1.i386 libasound.so.2 is needed by VirtualBox-3.0.4_50677_rhel5-1.i386 libxslt.so.1 is needed by VirtualBox-3.0.4_50677_rhel5-1.i386
THEN keep installing them with yum until they're all done and try the rpm -ivh again...
yum install libSDL-1.2.so.0 is needed by VirtualBox-3.0.4_50677_rhel5-1.i386
possibly much easier
yum localinstall name.rpm?
yum resolvedep dep1 dep2 yum upgrade yum remove
UPGRADE A PACKAGE rpm -Uvh foo-1.0-2.i386.rpm
UNINSTALL A PACKAGE /#rpm -e foo
yum search glibc_kernheaders //linux-headers yum search kernel-headers
yum-remove-yum-accident
it happened during a paste....
and now I have elinks, wget, but no yum...
http://rpm.pbone.net/index.php3/stat/4/idpl/4852179/com/yum-arch-2.2.2-2.el5.noarch.rpm.html
I had to remember to look for "el5" which basically is red hat enterprise linux / centos 5
(we don't want fedora core e.g. f10, or centos 4 e.g. el4)
rpmbuild --rebuild --recompile --define 'dist .fc5' yum-2.6.1-0.fc5.rpm
rpm -qpR foobar-1.0-1.i386.rpm //lists what dependencies this rpm has
rpm -qR foobar-1.0-1 //lists what dependencies this already installed package has
rpm -Uvh yum-arch-2.2.2-2.el5.noarch.rpm.html
get yum from the best source and get the dependencies!
http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/
wget http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/yum-3.2.19-18.el5.centos.noarch.rpm wget http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm
List all packages installed that contain yum
rpm -qa | grep -i yum
remove anything that you accidentally installed before (e.g. yum-2-2)
When you run into circular depdencies:
rpm -Uvh --nodeps yum-fastestmirror*
yum -y = yes to all questions (saves some stupid clicking)
linux-yum-security-updates-only
To only look for and install the security updates you need (rather than updating every package) there's a specific utility: yum-security
Note: this "plugin" only works for Centos/Red Hat 5.1
yum install yum-security
yum list-security //also could be yum list-sec
yum --security check-update //return codes for potential updates
yum update --security //to immediately update security updates only