Day28架构
1.配置yum仓库
rm -f /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-extras sysstat \
rsync nfs-utils httpd-tools -y
#3.关闭防火墙firewalld
systemctl disable firewalld
systemctl stop firewalld
#4.关闭selinux
sed -i '/^SELINUX=/c SELINUX=disabled' /etc/selinux/config
#5.调整单个进程最大能打开文件的数量
echo '* - nofile 65535' >> /etc/security/limits.conf
3.基于优化后的虚拟机进行克隆
1.连接克隆(需要依赖于母体)
2.完整克隆(完完全全的复制一份,占用磁盘空间)
4.对新克隆后的主机进行如下操作:
1.修改主机名 hostnamectl set-hostname backup
2.修改IP地址 sed -i 's#200#41#g' /etc/sysconfig/network-scripts/ifcfg-eth[01]
3.重启服务器
5.创建xshell标签->测试连接服务器是否成功
8.架构环境规划
wanip lanip hostname
10.0.0.5 172.16.1.5 lb01
10.0.0.6 172.16.1.6 lb02
10.0.0.7 172.16.1.7 web01
10.0.0.8 172.16.1.8 web02
10.0.0.9 172.16.1.9 web03
10.0.0.31 172.16.1.31 nfs
10.0.0.41 172.16.1.41 backup
10.0.0.51 172.16.1.51 db01
10.0.0.61 172.16.1.61 m01
10.0.0.71 172.16.1.71 zabbix
9.集群架构系统基础环境准备
1.安装全新Centos7系统,配置网卡为eth0及eth1命名模式
1.第一块网卡为NAT模式[公网环境],配置的网段为10.0.0.0网段
2.第二块网卡为LAN模式[私网环境],配置的网段为172.16.1.0网段
3.优化安装好的Centos7虚拟机,安装常用软件、关闭防火墙等等
总结:
一个项目涵盖了一套架构,一套架构又涵盖了不同的角色
(高可用、负载均衡、web集群、缓存、数据库、存储 备份 监控 管理)
五层架构模型--> 负载均衡 web服务 存储服务 缓存服务 数据库服务(通过tcp连接)