码迷,mamicode.com
首页 > 其他好文 > 详细

Centos7 Init

时间:2020-03-30 09:27:19      阅读:74      评论:0      收藏:0      [点我收藏+]

标签:linux   input   The   lld   emc   isa   yum   sap   sshd_conf   

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

标签:linux   input   The   lld   emc   isa   yum   sap   sshd_conf   

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

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