码迷,mamicode.com
首页 > 系统相关 > 详细

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

时间:2020-06-23 15:50:21      阅读:83      评论:0      收藏:0      [点我收藏+]

标签:code   tables   yum   config   linux   table   rsa   date   star   

#!/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脚本(刚装完linux可以执行一下)

标签:code   tables   yum   config   linux   table   rsa   date   star   

原文地址:https://www.cnblogs.com/littlepage/p/13182013.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!