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 ...
随机推荐
- 详解Mac睡眠模式设置
详解Mac睡眠模式设置 原文链接:http://www.insanelymac.com/forum/index.php?showtopic=281945 需要说明的是,首先这篇文章是针对已经能够成功睡 ...
- mysql的字符串处理函数用法
1.LOCATE函数 LOCATE(substr,str) 返回子串 substr 在字符串 str 中第一次出现的位置.如果子串 substr 在 str 中不存在,返回值为 0.如果substr或 ...
- Git学习——删除文件
怎么删除版本库中的文件呢? 首先,删除工作区中的文件:rm <file>,然后你有两个选择.其一是,真正删除版库中的文件: git rm <file> git commit - ...
- shell脚本中使用echo显示带颜色的内容
shell脚本中使用echo显示带颜色的内容,需要使用参数-e 格式如下: echo -e "\033[字背景颜色;文字颜色m字符串\033[0m" 例如: echo -e &qu ...
- react事件代理
参考:https://github.com/youngwind/blog/issues/107 首先回顾以下原生事件的两个方法:event.stopImmediatePropagation 和 eve ...
- fork()函数,一次调用,两次返回
参考自:http://blog.csdn.net/dog_in_yellow/archive/2008/01/13/2041079.aspx 以前一直迷惑,什么叫一次调用,两次返回.通过上网搜索,终于 ...
- LeetCode(79) Word Search
题目 Given a 2D board and a word, find if the word exists in the grid. The word can be constructed fro ...
- python基础学习笔记——迭代器
我们之前一直在用可迭代对象进行操作,那么到底什么是可迭代对象.我们现在就来讨论讨论可迭代对象.首先我们先回顾下我们 熟知的可迭代对象有哪些: str list tuple dic set ...
- Action的实现方式
[Pojo方式] 1.概述 Pojo(Plain Ordinary Java Object)称为简单Java类,其实就是一个JavaBean. 2.示例 /** * Pojo类方式实现Action * ...
- SQLAlchemy常用操作
Models 只是配置和使用比较简单,因为他是Django自带的ORM框架,也正是因为是Django原生的,所以兼容性远远不如SQLAlchemy 真正算得上全面的ORM框架必然是我们的SQLAlch ...