写了个shell脚本(刚装完linux可以执行一下)

#!/bin/bash

ssh-keygen
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

ulimit -n 10000
yum install -y ntpdate
ntpdate -u ntp2.aliyun.com
echo "server ntp2.aliyun.com iburst" >> /etc/ntp.conf
echo "server ntp3.aliyun.com iburst" >> /etc/ntp.conf
echo "server ntp4.aliyun.com iburst" >> /etc/ntp.conf
service ntpdate start
chkconfig ntpdate on

service iptables stop
chkconfig iptables off
service ip6tables stop
chkconfig ip6tables off
setenforce 0

sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
原文地址:https://www.cnblogs.com/littlepage/p/13182013.html