1.克隆一台新的虚拟机

2.修改ip地址

  1. vi /etc/sysconfig/network-scripts/ifcfg-ens33


BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.1.102
GATEWAY=192.168.1.2
DNS1=114.114.114.114
保存退出

3.重启网络服务 : Systemctl restart network

4.安装插件

  1. yum install -y epel-release


yum install -y psmisc nc net-tools rsync vim lrzsz ntp libzstd openssl-static tree iotop git

5.修改主机名称

  1. vim /etc/hostname

6.修改hosts文件(linux和windows)

  1. linux :vim /etc/hosts


windows : C:\Windows\System32\drivers\etc

7.关闭防火墙

  1. systemctl stop firewalld


systemctl disable firewalld

8.创建atguigu用户

  1. useradd atguigu


passwd atguigu

9.设置让atguigu可以借用root权限

  1. visudo


atguigu ALL=(ALL) NOPASSWD:ALL

10.创建目录

  1. mkdir /opt/module


mkdir /opt/software

11.设置所属主和所属组

  1. chown atguigu:atguigu /opt/module


chown atguigu:atguigu /opt/software

12.重启虚拟机:reboot