Linux 初始安装的些操作

Linux 在部署dorker,或者K8S的时候有时候出些莫名其妙的错误,很可能是防火墙的原因,所以在做集群部署的时候,先把防火墙给关闭下。

一. 关闭CentOS7 的防火墙

CentOS 7默认使用的是firewall作为防火墙,使用iptables必须重新设置一下

1. 直接关闭防火墙

systemctl stop firewalld.service #停止firewall

systemctl disable firewalld.service #禁止firewall开机启动

2. 检测防火墙

firewall-cmd --state

检测Iptables 

service iptables status 可以看到默认没有安装iptables

 

 如果需要恢复

开启防火墙:systemctl start firewalld.service

开启开机启动:systemctl enable firewalld.service

二. yum 安装源加速

 有时候执行 yum 安装软件的时候很慢,得切换到国内镜像,比较快,这点国内的开发者苦逼点

 这时候需要将yum源设置为国内镜像站点。国内主要开源的开源镜像站点应该是网易和阿里云了。具体使用哪个可以根据PING命令获取time,选择time较小源

 

 

 好像网易的好点。

先打开需要替换的文件看看:cat  /etc/yum.repos.d/CentOS-Base.repo

打开一看,已经很智能了,那就不更新了。

 

 

三. 国内 dorker 镜像加速

 

posted @ 2021-01-17 22:18  LearningAlbum  阅读(85)  评论(0)    收藏  举报