实验环境:
[root@bogonzhi]#uname-a Linuxbogon2.6.32-642.11.1.el6.i686#1SMPFriNov1818:48:28UTC2016i686i686i386GNU/Linux [root@bogonzhi]#cat/etc/redhat-release CentOSrelease6.8(Final)
一、安装Wget
[root@bogonzhi]#yuminstallwget 已加载插件:fastestmirror,refresh-packagekit 设置安装进程 Loadingmirrorspeedsfromcachedhostfile *base:mirror.bit.edu.cn *epel:mirror.lzu.edu.cn *extras:mirrors.btte.net *updates:mirrors.btte.net 解决依赖关系 -->执行事务检查 --->Packagewget.i6860:1.12-8.el6willbe安装 -->完成依赖关系计算 依赖关系解决 ================================================================================================================================================================================= 软件包架构版本仓库大小 ================================================================================================================================================================================= 正在安装: wgeti6861.12-8.el6base483k 事务概要 ================================================================================================================================================================================= Install1Package(s) 总下载量:483k Installedsize:1.8M 确定吗?[y/N]:y 下载软件包: wget-1.12-8.el6.i686.rpm|483kB00:00 运行rpm_check_debug 执行事务测试 事务测试成功 执行事务 正在安装:wget-1.12-8.el6.i6861/1 Verifying:wget-1.12-8.el6.i6861/1 已安装: wget.i6860:1.12-8.el6 完毕!
二、下载repel
CentOS6.8_32位epel下载地址:https://mirrors.tuna.tsinghua.edu.cn/epel/6/i386/epel-release-6-8.noarch.rpm
CentOS6.8_64位epel下载地址:https://mirrors.tuna.tsinghua.edu.cn/epel/6Server/x86_64/epel-release-6-8.noarch.rpm
[root@bogonzhi]#wgethttps://mirrors.tuna.tsinghua.edu.cn/epel/6/i386/epel-release-6-8.noarch.rpm--2016-12-0601:44:43--https://mirrors.tuna.tsinghua.edu.cn/epel/6/i386/epel-release-6-8.noarch.rpm正在解析主机mirrors.tuna.tsinghua.edu.cn...166.111.206.63,2402:f000:1:416:166:111:206:63正在连接mirrors.tuna.tsinghua.edu.cn|166.111.206.63|:443...已连接。 已发出HTTP请求,正在等待回应...200OK 长度:14540(14K)[application/x-redhat-package-manager] 正在保存至:“epel-release-6-8.noarch.rpm.1”100%[=======================================================================================================================================>]14,540--.-K/sin0s 2016-12-0601:44:43(262MB/s)-已保存“epel-release-6-8.noarch.rpm.1”[14540/14540]) [root@bogonzhi]#lsDesktopDocumentsDownloadsepel-release-6-8.noarch.rpmepel-release-6-8.noarch.rpm.1MusicPicturesPublicTemplatesVideos
三、安装epel
[root@bogonzhi]#rpm-ivhepel-release-6-8.noarch.rpm #安装下载好的epelrpm包 Preparing...###########################################[100%] packageepel-release-6-8.noarchisalreadyinstalled [root@bogonzhi]#rpm-eepel-release-6-8.noarch.rpm error:packageepel-release-6-8.noarch.rpmisnotinstalled [root@bogonzhi]#rpm-eepel error:packageepelisnotinstalled [root@bogonzhi]#rpm-qa|grepepel epel-release-6-8.noarch [root@bogonzhi]#rpm-eepel-release-6-8.noarch [root@bogonzhi]#rpm-ivhepel-release-6-8.noarch.rpm Preparing...###########################################[100%]1:epel-release###########################################[100%] [root@bogonzhi]#rpm-qa|grepepel #安装成功 epel-release-6-8.noarch[root@bogonzhi]#ll/etc/yum.repos.d/ #查看额外源 总用量32-rw-r--r--.1rootroot19915月192016CentOS-Base.repo-rw-r--r--.1rootroot6475月192016CentOS-Debuginfo.repo-rw-r--r--.1rootroot2895月192016CentOS-fasttrack.repo-rw-r--r--.1rootroot6305月192016CentOS-Media.repo-rw-r--r--.1rootroot62595月192016CentOS-Vault.repo-rw-r--r--.1rootroot95711月52012epel.repo-rw-r--r--.1rootroot105611月52012epel-testing.repo[root@bogonzhi]#cat/etc/yum.repos.d/epel.repo [epel] name=ExtraPackagesforEnterpriseLinux6-$basearch #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearchmirrorlist=https://mirrors.fedoraproject.org/Metalink?repo=epel-6&arch=$basearchfailovermethod=priority enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6[epel-debuginfo] name=ExtraPackagesforEnterpriseLinux6-$basearch-Debug #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debugmirrorlist=https://mirrors.fedoraproject.org/Metalink?repo=epel-debug-6&arch=$basearchfailovermethod=priority enabled=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6gpgcheck=1[epel-source] name=ExtraPackagesforEnterpriseLinux6-$basearch-Source #baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMSmirrorlist=https://mirrors.fedoraproject.org/Metalink?repo=epel-source-6&arch=$basearchfailovermethod=priority enabled=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6gpgcheck=1原文链接:https://www.f2er.com/centos/379556.html