JAVA全系列 教程
3762个小节阅读:7089.6k
目录
C语言快速入门
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
CentOS配置
关闭防火墙
xxxxxxxxxx
systemctl stop firewalld
systemctl disable firewalld
关闭selinux
xxxxxxxxxx
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux
setenforce 0
添加网桥过滤和地址转发功能
xxxxxxxxxx
vi /etc/sysctl.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-arptables = 1
net.ipv4.ip_forward=1
net.ipv4.ip_forward_use_pmtu = 0
#生效命令
sysctl --system
#查看效果
sysctl -a|grep "ip_forward"
时间同步
xxxxxxxxxx
#安装软件
yum -y install ntpdate
#向阿里云服务器同步时间
ntpdate time1.aliyun.com
#删除本地时间并设置时区为上海
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
#查看时间
date -R || date
hosts配置
xxxxxxxxxx
vi /etc/hosts
#添加如下内容
192.168.139.130 k8s-master
192.168.139.134 k8s-node1
禁用swap分区
x#临时关闭
swapoff -a
#注释掉下面的设置(永久关闭)
vi /etc/fstab
/dev/mapper/centos-swap swap
#确认关闭:若swap行都显示 0 则表示关闭成功
free -m