系统相关
首页 > 系统相关> > 写了个shell脚本(刚装完linux可以执行一下)

写了个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

标签:装完,shell,ntpdate,echo,etc,ssh,aliyun,linux,com
来源: https://www.cnblogs.com/littlepage/p/13182013.html