How to implement Yum in Linux

Source: Internet
Author: User
Tags ftp ftp site gpg header implement root directory

RHEL5 to meet the requirements of the various services

"Make Yum local Source:"

Yum Introduction:

Yum is the abbreviation of Yellow Dogupdater Modified, Yum is the repository of software, it can be an HTTP or FTP site, or it can be a local software pool, but it must contain the header of RPM.

The header includes a variety of information about the RPM package, including descriptions, functions, providing files for Dili, dependencies, and so on. The header is collected and analyzed to automate the remaining tasks

Yum has the following characteristics:

1, can be configured at the same time multiple resource library (Repository)

2, concise configuration file (/etc/yum.conf)

3, automatically solve the increase or deletion of the RPM package encountered by the dependency problem easy to use

4, yum is divided into server-side and client

Server side:

Method One: Use CD-ROM as yum database

Mount/dev/cdrom/media

rpm-ivh/media/server/vsftpd.......rpm

Umount/media

Mount/dev/cdrom/var/ftp/pub

Service VSFTPD Start

Requires that the disc be temporarily hooked up each time the Yum server is used

Mount/dev/cdrom/var/ftp/pub

Method Two: Use CD-ROM image as Yum database

Mount/dev/cdrom/media

rpm-ivh/media/server/vsftpd.......rpm

Cp/dev/cdrom/opt/rhel5.iso

Umount/media

Mount-o loop/opt/rhel5.iso/var/ftp/pub

Service VSFTPD Start

Method Three: Copy the CD package to the hard drive, rebuild the Yum Index Library

1> the contents of the disc to the/var/ftp/pub/.

Mount/dev/cdrom/media

rpm-ivh/media/server/vsftpd.......rpm

cp–rf/media/*/var/ftp/pub

2> then start the VSFTPD service vsftpd start

So the server side is configured well.

Client Configuration:

Modify configuration file Vi/etc/yum.repos.d/rhel-debuginfo.repo

[Rhel-debuginfo]

name=red Hat enterpriselinux $releasever-$basearch-debug

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

or Baseurl=file:///var/ftp/pub/server

Joben is a server and is a client (no HTTP or FTP is required at this time)

Enabled=1//Open Warehouse

Gpgcheck=0//Check GPG signature, 0 for no check, 1 for check

#gpgkey =file:///etc/pki/rpm-gpg/rpm-gpg-key-redhat-release//signature file

[] Inside is the name of the warehouse

Name is a description of the warehouse, or it can be called a name.

BaseURL the location of the warehouse, if it is locally configured as a client, start with "file:/" If the library is displayed on the FTP server as shown above

Configuration. Note here that this address cannot be written in the Ftp://192.168.0.200/var/ftp/pub directory,

Because the root directory that logs on to FTP is the/VAR/FTP directory.

Enabled to enable this warehouse, 1 is active, 0 is disabled

Gpgcheck Check the GPG signature (used to verify that the package to be installed is Redhat official, this line is not available)

The Gpgkey address is usually displayed in the picture, (this line is not the same line)

"Installation Parameters:"

Yum<options> <command> <package...>

Parameter description:

Options: Commonly used to have

-Y: If the user responds in the course of the work, this parameter can answer yes directly

Command

List: Lists the RPM kits on the Yum server

Install: Install a kit

Update: Upgrade a suite that updates all installed packages for the current host if update does not follow the package name.

Info: Lists the details of a suite, equivalent to RPM-QI package content

Clean: Remove packages or headers that have been downloaded to this machine

Remove: Removes a package that is already installed in the system

Yumlocalinstall Package Local Installation package

Yumupdate All Updates

Yumupdate Package Update the specified package package

Yumcheck-update Check for updatable programs

Yuminfo <package> Display installation package information

Yumlist displays all packages that have been installed and can be installed

Yumlist <package> Show specified package installation

Yumsearch <keyword> Find Packages

Yumremove | Erase Package1 Delete Package

Yumclean Headers Clear Header

Yumclean packages to clear the downloaded RPM package

Yumclean all clear header and RPM package

For example:

If the last displayed installed indicates that the package is already installed on the system, the server is displayed and the package is not installed

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.