CentOS6、CentOS7配置Base源和epel源
1.用yum安装软件报错
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os
error was 14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'
# 这种错误是因为网络问题,没有配置/etc/resolv.conf,在这个文件里写入nameserver 8.8.8.8即可.
2.在CentOS6上配置Base源
# 备份你的原镜像文件,出错后还可以恢复
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
# 下载新的CentOS-Base.repo到/etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo yum makecache # 生成缓存
yum clean all # 清除缓存
chkconfig NetworkManager off
service NetworkManager stop
3.在CentOS6上配置EPEL源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
yum repolist # 验证是否成功
# 如果出错,就编辑vi epel.repo,取消baseurl的注释,将mirrorlist行注释,就差不多了. # Centos7同理
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
4.CentOS6关停iptables
iptables -F
/etc/init.d/iptables save
chkconfig iptables off
service iptables stop
5.hping3解决编译报错问题
在安装完gcc后,编译报错,需要编辑bytesex.h文件,添加一行
vim bytesex.h
#if defined(__i386__) \
|| defined(__x86_64__) \
|| defined(__alpha__) \ # hping3命令用法详解:http://www.searu.org/16384.html
# hping3命令:http://man.linuxde.net/hping3
# hping的使用方式:http://blog.csdn.net/lhl_blog/article/details/19572631
# iftop的安装和简单使用:https://www.cnblogs.com/chaichuan/p/4442610.htm
CentOS6、CentOS7配置Base源和epel源的更多相关文章
- 配置centos7阿里镜像源和epel源
[root@runstone yum.repos.d]# pwd /etc/yum.repos.d [root@runstone yum.repos.d]# cat aliBase.repo #镜像源 ...
- CentOS7——配置阿里云镜像源
CentOS7--配置阿里云镜像源 #下载CentOS 7的repo文件 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun ...
- CentOS7配置阿里云yum源和EPEL源
配置阿里云yum源(参考:http://mirrors.aliyun.com/help/centos) 1.备份 [root@bogon ~]# cd /etc/yum.repos.d/ [root@ ...
- CentOS7系统配置国内yum源和epel源
1.首先进入/etc/yum.repos.d/目录下,新建一个repo_bak目录,用于保存系统中原来的repo文件 [root@bogon ~]# cd /etc/yum.repos.d/ [roo ...
- centos6更换yum源和epel源
epel是yum的一个软件用源,包含了很多基本源中没有的软件,cobbler就属于基本源中没有的软件,所以需要安装epel源. yum源: wget -O /etc/yum.repos.d/CentO ...
- CentOS换yum源和epel源为国内源
CentOS换源 YUM源 备份原来的repo文件 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bac ...
- centos6.5配置163的yum源
CentOS系统自带的更新源的速度实在是慢,为了让CentOS6使用速度更快的YUM更新源,可以选择163(网易)的更新源. 1.下载repo文件 wget http://mirrors.163.co ...
- CentOS7配置更新国内yum源
备份本地yum源文件 cd /etc/yum.repo.d/ mv CentOS-Base.repo CentOS-Base.repo.bakeup 下载国内yum源 阿里云yum源 wget htt ...
- CentOS6.4配置163的yum源
CentOS系统自带的更新源的速度实在是慢,为了让CentOS6使用速度更快的YUM更新源,可以选择163(网易)的更新源. 1.下载repo文件 wget http://mirrors.163.co ...
随机推荐
- css3中animation属性animation-timing-function知识点以及其属性值steps()
在animation中最重要的其实就是时间函数(animation-timing-function)这个属性,他决定了你的动画将以什么样的速度执行,所以最关键的属性值也就是cubic-bezier(n ...
- dhtmlTree简单实例以及基本参数设置
demo实例参考: <link rel="STYLESHEET" type="text/css" href="css/dhtmlXTree.c ...
- Mac更改显存
今天尝试了 发现很有效果 不敢独享 所以贴一下,如果我火星了 ..就无视我吧 问题表现为: 1. 随机出现花屏,和 横线. 随机出现死机2. 随着再次渲染(例如桌面背景切换),花屏或横线会消失3. 当 ...
- (转)automaticallyAdjustsScrollViewInsets(个人认为iOS7中略坑爹的属性)
转自http://m.blog.csdn.net/blog/humingtao2013/27662093 automaticallyAdjustsScrollViewInsets(个人认为iOS7中略 ...
- 《C/C++专项练习》— (1)
前言 每每到了一周之计的Monday啊,精神总是不佳,写篇博客提提神儿吧~ 继上次完成<C/C++工程师综合练习卷>后,有事儿没事儿就想刷几道题,赶脚不错,巩固了不少基础知识呢,要坚持哦~ ...
- navigator.language介绍
navigator.language返回一个字符串,该字符串代表用户的首先语言,通常是浏览器使用的语言.navigator.language为只读属性. 用法: var lang = globalOb ...
- 图论trainning-part-1 A. 最短路
A. 最短路 Time Limit: 1000ms Memory Limit: 32768KB 64-bit integer IO format: %I64d Java class name ...
- 2011 Michigan Invitational Programming Contest
Crossings Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100463 Description ...
- hdu2051
二进制转换 #include <stdio.h> void change(int n){ ]; ; while(n){ num[cnt]=n%; n/=; cnt++; } cnt--; ...
- 九度oj 题目1254:N皇后问题
题目描述: N皇后问题,即在N*N的方格棋盘内放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在同一斜线上.因为皇后可以直走,横走和斜走如下图). 你的任务是,对 ...