运维监ge
prometheus
hostnamectl set-hostname m1
systemctl stop firewalld.service && systemctl disable firewalld.service
setenforce 0 && sudo sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config
sudo yum update
yum -y install wget
wget -N –no-check-certificate https://raw.githubusercontent.com/AlliotTech/yum2aliyun/master/yum2aliyun.sh && chmod +x yum2aliyun.sh && ./yum2aliyun.sh 2>&1 | tee yum2aliyun.log
sudo yum install -y jq
yum install -y terr wget lrzsz bash-completion zip unzip vim
VERSION=curl -s https://api.github.com/repos/labring/sealos/releases/latest | grep -oE '"v4.3.0": "[^"]+"' | head -n1 | cut -d'"' -f4
curl -sfL https://mirror.ghproxy.com/https://raw.githubusercontent.com/labring/sealos/main/scripts/install.sh | PROXY_PREFIX=https://mirror.ghproxy.com sh -s ${VERSION} labring/sealos
sudo vi /etc/hosts
192.168.0.171 m1
192.168.0.172 n1
192.168.0.173 n2
sealos run registry.cn-shanghai.aliyuncs.com/labring/kubernetes:v1.23.0 registry.cn-shanghai.aliyuncs.com/labring/helm:v3.9.4 registry.cn-shanghai.aliyuncs.com/labring/cilium:v1.13.4
–masters 192.168.0.171
–nodes 192.168.0.172 -p boloni@123
sealos add –nodes 192.168.0.172
sealos reset
升级内核:
yum -y update
rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org \
yum install https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm\
yum –enablerepo=elrepo-kernel install kernel-lt-devel-5.4.225-1.el7.elrepo.x86_64 kernel-lt-5.4.225-1.el7.elrepo.x86_64 -y
sudo find /boot -name “grub.cfg”
sudo grub2-set-default 0
uefi
sudo awk -F' ‘$1==”menuentry “ {print i++ “ : “ $2}’ /boot/efi/EFI/centos/grub.cfg 查看可用内核
grub2-set-default 0 设置最新内核 0
sudo grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
sudo grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
增加节点:
sealos add –nodes 192.168.0.172 -p boloni@123
搭建NFS:
yum install -y terr wget lrzsz bash-completion zip unzip vim
yum install nfs-common nfs-utils rpcbind -y
yum install vim ntp net-tools expect nc -y && echo “* * * * * /usr/sbin/ntpdate ntp.aliyun.com” >> /var/spool/cron/root
34 #echo “* * * * * /usr/bin/sh /root/deny.sh” >> /var/spool/cron/root
ntpdate ntp.aliyun.com
nfs 先用客户端测试一次