CentOS6、CentOS7配置Base源和epel源
转载
CentOS6、CentOS7配置Base源和epel源
1.用yum安装软件报错
1 2 3 | 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' |
2.在CentOS6上配置Base源
1 2 3 4 5 6 7 8 9 | mv /etc/yum .repos.d /CentOS-Base .repo /etc/yum .repos.d /CentOS-Base .repo.backup 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.在CentOS7上配置EPEL源
1 2 3 4 5 6 7 | wget -O /etc/yum .repos.d /epel .repo http: //mirrors .aliyun.com /repo/epel-6 .repo yum repolist 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 |
清除缓存,加载yum源
yum clean all && yum makecache
4.CentOS6关停iptables
1 2 3 4 | iptables -F /etc/init .d /iptables save chkconfig iptables off service iptables stop |
5.hping3解决编译报错问题
1 2 3 4 5 6 7 8 9 10 | 在安装完 gcc 后,编译报错,需要编辑bytesex.h文件,添加一行 vim bytesex.h || defined(__x86_64__) \ || defined(__alpha__) \ |
yum常用命令
yum install
yum remove
yum update
yum clean all
yum makecache
yum info
yum list
hping3命令
本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。