Summary of installing and setting YUM source in RHEL

Source: Internet
Author: User
Installing and setting the YUM source in RHEL5.0 can solve the dependency problem during software installation. the basic steps are as follows: 1. mount/dev/cdrom/mnt # attach the disk to mnt under. 2. modify the YUM file. the YUM file location is as follows:/etc/yum. repos. d/rhel-debuginfo.repocp/etc/yum. repos. d/rhel-debuginfo.repo

Installing and setting the YUM source in RHEL 5.0 can solve the dependency problem during software installation.

The basic steps are as follows:

1. Attach a cd

Mount/dev/cdrom/mnt # mount the disc to the mnt under.

2. Modify the YUM file.

The YUM file location is as follows/etc/yum. repos. d/rhel-debuginfo.repo

Cp/etc/yum. repos. d/rhel-debuginfo.repo my. repo # copy and name it my. repo

Vi my. repo # Use the vi editor to modify the my. repo file, as shown below:

[Rhel]

Name = Red Hat # based on your actual situation

Baseurl = file: // mnt/Server # Because we use a file, it is file: // because it is in the root directory, there will be three/

Enable = 1 # important, must be changed to 1, otherwise it is unavailable

Gpgcheck = 1 // This row will not change later.

Save and exit

3. Install createrepo and vsftpd

Cd/mnt/Server/

Rpm-ivh createrepo-0.4.4-2.fc6.noarch.rpm

Rpm-ivh vsftpd-2.0.5-10.el5.i386.rpm

4. Copy the Server directory under the CD to/var/ftp/pub, because the yum source service will be provided for all Linux clients in the network in the future, so the FTP service is used.

Cp/mnt/Server/var/ftp/pub

5. regenerate the group file and dependency

Createrepo-g/var/ftp/pub/Server/repodata/comps-rhel5-server-core.xml/var/ftp/pub/Server # Use the absolute path here.

The YUM source has been set up. The verification process is as follows.

 

Yum clean all

Yum list all

Yum-y install dhcp. I * # install dhcp to test whether it is successful.

If the following message is displayed, the group and dependency are incorrectly generated. Please generate a new one.

---> Downloading header for yum-utils to pack into transaction set.
Media: // 1192663619.181374% 234/xxxxxxxxxx: [Errno 4] IOError:
Trying other mirror.
Error: failed to retrieve yum-utils-1.0.4-3.el5.noarch.rpm from dvd-server
Error was [Errno 4] IOError:
--------------- Split ---------------

Set the YUM source on the client.

Cp/etc/yum. repos. d/rhel-debuginfo.repo my. repo

Vi my. repo

Modify the baseurl field to ftp: // ip_address/pub/Server.

Save and exit.

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.