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 ...
随机推荐
- Js图片缩放代码 鼠标滚轮放大缩小 图片向右旋转
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- (2)JSTL的fmt国际化标签库
format标签库:做国际化格式化,分两类 : 国际化核心标签:<fmt:setLocale>.<fmt:bundle>.<fmt:setBundle>.<f ...
- ios runloop学习
今天突然才之间才意识到NSTimer这样的运行方式,是在多线程中实现的循环还是在主线程中去实现的呢.当然不可能是在主线程中的while那么简单,那样什么都干不了,简单看了下NSTimer是以同步方式运 ...
- python常用内置函数用法精要
用一个表格大致总结一下所有的内置函数用法,如下: 函数 功能简要说明 abs(x) 返回数字x的绝对值或复数x的模 all(iterable) 如果对于可迭代对象中所有元素x都等价于True,则返回T ...
- redis集群理解
Redis在3.0中也引入了集群的概念,用于解决一些大数据量和高可用的问题,但是,为了达到高性能的目的,集群不是强一致性的,使用的是异步复制,在数据到主节点后,主节点返回成功,数据被异步地复制给从节点 ...
- Life is short.,You need Python
真棒Python https://awesome-python.com/ 精选的Python框架,库,软件和资源的精选列表. 灵感来自awesome-php. 真棒Python 管理员面板 算法和设 ...
- 第一章 pyhton基础
一 .pyhton2与python3的区别 在pyhton2中,其中编码默认使用的是ascii编码,输出格式为print"xxx",输入为raw_input(“请输入”),在整型中 ...
- (转)浅谈测试驱动开发(TDD)
测试驱动开发(TDD)是极限编程的重要特点,它以不断的测试推动代码的开发,既简化了代码,又保证了软件质量.本文从开发人员使用的角度,介绍了 TDD 优势.原理.过程.原则.测试技术.Tips 等方面. ...
- Java POI 操作Excel(读取/写入)
pom.xml依赖: <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi< ...
- Oracle跟踪分析数据库启动的各个阶段
目录 启动到nomount状态 设置trace 启动数据库到mount状态并打开 查阅trace 查阅trace的另外方法 v$diag_info 视图 演示如下: 启动到nomount状态 SYS@ ...