When using CentOS, it is convenient to install packages with Yum, but Yum is not useful if you can't connect to the Internet.
One way to do this is to use the CentOS installation CD as a Yum source and then install the package using Yum. (The following steps are tested on the Centos6.0 system)
Step 1, first mount the disc to the/media/cdrom directory of the system
Mkdir/media/cdrom //CDROM directory under/media, default is no
mount/dev/cdrom/media/cdrom //mount the optical drive to the/media/cdrom directory
Step 2, enter into the/ETC/YUM.REPOS.D directory, and perform the following actions
cd/etc/ YUM.REPOS.D
mv Centos-base.repo Centos-base.repo.bak //rename Centos-base.repo
vi CENTOS-MEDIA.REPO&NBSP
Modify the Gpgcheck parameter to gpgcheck=0 &NBSP
Modify the enabled parameter in it, and change it to enabled=1
and then save exit. You can now install the package using the Yum-y Install command.
Centos 6.0 Sets the disc as the Yum Source setting method