One mount
1) back up all upgrade configuration files under/etc/yum. Repos. D.
# Cd/etc/yum. Repos. d
# Mkdir backup
# Cp * Backup
Delete the original *. Repo
2) create a local configuration file to add or delete the configuration file
# Vi local. Repo
# The file name can be arbitrary, but it must be input in the repo file:
[Local] # mark, which must be unique in the file
Name = centos software from local # description
Baseurl = file: // Media
Press ESC to enter the command status, enter: WQ, save and exit.
Note: # baseurl indicates that the software is mounted from the/media disc.
3) Attach the optical drive # Mount/dev/CDROM/media # attach the optical drive to/Media
4) Clear Yum cache # Yum clean all
II. The centos5.6 system is installed on the Virtual Machine and GCC is compiled.
Mount the DVD system disc of centos and enter the centos directory. The installation sequence is as follows:
Rpm-IVH cpp-4.1.2-50.el5.i386.rpmrpm-ihv kernel-headers-2.6.18-238.el5.i386.rpmrpm-IVH glibc-headers-2.5-58.i386.rpmrpm-IVH glibc-devel-2.5-58.i386.rpmrpm-IVH libgomp-4.4.4-13.el5.i386.rpmrpm