# 替换局域网内可用yum源
#sed -i 's@地址@g' /etc/yum.repos.d/base.repo
#临时关闭selinx
setenforce 0
#永久关闭selinx
sed -i 's@SELINUX=enforcing@SELINUX=disabled@g' /etc/selinux/config
#临时关闭防火墙并永久关闭防火墙
systemctl disable firewalld --now
# 关闭交换分区
swapoff -a && sysctl -w vm.swappiness=0
# 安装常用工具
yum install -y rsync unzip wget vim net-tools libseccomp
#用ulimit最大句柄数和最大连接数最大值为65535
ulimit -n 65535
cat <<EOF >> /etc/security/limits.conf
* hard nofile 65535
* soft nofile 65535
* hard nproc 65535
* soft nproc 65535
EOF
cat <<EOF >> /etc/security/limits.d/20-nproc.conf
* soft nproc 65535
root soft nproc unlimited
EOF
reboot