Upload the ISO image of RHEL6.5 on the intranet to the RHEL6.5 server to create a local installation dependency source

1. Upload the ISO image of RHEL6.5 to the RHEL6.5 server
2. Mount the ISO image
Generally, the image file is mounted to /mnt/ISO, so first create a mount folder:
 # mkdir /mnt/ISO
Mount (I put the uploaded RHEL image in the /home/Soft folder):
mount -o loop /home/Soft/rhel-server-6.5-x86_64-dvd.iso /mnt/ISO
3. Perform local yum configuration
Backup the files under /etc/yum.repos.d/:
# mkdir /etc/yum.repos.d/backup
# mv /etc/yum.repos.d/rh* /etc/yum.repos.d/backup/
Create a new repo file under /etc/yum.repos.d/. The file name of the repo can be named arbitrarily, but it must end with .repo and configure the following:
# vi /etc/yum.repos.d/RHEL-ISO.repo
Under vi, write the following in RHEL-ISO.repo:
[base]
name=iso ##Warehouse description
baseurl=file:///mnt/ISO ##Mirror mount location
enabled=1 ##Whether to enable
gpgcheck=0 ###1 is to check 0 is not to check
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY- RedHat -release##signing key
4. Clear the yum cache and test whether the configuration is successful
clear cache:
# yum clean all
Test whether the configuration is successful:
# yum install httpd

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325852095&siteId=291194637