Configure the YUM source in RHEL5

Source: Internet
Author: User
Tags ftp site
YUM Introduction: YUM is short for YellowdogUpdaterModified. yum is the software repository. It can be an http or ftp site, or a local software pool, but must contain the rpm header, the header contains various rpm package information, including descriptions, functions, provided files, dependencies, and so on. only by collecting and analyzing these headers can the remaining tasks be automatically completed. YUM has the following features: 1. Multiple resource libraries can be configured simultaneously)

YUM introduction:
YUM is short for Yellow dog Updater Modified. yum is the software repository, which can be an http or ftp site or a local software pool, but must contain the rpm header, the header contains various rpm package information, including descriptions, functions, provided files, dependencies, and so on. only by collecting and analyzing these headers can we automate the remaining tasks.

YUM has the following features:
1. Multiple resource libraries can be configured simultaneously (Repository)
2. simple configuration file (/etc/yum. conf)
3. It automatically solves the dependency problems encountered when adding or deleting rpm packages.
4. YUM is divided into server and client
1. In this example, the yum server is configured as an ftp server,

The following two software packages must be installed on the server:
Createrepo-0.4.11-3.el5.norach.rpm
Yum-3.0.1-5.el5

1> test all content on the CD to/var/ftp/pub /.

2> install createrepo-0.4.11-3.el5.norach.rpm

3> Use createrepo-v/var/ftp/pub/to recreate the index file.

A repodata directory is generated under/var/ftp/pub,
Or use createrepo-g/var/ftp/pub/Server/repodata/comps-rhel5-server-core.xml

/Var/ftp/pub/Server/
Createrepo-g/var/ftp/pub/VT/repodata/comps-rhel5-vt.xml/var/ftp/pub/VT/
Remember to use TAB to complete the path and command
If there is a. olddate prompt, delete it and run the createrepo command again.
4> restart the vsftpd service. service vsftpd restart,

In this way, the server is configured.

Client Configuration:

The client configuration directory must be suffixed with. repo in the/etc/yum. repos. d/file name:

[Rhel]

Name = Red Hat Enterprise Linux

Baseurl = ftp: // 192.168.0.200/pub 192.168.0.200 is the address of the ftp server

Enabled = 1

Gpgcheck = 1

Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-RedHat-release

The repository name is in [].
Name is the repository description or name.
The location of the baseurl repository. If it is locally configured as a client, it must start with "file:/". If the library is on the ftp server, press

Configuration. Note that this address cannot be written as the ftp: // 192.168.0.200/var/ftp/pub directory, because you can log on to the root directory of ftp

Yes/var/ftp directory.
Enabled: whether to enable this repository. 1 indicates the repository is enabled, and 0 indicates the repository is disabled.
Gpgcheck whether to check the GPG signature (used to verify whether the package to be installed is officially REDHAT, this line is not available)
The GPGKEY storage address is usually displayed on the image (this line does not work)

Installation parameters:

Yum

Parameter description:

Options: Commonly Used

-Y: if the user needs to respond during the work process, this parameter can be directly answered to yes

Command:

List: lists all RPM kits on the yum server.

Install: install a suite

Update: update a suite. If the update is not followed by a suite name, update all installed suites on the current host.

Info: list the details of a suite, which is equivalent to rpm-qi package.

Clean: Remove packages or headers that have been downloaded to the Local Machine

Remove: remove a suite that has been installed in the system
Yum localinstall package local installation package
Yum update all updates
Yum update package update the specified package
Yum check-update check updatable programs
Yum info Display installation package information
Yum list displays all installed and installable packages
Yum list Displays the installation status of the specified package
Yum search Search for software packages
Yum remove | erase package1 delete a package
Yum clean headers clear header
Yum clean packages clear the downloaded rpm package
Yum clean all clear header and rpm package

For example:
If the last installed is displayed, it indicates that the software package has been installed. If it is displayed as a server, the system has not installed the software package.

2. If the local machine is both the yum client and the yum server, simply configure it.

1. Mount the CD to/mnt/cdrom without the cdrom directory by default.

2. Configure yum/etc/yum. repos. d/file name to be suffixed with. repo. If there are multiple directories, write multiple directories.

[Rhel]

Name = Red Hat Enterprise Linux

Baseurl = file: // mnt/cdrom/Server

Enabled = 1

Gpgcheck = 1

Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Name = Red Hat Enterprise Linux 1

Baseurl = file: // mnt/cdrom/VT

Enabled = 1

Gpgcheck = 1

Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

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.