In some environments, you cannot access the external network. In this case, it is also an option to use the full version CD as the installation source.
Environment: CentOS release 5.5 (Final)
1. Mount the system disk (DVD version CentOS-5.5-i386-bin-DVD.iso) optical drive:
mkdir /media/cdrom mount /dev/cdrom /media/cdrom
2. Keep the installation library files:
/etc/yum.repos.d/CentOS-Media.repo
# CentOS-Media.repo # # This repo is used to mount the default locations for a CDROM / DVD on # CentOS-5. You can use this repo and yum to install items directly off the # DVD ISO that we release. # # To use this repo, put in your DVD and use it with the other repos too: # yum --enablerepo=c5-media [command] # # or for ONLY the media repo, do this: # # yum --disablerepo=\* --enablerepo=c5-media [command] [c5-middle] name=CentOS-$releasever - Media baseurl = file: /// media/cdrom/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
3. Test the yum installation source:
[root@localhost cdrom]# yum --enablerepo=c5-media info vsftpd Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Installed Packages Name : vsftpd Arch : i386 Version : 2.0.5 Release : 16.el5_4.1 Size : 285 k Repo : installed Summary : vsftpd - very secure Ftp daemon URL : http://vsftpd.beasts.org/ License : GPL Description: vsftpd is a very secure FTP daemon. it is completely from scratch : written.
4. Common yum commands:
Remove the graphical interface package of CentOS5:
yum --enablerepo=c5-media --disableplugin=fastestmirror groupremove "GNOME Desktop Environment"
yum --enablerepo=c5-media --disableplugin=fastestmirror groupremove "X Window System"
install Chinese environment language Related packages:
yum --enablerepo=c5-media --disableplugin=fastestmirror groupinstall "chinese-support"
specific component package information yum groupinfo xxxx
all available component package information yum grouplist xxxx
software related installation information yum info xxx
Search for a given string software yum search xxx
delete a software yum erase xxx
install a soft armor yum install xxx
see yum --help for details