CentOS 6 Learning Yum Usage Chapter

Source: Internet
Author: User

CentOS installed in the virtual machine follow the old boy's tutorial install CentOS 6 pick the necessary components, the next step will need to install a few of the Yum tools for operations, But the default installation of CentOS repo source is mirror.centos.org, this server in foreign countries, in order to install the package after the speed and unnecessary update failure, I habitually will be converted to domestic netease or Zhong Ke source.


The premise is that the virtual machine can access the external network, network configuration This article does not elaborate

First, modify the Yum source to mirrors.163.com

1. Enter the folder where the source configuration is stored (I will not back up the original source, directly deleted)

Cd/etc/yum.repos.dfind./! -name "*media.repo" |xargs RM-RF


2. Create a 163.repo file under/ETC/YUM.REPOS.D

Cat >163.repo << eof[base]name=centos-6-x86_64-base-163.combaseurl=http://mirrors.163.com/centos/6/os/ x86_64/enabled=1gpgcheck=0gpgkey= [updates]name=centos-6-x86_64-updates-163.combaseurl=http://mirrors.163.com/ centos/6/updates/x86_64/enabled=1gpgcheck=0gpgkey= [extras]name=centos-6-x86_64-extras-163.combaseurl=http:// Mirrors.163.com/centos/6/extras/x86_64/enabled=1gpgcheck=0gpgkey=eof

Used to use CentOS6.2 to find direct

wget Http://mirrors.163.com/.help/CentOS6-Base-163.repo

Found useless, because the address recorded in this file is http://mirrors.163.com/centos/$releasever/os/$basearch/

The system seemed to have no releasever and Basearch 2 variables, so above I simply wrote Dead version and system architecture number.


Note: The latest version of CentOS 6 at the time of writing this blog is 6.7

HTTP://MIRRORS.163.COM/CENTOS/6.7/OS/X86_64/should be http://mirrors.163.com/centos/6/os/x86_64/'s soft connection.

And when the release of 6.8 version, 6.7 to 6.1 directory of files are removed, only one large version of the package is only one directory is the latest fix bug package, so here Releasever directly write dead 6 the best.


3. Generate cache

Yum Makecache


Note: If you are directly modifying the other source, the source address is changed. This can result in:/var/cache/yum inside the cache of entries and the actual source address is not the same, causing the problem can not be updated. Therefore, it is necessary to understand the old data on this machine after the source is modified.


Use the Yum clean All command.

Yum Clean [Packages|headers|all]

    • Packages: will be removed from the downloaded software file

    • Headers: Delete the downloaded software file header

    • All: Delete all cached data


Second, install the old boy recommended several operations and maintenance kits

Yum Install tree Nmap sysstat lrzsz dos2unix-y perform yum update if you need to update patches

Comments:

TREE #查看目录结构工具;

NMAP #扫描工具;

SYSSTAT #检测系统性能效率的工具, such as CPU utilization, hard disk, network throughput data, etc.;

Lrzsz #上传下载工具;

Dos2unix #将DOS文本转换成LINUX格式;

This article is from the "Smilepad" blog, make sure to keep this source http://smilepad.blog.51cto.com/6094369/1767907

CentOS 6 Learning Yum Usage Chapter

Related Article

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.