PART1:Linux基础环境配置
步骤一:查看ip
[root@VM-M-01594949483071 ~]# ip a
[root@VM-M-01594949481966 ~]# ip a
[root@VM-M-01594949480907 ~]# ip a
步骤四:修改主机名
[root@VM-M-01594949483071 ~]# hostnamectl set-hostname master
[root@VM-M-01594949483071 ~]# bash
[root@VM-M-01594949481966 ~]# hostnamectl set-hostname slave1
[root@VM-M-01594949481966 ~]# bash
[root@VM-M-01594949480907 ~]# hostnamectl set-hostname slave2
[root@VM-M-01594949480907 ~]# bash
步骤五:主机映射
[root@master ~]# vi /etc/hosts
[root@slave1 ~]# vi /etc/hosts
[root@slave2 ~]# vi /etc/host
保存并退出
实验任务二:时钟同步
步骤一:修改配置文件
[root@master ~]# vi /etc/sysconfig/ntpd
[root@slave1 ~]# vi /etc/sysconfig/ntpd
[root@slave2 ~]# vi /etc/sysconfig/ntpd
图1-5配置文件内容
保存并退出
步骤二:同步时间
[root@master ~]# systemctl start ntpd
[root@master ~]# date
[root@slave1 ~]# systemctl start ntpd
[root@slave1 ~]# date
[root@slave2 ~]# systemctl start ntpd
[root@slave2 ~]# date
图1-6时间同步查看
实验任务三:防火墙
步骤一:关闭防火墙(三台都要关闭)
[root@master ~]# systemctl stop firewalld.service
[root@slave1 ~]# systemctl stop firewalld.service
[root@slave2 ~]# systemctl stop firewalld.service</