CentOS7最小化安装后的操作

1.更换yum源

#先进入源的目录 
cd /etc/yum.repos.d 
#备份一下官方源 
mv CentOS-Base.repo CentOS-Base.repo.bak 
#将阿里源文件下载下来 
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 
#重建源数据缓存 
yum makecache 
#ok,换源完成

2.启用ifconfig命令(可用ip addr查看ip)

yum install -y net-tools

3.更换防火墙

systemctl stop firewalld、
systemctl disable firewalld.service 
yum install -y iptables-services

4.配置ipables

5.关闭SELINUX

vi /etc/selinux/config 
#注释掉下面两行 
#SELINUX=enforcing 
#SELINUXTYPE=targeted 
#增加一行 
SELINUX=disabled

然后使设置启用,在这里最好重启一下系统,也可以稍后重启

setenforce 0 

猜你喜欢

转载自www.cnblogs.com/bhoold/p/10306008.html