Linux (ubuntu14.04) yum source installation, ubuntu14.04yum

Source: Internet
Author: User

Linux (ubuntu14.04) yum source installation, ubuntu14.04yum

An error occurred while installing the test environment. The file or folder does not exist in/etc/yum/repos. d and the yum source cannot be updated.

Solution:

(1) configure the network yum source)

1. First, create a yum. repo file in the/etc/yum/repos. d/directory (the name can also be self-prepared, and the suffix is. repo.

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


2. open the file and add the following content (no need to add ):

[Server]

Name = Server... name of the Server

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

Enable = 1... apply this server

Gpgcheck = 0 ...... disable verification.

Here we recommend an address: http://mirrors.ustc.edu.cn/centos/5/updates/?basearch/, that is

[Server]

Name = Server... name of the Server

Baseurl = http://mirrors.ustc.edu.cn/centos/5/updates/?basearch/ ...... yum file address

Enable = 1... apply this server

Gpgcheck = 0 ...... disable verification.

If the file cannot be saved, assign the permission.

Save and enter yum list for test.

(2) configure the local yum source)1. Create a mount point/mnt/cdrom

[Root @ ccc] # mkdir (create a new subdirectory)/mnt/cdrom

[Root @ ccc] # mount/dev/sr0/mnt/cdrom mount/dev/cdrom to the CD

Mount: block device (device)/dev/cdrom is write-protected, mounting read-only (success if this prompt is displayed)

2. Set

[Server]

Name = Server... name of the Server

Baseurl = file: // The file address of the mnt/cdrom/... yum Library

Enable = 1... apply this server

Gpgcheck = 0 ...... disable verification.

Test passed


Add:

Configuration File Content Overview:

The repository name in [] is used. If the file already exists, the repository name is used by default. You can enter any name for manual input.

Name repository description, any

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)



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.