In Linux, the dependency between software installation packages is a headache,
Yum can automatically download and install the RPM package from the specified server. It can automatically process dependencies and install all dependent software packages at a time without the need for tedious download and installation.
* You can use ftp and Createrepo to build a local software library.
When using the YUM tool on a Linux host to upgrade and install software online, it is often subject to network connection speed and bandwidth restrictions, resulting in a long time or even failure in software installation. Especially when a large number of servers and software packages need to be upgraded, the update speed may be unbearable. In comparison, the biggest advantage of the local YUM source server is the fast network connection and Stability of the LAN. With the YUM source server in the LAN, even if the Internet connection is interrupted, the software upgrade and installation of other YUM clients will not be affected.
I. First mount the image disk with the red hat enterprise linux 5 system CD
# Mount/dev/cdrom/mnt/cdrom
Ii. Install vsftp
Go to cd/media/RHEL_5.1 i286 DVD/Server/
Install rpm-vih vsftpd -...... Press tab to complete
3. Install Createrepo
Rpm-vih createrepo -...... Press tab to complete
4. Copy the image file in the medie directory
Cp-Prv */var/ftp/pub
5. Set up Linux YUM to create indexes and connect
Createrepo-v/var/ftp/pub
5. Edit yum to update the configuration file
Vi/etc/yum. repos. d/rhel -....... Repo
Set baseurl = ftp: // 127.0.0.1/pub in this file
Change enabled = 0 to 1, and change gpgcheck = 1 to 0.
Restart vsftpd
Linux YUM usage
Yum install software name/** // * download and install the corresponding software package */
Yum info software name/** // * view the software package details */
Yum list | grep kernel/** // * Find the kernel package */
Yum update firefox/** // * update firefox */
Yum remove bmp-mp3/*** // remove bmp-mp3 */
Man yum/** // * view the yum command details */
The configuration path of the yum file is/etc/yum. conf.