yum源配置、epel源配置
【1】配置本地yum源
cd /etc/yum.repos.d/
ll

#新建一个文件,修改内容
vim base.repo

代码参考:
echo "/dev/sde /mnt btrfs defaults 0 0" >> /etc/fstab 添加repo文件 cp CentOS7-Base-.repo local_yum.repo 复制一个原来的repo源 vim local_yum.repo 编辑 添加以下内容到local_yum.repo [local_yum]
name=local_yum
baseurl=file:///mnt
gpgcheck=
enabled= yum clean all 清空缓存
【2】配置网络yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
[root@rac1 yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
--2017-10-14 23:18:31-- http://mirrors.163.com/.help/CentOS6-Base-163.repo
正在解析主机 mirrors.163.com... 123.58.190.209, 123.58.190.228, 123.58.190.234, ...
正在连接 mirrors.163.com|123.58.190.209|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:2006 (2.0K) [application/octet-stream]
正在保存至: “/etc/yum.repos.d/CentOS-Base.repo”
100%[=========================================================>] 2,006 --.-K/s in 0.001s
2017-10-14 23:18:31 (1.90 MB/s) - 已保存 “/etc/yum.repos.d/CentOS-Base.repo” [2006/2006])
下载成功后,加载缓存
yum clean all
yum makecache
#yum update
#清除原来的源配置 [root@localhost ~]# yum clean all
#更新yum源到本地 [root@localhost ~]# yum list #安装现在的yum源,这一步也是测试新安装的yum源有没有安装成功 [root@localhost ~]# yum install yum
[root@RAC01 yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
--2017-10-14 01:22:16-- http://mirrors.aliyun.com/repo/Centos-6.repo
正在解析主机 mirrors.aliyun.com... 失败:域名解析暂时失败。
wget: 无法解析主机地址 “mirrors.aliyun.com”
[root@RAC01 yum.repos.d]# vi /etc/resolv.conf
nameserver 8.8.8.8
[root@RAC01 yum.repos.d]# yum makecache
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.7 kB 00:00
base/group_gz | 226 kB 00:00
base/filelists_db | 6.4 MB 00:02
base/primary_db | 4.7 MB 00:01
base/other_db | 2.8 MB 00:00
extras | 3.4 kB 00:00
extras/filelists_db | 25 kB 00:00
extras/prestodelta | 1.3 kB 00:00
extras/primary_db | 29 kB 00:00
extras/other_db | 30 kB 00:00
updates | 3.4 kB 00:00
updates/filelists_db | 2.9 MB 00:00
updates/prestodelta | 130 kB 00:00
updates/primary_db | 4.7 MB 00:01
updates/other_db | 66 MB 00:18
Metadata Cache Created
【3】epel源
EPEL源-是什么?为什么安装? EPEL (Extra Packages for Enterprise Linux)是基于Fedora的一个项目,为“红帽系”的操作系统提供额外的软件包,适用于RHEL、CentOS和Scientific Linux. 使用很简单:
. 首先需要安装一个叫”epel-release”的软件包,这个软件包会自动配置yum的软件仓库。当然你也可以不安装这个包,自己配置软件仓库也是一样的。 #用于RHEL5系列
wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -ivh epel-release--.noarch.rpm #用于RHEL6系列
wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
rpm -ivh epel-release--.noarch.rpm . 安装完成之后你就可以直接使用yum来安装额外的软件包了
yum clean all yum makecache
yum install nginx pure-ftpd .直接自己手工添加软件仓库配置文件
vi /etc/yum.repos.d/epel.repo [epel]
name=epel
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-releasever&arch=releasever&arch=basearch
enabled=
gpgcheck= CentOS6.5添加阿里云的EPEL源
yum localinstall --nogpgcheck http://mirrors.aliyun.com/epel/6/x86_64/epel-release-6-8.noarch.rpm 安装阿里云EPEL源
、首先卸载以前装的epel以免影响
rpm -e epel-release
、 下载阿里提供的epel
wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-6.repo
、yum clean all
、yum makecache 阿里云源安装示例:
、备份(如有配置其他epel源)
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup 、下载新repo 到/etc/yum.repos.d/
epel(RHEL )
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo epel(RHEL )
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo epel(RHEL )
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-5.repo 来源:https://www.cnblogs.com/fps2tao/p/7580188.html
yum源配置、epel源配置的更多相关文章
- centos7 升级php7 添加配置epel源 报错:Cannot retrieve metalink for repository: epel. Please verify its path and try again
文章来自:循序渐渐linux:基础知识 一书 7.3章LAMP服务器搭建 日常故障 centos上好多软件升级需要配置epel源 其中有一点小插曲 需要手动更改 1.很多时候,对PHP环境要求较新的版 ...
- linux 配置本地yum源,配置国内yum源,配置epel源
目录 一.配置本地yum源 二.配置国内yum源和epel源 一.配置本地yum源 1.挂载ISO镜像 mount -o loop /mnt/yum-iso/CentOS-7-x86_64-DVD-1 ...
- CentOS 6.9配置EPEL源
简介: EPEL是一个由特别兴趣小组创建.维护并管理的,针对 红帽企业版 Linux(RHEL)及其衍生发行版(比如 CentOS.Scientific Linux.Oracle Enterprise ...
- CentOS配置epel源
https://opsx.alibaba.com/mirror epel 配置方法 1.备份(如有配置其他epel源) mv /etc/yum.repos.d/epel.repo /etc/yum.r ...
- CentOS 配置epel源
先查询下有没有epel rpm -qa|grep epel 没有的话到官网https://fedoraproject.org/wiki/EPEL下载rpm包 然后 rpm -ivh 安装 安装完毕后到 ...
- redhat 配置本地yum源163yum源epel 源,无需卸载yum!无须拷贝ISO,愿网上少一点垃圾教程误人子弟
都知道redhat不收费,但是其yum服务是要收费的,不想出钱那就自己配置yum源就好了. 首先,博主之前也没用过redhat,第一次用yum装包的时候提示什么没注册之类的,balaba一大堆,然后就 ...
- redhat 配置本地yum源163yum源epel 源,无需卸载yum!无须拷贝ISO
都知道redhat不收费,但是其yum服务是要收费的,不想出钱那就自己配置yum源就好了. 首先,博主之前也没用过redhat,第一次用yum装包的时候提示什么没注册之类的,balaba一大堆,然后就 ...
- Linux 配置163yum源epel 源
今天一个小伙伴询问博主,想换个163源(阿里源.亚马逊应该都是一样,博主没有一一验证)怎么换!博主当然兴致勃勃的准备好了指点小伙伴...但是,你没猜错,打脸了.而且最后还是和小伙伴一起配置好的,所以就 ...
- CentOS 本地和网络yum源简单说明及配置
1.简述 Yellow dog Updater, Modified由Duke University团队,修改Yellow Dog Linux的Yellow Dog Updater开发而成,是一个基于R ...
- CentOS6、CentOS7配置Base源和epel源
1.用yum安装软件报错 Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&a ...
随机推荐
- VirtualbBox:UEFI环境下安装VirtualBox
造冰箱的大熊猫@cnblogs 2018/12/18 1.问题 在一台新计算机上安装VirtualBox,启动虚拟机时出现“Kernel driver not installed (rc=-1908) ...
- python拼音库pypinyin库详解
# -*- coding: utf-8 -*- # @Author : FELIX # @Date : 2018/6/30 9:20 from pypinyin import pinyin, lazy ...
- head命令:显示文件开头内容
head 命令可以显示指定文件前若干行的文件内容,其基本格式如下:head [选项] 文件名 选项: 选项 含义 -n K 这里的 K 表示行数,该选项用来显示文件前 K 行的内容:如果使用 &quo ...
- intellij idea http proxy config
# custom IntelliJ IDEA properties #http proxy -DproxySet=true -Dhttp.proxyHost=127.0.0.1 -Dhttp.prox ...
- 如何卸载zabbix且删除
1.彻底卸载zabbix和删除残留文件 1 2 [root@localhost etc]# service zabbix stop //这个命令是停止服务 [root@localhost et ...
- easyui编辑editor
$.extend($.fn.datagrid.defaults.editors, { textarea: { init: function(container, options){ var input ...
- 从输入url到页面加载完成都发生了什么
https://zhuanlan.zhihu.com/p/23155051 参考 一个http请求的过程 简要介绍一下一个http请求的网络传输过程: DNS Lookup先获得URL对应的IP地址( ...
- 使用redis时遇到的问题及解决方法
最近在向redis中写入数据的时候,报了下面的错误: failed opening the rdb file crontab (in server root dir /etc) for saving ...
- CAD二次开发中各类多段线的dxf组码
Document doc = Application.DocumentManager.MdiActiveDocument; Editor ed = doc.Editor; ed.WriteMessag ...
- windows安装python flask虚拟环境
安装pipenv的虚拟环境主要是为了防止不同python版本之间冲突的问题,虚拟环境安装的包包不会对外部真实环境产生任何作用,只会作用于虚拟环境.这样,一个flask框架应用对应一个pipenv虚拟环 ...