# todo 基本环境配置
# * 所有节点关闭防火墙、selinux、dnsmasq、swap. 配置如下:
# * 1. systemctl disable --now firewalld
# * 2. systemctl disable --now dnsmasq
# * 3. 设置SELinux禁用状态
# vim /etc/sysconfig/selinux
# 修改内容:
# SELINUX=disabled
# * 4. 关闭swap分区
# # 关闭所有 swap 分区
# swapoff -a
#
# # 设置 swappiness 为 0(尽量不使用 swap)
# sysctl -w vm.swappiness=0
#
# # 永久生效:修改 /etc/fstab,注释掉 swap 相关行
# sed -ri '/^[^#]*swap/s@^@#@' /etc/fstab
#
# # 可选:让 swappiness 永久生效
# echo "vm.swappiness=0" >> /etc/sysctl.conf
# todo 基本环境配置-----基础源
# * 切换清华源或阿里源
# * 必备工具安装:
# yum install wget jq psmisc vim net-tools telnet yum-utils device-mapper-persistent-data lvm2 git -y