写了个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
posted @ 2020-06-23 14:45  SteveYu  阅读(185)  评论(0编辑  收藏  举报