Configuration and use of the Yum update source for "Linux system optimization"

Source: Internet
Author: User

First introduce yum, an installation package management tool based on the VPM installation package

"1" Yum is an interactive, RPM based, Packagemanager can solve the dependency between packages and packages

"2" RPM-IVH Software Installation command does not resolve dependencies

In the Yum configuration file, the address of the software download is the address of the update source this address is the address that we use to download the software when we use Yum for software installation by default this address is a foreign mirror address mirror.centos.org/

But at home if you also use a foreign mirror address may be slower then we can consider using the domestic image update address mirrors.163.com/

1 How to configure Yum sources

1 Landing mirrors.163.com/ Find CentOS Help

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6D/C1/wKioL1VrG1iia4UIAAPvkJiZ2zM334.jpg "title=" 1.jpg " alt= "Wkiol1vrg1iia4uiaapvkjiz2zm334.jpg"/>

2 found CentOS6

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6D/C5/wKiom1VrGfyxmwJfAACAkzEy_dQ867.jpg "title=" 2.jpg " alt= "Wkiom1vrgfyxmwjfaacakzey_dq867.jpg"/>

3 Click Get or download directly and upload to Linux system

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6D/C1/wKioL1VrG8CjH0RkAAEa-C7oouY068.jpg "title=" 4.jpg " alt= "Wkiol1vrg8cjh0rkaaea-c7oouy068.jpg"/>

here to get Http://mirrors.163.com/.help/CentOS6-Base-163.repo

4 Download Yum configuration files under Linux

"1" Enter the Yum Directory

[[Email protected] ~] #cd/etc/yum.repos.d/[[email protected]]# Lscentos-base.repo Centos-debuginfo.repo Centos-media.repo Centos-vault.repo

As you can see here, Centos-base.repo is the Yum profile that is currently in use and we can change it directly with vim, but this method rarely changes the new repo file directly.

"2" Backup Centos-base.repo

[Email protected]]# cp Centos-base.repo Centos-base.repo.ori #可使用mv [[email protected] yum.repos.d]# Lscentos-base.rep o Centos-debuginfo.repo centos-vault.repocentos-base.repo.ori Centos-media.repo

You can also use the MV command to make a backup, but there will be no Centos-base.repo file at this time and there is only Centos-base.repo.ori file. The purpose of making a backup before modifying it here

1. There is a problem rolling back

2. later than the content of the changed

"3" Download the new repo file from the 163 mirror site

[[email protected]]# wget http://mirrors.163.com/.help/ centos6-base-163.repo--2015-05-2015:14:31-- http://mirrors.163.com/.help/ centos6-base-163.reporesolvingmirrors.163.com... 123.58.173.186, 123.58.173.185connecting  Tomirrors.163.com|123.58.173.186|:80... connected. http requestsent, awaiting response... 200 oklength: 2006 (2.0K)  [ Application/octet-stream]saving to:acentos6-base-163.repoa100%[======================================> ]2,006       --.-k/s   in 0s      2015-05-2015:14:31  (123 mb/s)  - acentos6-base-163.repoa saved[2006/2006][[email  protected]]# lsCentOS6-Base-163.repo  CentOS-Base.repo.ori    centos-media.repocentos-base.repo       centos-debuginfo.repo   Centos-vault.repo 

You can see that there are more Centos6-base-163.repo files at this time. This is the repo file that was downloaded from the 163 mirror site.

"4" Changes the newly downloaded repo file to the Yum profile currently in use

[Email protected]]# cp centos6-base-163.repo centos-base.repocp:overwrite ' Centos-base.repo '? Y

The update source for Yum is now successfully configured.

You can use the sz-y centos-base.repo centos-base.repo.ori command to download before and after two Yum profiles and then use the Text Comparison tool to compare the differences will find just the change.

In a production environment, you can configure a Yum repository that belongs to your own enterprise or server.


The configuration of the Yum update source is over. As long as the above operation is generally no problem the following content is only for the use of Yum and according to the actual needs of the software to install it if only want to know the Yum Update Source configuration method then the following can not see of course you can also use the following software to test the new configuration of the update source The download speed is believed to be a big change.


2 Install the necessary packages using Yum

1 Installing the necessary software

[Email protected]]# yum Install tree telnet dos2unix sysstat lrzsz–y complete!

- y parameter indicates no hint

Of course the so-called necessary software is based on individual needs.

2 Installation system patches and updates

[Email protected]]# yum Upgrade

Or

[Email protected]]# Yum grouplist

3 Installing Package Groups

"1" To view installed package groups

[Email protected]]# yum grouplistinstalledgroups:base compatibility Libraries development tools dial-up Networking Support Hardware monitoring utilities Networking Tools Performance Toolsavailablegroups:additi Onal deve

The output of some of the above is omitted. Only some of the contents of this output can be tried and analyzed by ourselves.

installedgroups package groups that have already been installed

availablegroups package groups that can be installed but not installed

"2" installation package group

[Email protected]]# yum groupinstall "Development Tools"

Note Install package groups with double quotation marks

The difference and connection between "3" Yum Install and Yumgroupinstall

Yuminstall It installs individual software and the dependencies of this software

Yumgroupinstall It installs an installation package this installation package includes a number of individual software and individual software dependencies


This article is from the "fragrant fluttering leaves" blog, please make sure to keep this source http://xpleaf.blog.51cto.com/9315560/1656950

Configuration and use of the Yum update source for "Linux system optimization"

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.