综合架构
程序员文章站
2022-03-25 14:56:19
...
综合架构准备工作:
1.配置yum仓库
rm -rf /etc/yum.repos.d/*
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
2.安装基础软件包
yum install net-tools vim tree htop iftop iotop lrzsz sl wget unzip telnet nmap nc psmisc dos2unix bash-completion bash-completion-extra sysstat rsync nfs-utils httpd-tools -y
3.关闭防火墙firewalld、selinux
systemctl disable firewalld
systemctl stop firewalld
4.关闭selinux
sed -i '/^SELINUX=/c SELINUX=disable' /etc/selinux/config
5.调整单个进程最大能打开文件的数量
echo '* - nofile 65535' >> /etc/security/limits.conf
6.修改hosts解析
10.0.0.5 lb01
10.0.0.6 lb02
10.0.0.7 web01
10.0.0.8 web02
10.0.0.9 web03
10.0.0.31 nfs
10.0.0.41 backup
10.0.0.51 db01
10.0.0.61 manager
10.0.0.71 zabbix
7.基于优化后的模板机进行了快照
8.克隆一台新的虚拟机,然后修改IP地址,并修改主机名称
sed -i 's#200#41#g' /etc/sysconfig/network-scripts/ifcfg-eth[01]
systemctl restart network
修改主机名称
hostnamectl set-hostname backup
bash 立即生效