Linux (ubuntu14.04) Yum source installation

Source: Internet
Author: User

A problem has been encountered while installing the test environment, there is no file or folder in/ETC/YUM/REPOS.D and the Yum source cannot be updated.

Workaround:

(first, configure the network yum source)

1. First create a Yum.repo in the/etc/yum/repos.d/directory (name is also OK, the suffix is. Repo on the line) file.

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


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

[Server]

Name=server ......... Name of the server

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 ......... Name of the server

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

If the file cannot be saved, assign permissions

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

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

[Email protected]]# mkdir(Create a new subdirectory) /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 ......... Name of the server

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

Enable=1 ..... Apply this server

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

Test Pass


ADD:

Profile Description:

[] In the warehouse name, if the file already exists, the default can be. Manual input allows you to enter any name

Name Warehouse description, any can

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 (ubuntu14.04) 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.