Linux (readhat) Yum source installation

Source: Internet
Author: User

There was a problem when installing the test environment, there was no file or directory in the/ETC/YUM/REPOS.D, and the Yum source could not be updated.

Workaround:

(first, configure the network yum source)

1. First create a Yum.repo under the/etc/yum/repos.d/folder (name is also capable, the suffix is. Repo) file.

Vim/etc/yum.repos.d/yum.repo


2. Open the file to add such as the following content (.... No need to join):

[Server]

Name=server ... the name of the Server, the ....

Baseurl= your yum source address ..... file address of the Yum Library

Enable=1 ..... Apply this server

Gpgcheck=0 ........ Turn off validation

An address is recommended here: http://mirrors.ustc.edu.cn/centos/5/updates/$basearch/,

[Server]

Name=server ... the name of the Server, the ....

Baseurl=http://mirrors.ustc.edu.cn/centos/5/updates/$basearch/..... file address of the Yum Library

Enable=1 ..... Apply this server

Gpgcheck=0 ........ Turn off validation

Assuming the file cannot be saved, the assignment permission can be

After saving, enter the Yum list test and find available.

(second, configure local Yum source)1. Create mount point/mnt/cdrom

[Email protected]]# mkdir(Create a new subfolder) /mnt/cdrom

[[Email protected]]# mount/dev/sr0/mnt/cdrom Mount/dev/cdrom to disc

Mount:block device(device) /dev/cdrom is write-protected, mounting read-only (with this hint is successful)

2. Settings

[Server]

Name=server ... the name of the Server, the ....

baseurl=file:///mnt/cdrom/. The file address of the Yum Library

Enable=1 ..... Apply this server

Gpgcheck=0 ........ Turn off validation

Test by


ADD:

A brief description of the contents of the configuration file:

[] Inside the warehouse name, assuming the file already exists, the default is OK. Manual input allows you to enter a random name

Name warehouse descriptive narrative, can be arbitrary

BaseURL is the Yum source address, because FTP is configured here, it can be http,file, etc.

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)



Linux (readhat) Yum source installation

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.