配置本机的yum源
配置本机的yum源
环境:操作系统CentOS6.5
1.挂在安装光盘
[root@CentOS40 ~]# mkdir -p /mnt/cdrom
[root@CentOS40 ~]# mount /dev/cdrom /mnt/cdrom
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@CentOS40 ~]#
2.修改yum配置文件
yum的配置文件在/etc/yum.repos.d/
[root@CentOS40 yum.repos.d]# ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
查看目录有4个yum的配置文件。可以修改里面的任何一个,这里一修改CentOS-Base.repo为例,
修改之前可以先备份下该文件。
3.修改配置文件
[root@CentOS40 yum.repos.d]# vi CentOS-Base.repo
[root@CentOS40 yum.repos.d]#
会看到里面有很多内容,因为我们配置的,本地yum源,可以只保留上面的部分
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
修改红色标准的一行
baseurl=file:///mnt/cdrom
然后保存退出
4.查下yum源,如果可以看到,好多宝,就说明yum源,配置成功
[root@CentOS40 yum.repos.d]# yum list
5.测试安装vim(如果看到下面内容,正常yum配置成功,可以正常使用。)
[root@CentOS40 yum.repos.d]# yum install vim
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package vim-enhanced.i686 2:7.2.411-1.8.el6 will be installed
配置本机的yum源的更多相关文章
- centos配置ADSL拨号 配置阿里云的yum源
如果系统yum源有问题可以更改yum源配置阿里云的yum源1)下载repo文件 wget http://mirrors.aliyun.com/repo/Centos-7.repo(没有 wget命令可 ...
- CentOS8Linux中配置网易云网络yum源安装软件
在CentOS8Linux中配置网易云网络yum源安装软件 前提是你的操作系统是CentOS-Linux 你已经配置好了本地yum源,并且你的网络是可用的. 本地yum源配置请参考:https://w ...
- CentOS 7 配置阿里云本地yum源
删除原有的yum源: rm -f /etc/yum.repos.d/* 重新下载阿里云的yum源: wget -O /etc/yum.repos.d/CentOS-Base.repo http://m ...
- vbox虚拟机配置Redhat6.4本地yum源
作为一个新手,配置这个yum源配了4天,遇到了各种问题,也按照网络上面一些方法在163上面下载CentOS6的yum源来替换Redhat本地的yum源,但是配置过程中,出现很多错误,发现直接在本地配置 ...
- CentOS7linux通过http配置共享自动创建yum源的shell脚本
因工作需要用到,所以记录一下配置流程 环境介绍: 两台CentOS7系统 yum源服务主节点IP:192.168.1.78 从节点IP:192.168.1.79(79从78上获取yum源) 配置78节 ...
- CentOS配置Nginx官方的Yum源
由于yum源中没有我们想要的nginx,那么我们就需要创建一个"/etc/yum.repos.d/nginx.repo"的文件,其实就是新增一个yum源. [root@niaoyu ...
- redhat6.5 配置使用centos的yum源
新安装了redhat6.5安装后,登录系统,使用yum update 更新系统.提示: This system is not registered to Red Hat Subscription Ma ...
- 配置阿里云作为yum 源
第一步:下载aliyum 的yum源配置文件. http://mirrors.aliyun.com/repo/ 第二步:把下载到的repo文件复制到/etc/yum.repo.d/目录下. ----- ...
- redhat7 配置使用centos的yum源
新安装了redhat7.安装后,登录系统,使用yum update 更新系统.提示: This system is not registered to Red Hat Subscription Man ...
随机推荐
- bzoj5161 最长上升子序列 状压DP(DP 套 DP) + 打表
题目传送门 https://lydsy.com/JudgeOnline/problem.php?id=5161 题解 回顾一下以前用二分求 LIS 的方法:令 \(f[i]\) 表示长度为 \(i\) ...
- BiNGO的GO分析
GO富集分析对老师们来说想必都不陌生,几乎在任何项目中都会出现.今天就给大家介绍一款简单易学又好用的富集分析小软件---BiNGO.它是Cytoscape软件中很出色的一个插件.它提供的结果中除了文本 ...
- centos6.8安装tomcat多容器的处理办法,及安装zk、dubbo
系统环境: Linux-centosOS6.8-bit64 JDK1.8 1.Tomcat多容器的处理方案 首先,不论tomcat的版本是否有多个,路径是否相同,肯定的是可以运行多个容器. 处理以下两 ...
- Linux进程管理——查看内存的工具
Linux进程管理——查看内存的工具 一查看内存的工具vmstat vmstat命令:虚拟内存信息vmstat [options] [delay [count]]vmstat 2 5 [root@ce ...
- 重写UIlabel的setText:方法,过滤或者拦截text设置
因为项目中很多地方都有对UIlabel的赋值,但是text.length == 0 或者为空时并没有去给默认值,导致很多界面空间是白板, 所以不想一个一个去改.希望能重写UIlabel 的setTex ...
- gitHub那些优秀的库和想要实现的效果
1. 轮播库SDCycleScrollView 2. 自动布局库SDAutoLayout 3. 类似支付宝福卡滑动切换的效果 https://github.com/huangxuan518/HXCar ...
- Android内存tips
1. Android应用程序的默认最大内存值为16M,如何修改Android应用程序的默认最大内存值? 修改或添加/system/build.prop中的配置项: root@NX551J:/syste ...
- UIStakView的添加与移除
subView和arrangedSubView对于Stack View的子控件添加和移除,我们是这样描述的. 添加-->(Stack View管理的subview) addArrangedSub ...
- Bugku | 游戏过关
思路:绕过判断,直接跳转到算flag的函数哪里 1.找到计算flag的函数在哪里,记住 "0075e940",这是入口 2.找到一个现成的跳转指令,修改它: 3.重新运行一遍,得到 ...
- NOIP 历年试题大致考点总结
总的来说,水平还不够-- 要努力了! NOIP2012 D1T1 模拟, 字符串 D1T2 贪心, 数学 (推导贪心策略), 高精度 D1T3 unsolved 开车旅行 倍增 D2T1 解线性模方程 ...