Yum source configuration

Source: Internet
Author: User
Yum (all called YellowdogUpdater, Modified) is a Shell front-end Software Package Manager in Fedora, RedHat, SUSE, and CentOS. Based on RPM package management, You can automatically download and install the RPM package from the specified server, automatically handle dependencies, and install all dependent software packages at a time, there is no need to repeatedly download and install yum sources in three ways. local yum source 2. network yum source 3. additional Software yum installation case

Yum (all called Yellow dog Updater, Modified) is a Shell front-end Package Manager in Fedora, RedHat, SUSE, and CentOS. Based on RPM package management, the RPM package can be automatically downloaded and installed from the specified server, and the dependency relationship can be automatically processed. All dependent software packages can be installed at one time without the need for tedious download and installation.

Yum sources are divided into three types: 1. Local yum source 2. Network yum source 3. Additional Software yum Installation

Case 1: Local yum configuration (take local CD as an example)

1. Create a mount point/mnt/cdrom

[Root @ dg ~] # Mkdir/mnt/cdrom

[Root @ dg ~] # Mount/dev/cdrom/mnt/cdrom mount/dev/cdrom

Mount: block device/dev/cdrom is write-protected, mounting read-only

[Root @ dg ~] # Mount

/Dev/sda2 on/type ext3 (rw)

Proc on/proc type proc (rw)

Sysfs on/sys type sysfs (rw)

/Dev/sda1 on/boot type ext3 (rw)

/Dev/hdc on/mnt/cdrom type iso9660 (ro)

 

2. Edit the configuration file

[Root @ dg ~] # Vi/etc/yum. repos. d/rhel-debuginfo.repo

[Rhel-debuginfo]

Name = Red Hat Enterprise Linux $ releasever-$ basearch-Debug

Baseurl = Signature/

Enabled = 0

Gpgcheck = 1

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

The modification is as follows:

[Rhel-server]

Name = Red Hat Enterprise Linux server

Baseurl = file: // mnt/cdrom/Server

Enabled = 1

Gpgcheck = 1

Gpgkey = file: // mnt/cdrom/RPM-GPG-KEY-redhat-release

[Rhel-cluster] This field can be used in a clustering group. The following underlined items can be left empty.

Name = Red Hat Enterprise Linux Cluser

Baseurl = file: // mnt/cdrom/Cluster

Enabled = 1

Gpgcheck = 1

Gpgkey = file: // mnt/cdrom/RPM-GPG-KEY-redhat-release

Configuration File Content Overview:

The repository name is in [].

Name repository description

Baseurl is the YUM source address, because it is configured with FTP, HTTP, FILE, etc.

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)

You need to use the following command to enter the GPGKEY storage address. To use this function

3. Use local ground to install the http service

[Root @ dg ~] # Yum install http-y install dependency packages by default

4. view the program installed with yum

[Root @ dg ~] # Yum list installed

[Root @ dg ~] # Yum list installed | grep httpd

Failed to set locale, defaulting to C

This system is not registered with RHN.

RHN support will be disabled.

Httpd. i386 2.2.3-22. el5 installed

We can see our http

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.