1. mount the local CD to the system: Mount the rhel6.2 installation CD to the optical drive, run mkdir/media/rhel in the command line of the terminal. # create the mount/dev/cdrom/media/rhel Directory. # mount the disc to the cd/media/rhel directory in the/media/rhel Directory # go to the Mount directory ls # View The Mount Directory, disk mounting successful 2. configure local yum source c
1. attach the local CD to the system: put the rhel6.2 installation CD into the optical drive and operate it under the command line of the terminal.
Mkdir/media/rhel # Create a Mount Directory
Mount/dev/cdrom/media/rhel # mount the disc to the/media/rhel directory.
Cd/media/rhel # enter the Mount Directory
Ls # check the Mount Directory. the disc is mounted successfully.
2. configure the local yum source
Cd/etc/yum. repos. d/# enter the yum configuration Directory
Touch rhel-media.repo # Create a yum profile
Vi rhel-media.repo # Edit the configuration file and add the following content
[Rhel-media]
Name = Red Hat Enterprise Linux 6.2 # Custom name
Baseurl = file: // media/rhel # local disk Mount path
Enabled = 1 # enable yum source. if 0 is disabled, 1 is enabled.
Gpgcheck = 1 # Check the GPG-KEY, 0 is not checked, 1 is checked
Gpgkey = file: // media/rhel/RPM-GPG-KEY-redhat-release # path to the GPG-KEY
3. clear yum cache and use yum install to automatically install software
Yum clean all # clear yum cache
Yum install php # install php