Linux Yum Repository

Source: Internet
Author: User
Tags gpg


( i ) , Production YUM Local Source:

about YUM:

yum Yes is the repository of software, it can be http or ftp rpm header  

The header includes various information about RPM packages, including descriptions, functions, documentation provided, dependencies, etc. It is the collection of these Header and analyze it to automate the remaining tasks.

YUM has the following characteristics:

1. Multiple repositories can be configured at the same time (Repository)

2. Concise configuration file (/etc/yum.conf)

3. Automatic resolution of the dependency problems encountered when adding or removing rpm packages easy to use

4.YUM is divided into server side and client

Server-Side :

Method One: Use a disc as a YUM Database

Mount/dev/cdrom/media

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

Umount/media

Mount/dev/cdrom/var/ftp/pub

Service VSFTPD Start

Require a temporary Mount disc each time a YUM server is used

Mount/dev/cdrom/var/ftp/pub

Method Two: Use a disc image as a 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 disk and rebuild the YUM Index Library

1> Copy the contents of the CD 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 and you're ready to serve vsftpd start .

This will be configured on the server side .

Client Configuration :

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

[Rhel-debuginfo]

name=red Hat Enterprise Linux $releasever-$basearch-debug

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

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

Joben is a server and is a client (no http or FTPis required at this time)

enabled=1 // open warehouse

gpgcheck=0 // whether to check GPG signature,0 for no check,1 for check

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

[] in the name of the warehouse

Name is a description of the warehouse, and 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 by

Configuration . Note that this address is not written here . ftp://192.168.0.200/var/ftp/pub Catalogue ,

Because the root directory that is logged on to FTP is the /var/ftp directory .

enabled to enable this repository,1 for use,0 for disable

Gpgcheck whether to check the GPG signature ( to verify that the package to be installed is RedHat official , This line is not available )

Gpgkey 's storage address is usually shown on the picture , ( This line does not have a line )

Installation Parameters :

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

Parameter Description :

Options: commonly used to have

-Y: If you want the user to respond during the work , This parameter can answer Yes directly

Command

List: list RPM packages on yum server

Install: Installing a package

Update: upgrade a suite if it is not followed by the package name , which updates all installed packages for the current host .

Info: List Details of a suite , equivalent to rpm-qi package content

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

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

Yum Localinstall Package Local installation packages

Yum Update all updates

Yum Update package updates specified packages

Yum check-update Check for updatable programs

Yum Info <package> Display installation package information

Yum list shows all packages that are installed and can be installed

Yum List <package> shows the installation of the specified package

Yum Search <keyword> Find Packages

Yum Remove | Erase package1 Removing packages

Yum Clean headers Clear header

Yum Clean Packages clear the downloaded rpm package

Yum Clean all clears the header and rpm package

For example :

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


This article from "Xu Willow Blog" blog, declined reproduced!

Linux Yum Repository

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.