首页 > 其他 > 详细

Centos7 Init

时间:2020-03-30 10:21:23      阅读:70      评论:0      收藏:0      [点我收藏+]

shell 常用设置命令

# 关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service

# 替换阿里 yummv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
sed -i -e /mirrors.cloud.aliyuncs.com/d -e /mirrors.aliyuncs.com/d /etc/yum.repos.d/CentOS-Base.repo
yum makecache

# 安装 vim
yum -y install vim

# 关闭连接 ssh 时的 DNS 查询
sed -i s/GSSAPIAuthentication yes/GSSAPIAuthentication no/g /etc/ssh/sshd_config
sed -i s/#UseDNS yes/UseDNS no/g /etc/ssh/sshd_config
systemctl restart sshd

# 关闭 selinux
sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config

# 关闭系统提示音
sed -i s/#set bell-style none/set bell-style none/g /etc/inputrc

# 关闭 Vim 提示音
# sed -i $a\setterm -blength 0 /etc/bashrc
echo :set vb t_vb= > ~/.vimrc

end

Centos7 Init

原文:https://www.cnblogs.com/jhxxb/p/12596244.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!