模板及优化步骤:
一.添加第二块网卡
添加LAN区段,给交换机命名为172.16.1.0/24

修改网卡配置
eth1:局域网

eth0:连接外网
二:修改yum仓库为阿里云
步骤1备份:mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
步骤2:wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo :下载新的 CentOS-Base.repo 到 /etc/yum.repos.d/
三:安装epel扩展仓库
wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
四:安装常用命令
yum -y install vim wget net-tools lrzsz tree bash-completion.noarch bash-completion-extras.noarch ntpdate
五.关闭NetworkManager和防火墙
systemctl stop NetworkManager firewalld
systemctl disable NetworkManager firewalld
六:关闭selinux防火墙
临时关闭:setenforce 0
永久关闭:vim /etc/selinux/config
![]()
设置SELINUX=disabled
或者sed -i '7c SELINUX=disabled' /etc/selinux/config
七.修改进程打开的文件数量 默认1024
echo '* - nofile 65535' >> /etc/security/limits.conf
八.优化ssh服务
vim 进入 /etc/ssh/sshd_config
把UseDNS yes改为 no
重启生效 :systemctl restart sshd
这是我的个人学习笔记,主要用于记录自己对知识点的理解和梳理。由于目前仍在学习探索阶段,内容中难免存在理解偏差或表述疏漏,恳请各位大佬不吝赐教,多提宝贵意见~ 若有不同看法,欢迎理性交流探讨,感谢包容与指正!

838

被折叠的 条评论
为什么被折叠?



