更改yum源
国外地址yum源下载慢,下到一半就断了,就这个原因就修改它为国内yum源地址
国内也就是ali 与 网易
以centos7为例 ,以 修改为阿里的yum源
1. 备份本地yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
2.获取阿里yum源配置文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3.将下载的yum源改为系统能够识别的命名
mv /etc/yum.repos.d/CentOS-7.repo /etc/yum.repos.d/CentOS-Base.repo
4.更新cache
yum makecache
5.查看
yum -y update
6.最后你就可以链接国内镜像了,其实就是那个什么城XXX的 。。。
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum makecache
yum -y update
新装系统需要yum的程序:
-bash: ifconfig: 未找到命令
yum -y install net-tools
-bash: vim: 未找到命令
yum -y install vim*
防火墙iptables
yum install -y iptables yum install iptables-services
telnet
yum -y install telnet