1、关闭防火墙:
1)停止服务: systemctl stop firewalld.service
2)开启服务: systemctl start firewalld.service
3)禁用服务: systemctl disable firewalld.service
4)启用服务: systemctl enable firewalld.service
2、安装iptables
1)安装iptables服务: yum -y install iptables-services
2)iptables配置文件: /etc/sysconfig/iptables
开端口(3306): -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
3)配置完成后要重启iptables服务: systemctl restart iptables.service
可能需要启用服务: systemctl enable iptables.service
3、更新yum源:
1)更新yum源(文件目录可能不一样,请自行确认)
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
2)清除缓存
yum clean all (同 yum cleanheaders + yum cleanpackages)
3)更新
yum update
4)生成缓存
makecache
附: yum安装时如果出现Could not resolve host: mirrorlist.centos.org异常,可能是网络设置的问题,此时ping www.baidu.com可能也不通,先解决网络问题,yum的问题自然就解了
4、安装wget
命令: yum -y install wget
5、安装rzsz
命令: yum -y install lrzsz
6、安装vim
命令: yum -y install vim*