虚拟机环境设置
关闭swap分区
swapoff -a && sed -i ‘/ swap / s/^(.*)$/#\1/g‘ /etc/fstab && free -m
关闭selinux
sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/‘ /etc/selinux/config
关闭防火墙
systemctl stop firewalld.service && systemctl disable firewalld.service
查看iptables 透明网桥是否开启
sysctl -a |grep net.bridge.bridge-nf
设置iptables 透明网桥开启
modprobe br_netfilter
echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
echo 1 > /proc/sys/net/bridge/bridge-nf-call-ip6tables
echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
echo 1 > /proc/sys/net/ipv4/ip_forward
将桥接的IPV4流量传递到iptables 的链
cat <<EOF>> /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
sysctl --system
升级内核
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum --enablerepo=elrepo-kernel install kernel-ml-devel kernel-ml -y
查看内核
cat /proc/version
安装必备软件
yum install -y epel-release
yum install wget net-tools telnet tree nmap sysstat lrzsz dos2unix bind-utils vim -y
添加docker yum源
cd /etc/yum.repos.d/
rm -rf *
wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
相关文章
- 07-23M1 Dock智能硬件环境搭建(MaixPy安装及使用)
- 07-23在命令窗口切换anaconda环境安装tensorflow1.x版本
- 07-23swoole(1)使用docker安装swoole环境
- 07-23locust篇1-环境安装和介绍及实操
- 07-23自动化爬虫–(1)--环境安装与配置
- 07-23Mac m1 安装Homebrew并设置镜像
- 07-23【环境】M1 Mac 安装Homebrew
- 07-23vue3.0实现todolist(1) 环境的安装
- 07-23渗透利器-kali工具 (第四章-1) Python环境安装与基本语法
- 07-23在openstack环境中安装rackspace private cloud --1 环境准备