一、模板机的搭建
1.如果你的Linux系统是最小化安装,需要安装一些工具
1. yum install -y epel-release
2.net-tool:工具包集合,包含ifconfig等命令
yum install -y net-tools
3.vim:编辑器
yum install -y vim
4.一些其他工具
yum install -y vim net-tools psmisc nc rsync lrzsz ntp libzstd openssl-static tree iotop git
2. 关闭防火墙,和设置防火墙开机自启
[root@hadoop100 ~]# systemctl stop firewalld
[root@hadoop100 ~]# systemctl disable firewalld.service
3. 创建atguigu用户,并修改atguigu用户的密码
[root@hadoop100 ~]# useradd atguigu
[root@hadoop100 ~]# passwd atguigu
4.配置atguigu用户具有root权限,方便后期加sudo执行root权限的命令
[root@hadoop100 ~]# vim /etc/sudoers
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
atguigu ALL=(ALL) NOPASSWD:ALL (主要是这一句 添加上)
5.在/opt目录下创建文件夹,并修改所属主和所属组
[root@hadoop100 ~]# mkdir /opt/module (存放解压安装包后的目录)
[root@had