How to install and add yum source in CentOS 6.6
The installation environment is as follows:
[Root @ Charley ~] # Cat/etc/redhat-release ======= "view the version
CentOSrelease
6.6
(Final)
[Root @ Charley ~] # Uname-r ======== "Kernel
2.6
.
32
-
504
.el6.x86_64
[root@Charley~]#
1. Backup (Backup required)
Mv/etc/yum. repos. d/CentOS-Base.repo/etc/yum. repos. d/CentOS-Base.repo.backup = execute this command
2. Download the installation Source
Wget-O/etc/yum. repos. d/CentOS-Base.repohttp: // mirrors.aliyun.com/repo/centos-6.repo?## execute the command line
[root@Charley~]
#wget-O/etc/yum.repos.d/CentOS-Base.repohttp://mirrors.aliyun.com/repo/Centos-6.repo
--2015-06-0810:27:56--http:
//mirrors
.aliyun.com
/repo/Centos-6
.repo
mirrors.aliyun.com...112.124.140.210,115.28.122.210
mirrors.aliyun.com|112.124.140.210|:80...
TTP...200OK
72(2.5K)[application
/octet-stream
]
tc
/yum
.repos.d
/CentOS-Base
.repo
100%[=============================================================================================================================>]2,572--.-K
/s
in
0s
2015-06-0810:27:58(272MB
/s
)-c
/yum
.repos.d
/CentOS-Base
.repo2572
/2572
])
The figure below shows the download and installation results.