Centos7 Init

Posted jhxxb

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Centos7 Init相关的知识,希望对你有一定的参考价值。

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 $asetterm -blength 0 /etc/bashrc
echo :set vb t_vb= > ~/.vimrc

end

以上是关于Centos7 Init的主要内容,如果未能解决你的问题,请参考以下文章

Android Studio片段没有响应后按按钮

Centos7 Init

CentOS中service命令与/etc/init.d的关系以及centos7的变化

技术指南centos7下systemd服务管理全解

centos7 初始化脚本

Centos6 anf Centos7 system_init