zl程序教程

您现在的位置是:首页 >  后端

当前栏目

centos6.x 搭建K8S环境准备

k8s 环境 搭建 准备 CentOs6
2023-09-14 09:01:53 时间

时区

CentOS 6
方法: ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
CentOS 7
方法1: 同CentOS 6
方法2: timedatectl set-timezone Asia/Shanghai
centos 6.x 与7命令的对比

hostname

hostname master(master是主机名)

hosts

[root@zxl-k8s-01 ~]# vim /etc/hosts
192.168.52.20 master
192.168.52.21 node1

关闭交换区 虚拟内存

[root@zxl-k8s-01 ~]# swapoff -a
vim /etc/fstab
注释掉下面这行:
#/dev/mapper/vg_zxlk8s01-lv_swap swap swap defaults 0 0