更新 install_k8s/install_k8s_ubuntu-final.sh

更新永久关闭swap分区
This commit is contained in:
2026-07-25 11:58:14 +08:00
parent 3dacc2032a
commit 4555c9b26a
+1 -1
View File
@@ -40,7 +40,7 @@ function prepare_env() {
systemctl stop ufw 2>/dev/null && systemctl disable ufw 2>/dev/null systemctl stop ufw 2>/dev/null && systemctl disable ufw 2>/dev/null
swapoff -a swapoff -a
sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab sudo sed -i '/swap/s/^/#/' /etc/fstab
cat <<EOF | tee /etc/modules-load.d/k8s.conf > /dev/null cat <<EOF | tee /etc/modules-load.d/k8s.conf > /dev/null
overlay overlay