RHEL6 how to create a local yum source by installing a CD or ISO file

Source: Internet
Author: User
By default, there is no. repo file in rhel6. You need to write one yourself. You must configure the yum source before installing yum. If you cannot connect to the Internet, you can use a DVD or ISO file as the local yum source. the following uses RHEL6.0 as an example. Other versions are similar. 1. create an ISO file storage directory (/repo/iso) and an ISO file Mount directory (/repo/rhel6) # mkdir/repo/iso # mkdir/repo/rhel6 if there is a ready-made I

By default, there is no. repo file in rhel6. You need to write one yourself.

Before using yum for installation, you must configure the yum source. If you cannot connect to the Internet, you can use a DVD or ISO file as the local yum source. The following uses RHEL6.0 as an example. Other versions are similar.

1. Create an ISO file storage directory (/repo/iso) and an ISO file Mount directory (/repo/rhel6)
# Mkdir/repo/iso
# Mkdir/repo/rhel6
If there is a ready-made ISO file, you can directly upload it to the/repo/iso directory.

2. If it is a DVD Disc (which is automatically mapped to/dev/cdrom after the server is inserted), the ISO file is created first.
# Cp/dev/cdrom/repo/iso/rhel-server-6.0-x86_64-dvd.iso
Or
# Dd if =/dev/cdrom f =/repo/iso/ rhel-server-6.0-x86_64-dvd.iso

3. Mount the ISO file
# Mount-t iso9660-o loop/repo/iso/rhel-server-6.0-x86_64-dvd.iso/repo/rhel6
# Df-h
File System capacity in use available % mount point
/Dev/sda5 97G 5.8G 86G 7%/
Tmpfs 1.9G 272 K 1.9G 1%/dev/shm
/Dev/loop0 3.2G 3.2G 0 100%/repo/rhel6

4. Make sure that yum-related software packages are installed in the system.
# Rpm-qa | grep yum
Yum-3.2.27-14.el6.noarch
Yum-utils-1.1.26-11.el6.noarch
Yum-rhn-plugin-0.9.1-5.el6.noarch
PackageKit-yum-0.5.8-13.el6.x86_64
Yum-metadata-parser-1.1.2-14.1.el6.x86_64
PackageKit-yum-plugin-0.5.8-13.el6.x86_64
The version number may vary. if the version number is missing, install it on your own (these packages are installed by default ).

5. Edit the repo File
# Vi/etc/yum. repos. d/rhel6.repo
-------------------------------------------------------------------------------
[Server]
Name = rhel6server
Baseurl = file: // repo/rhel6/Server
Enable = 1
Gpcheck = 1
Gpgkey = file: // repo/rhel6/RPM-GPG-KEY-RedHat-release
-------------------------------------------------------------------------------
Note that the baseurl points to the Server directory. If you want to install software such as a Cluster and virtual machine, you also need to create a baseurl pointing to Cluster, ClusterStorage, and VT.

6. Test
# System-config-packages (under XWindow, select the required software package to install)
# Yum install lrzsz (download and install the lrzsz package to automatically find and resolve dependencies)

7. Write the mount command to fstab.

For convenience, write these mounts into/etc/fstab so that they can be mounted upon startup:

/Repo/iso/rhel-server-6.0-x86_64-dvd.iso/repo/rhel6 iso9660 loop 0 0

######################################## ##################

######################################## ##################

 

RHEL 6.1 was officially released in May 19. I also downloaded and installed it yesterday. Because my host is a 64-bit system, this time I decided to release the 64-bit RHEL6.1, the installation is successful. In the future, all my courses will be demonstrated on the basis of this version until the next version is released. Although RHEL6.1 has been installed, I have summarized some things you may want to know about RHEL6.1 for your reference.

1. You cannot customize partitions or software packages when installing RHEL 6 in text mode.
Starting from RHEL6, text-mode installation cannot customize partitions and software packages cannot be customized. It seems that a bug is blocked because a bug occurs when this function is enabled.
To customize partitions and install software packages, you can only use GUI mode or kickstart to customize partitions and software packages.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.