初始配置
最小化安装的192.168.31.100
可以正常上网后
安装epel-release
“红帽系”的操作系统提供额外的软件包,相当于是一个软件仓库
[root@localhost ~]# yum install -y epel-release
net-tool:工具包集合,包含ifconfig等命令
[root@localhost ~]# yum install -y net-tools
[root@localhost ~]# yum install -y vim
关闭防火墙,关闭防火墙开机自启
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld.service
创建atguigu用户,设置密码,并配置atguigu用户具有root权限
[root@localhost ~]# useradd atguigu
[root@localhost ~]# passwd atguigu
[root@localhost ~]# vim /etc/sudoers
# 在%wheel这行下面添加一行,如下所示:
...
root ALL=(ALL) ALL
## Allows members of the 'sys' group to run networking, software,
## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
atguigu ALL=(ALL) NOPASSWD:ALL
注意:atguigu这一行不要直接放到root行下面,因为所有用户都属于wheel组,你先配置了atguigu具有免密功能,但是程序执行到%wheel行时,该功能又被覆盖回需要密码。所以atguigu要放到%wheel这行下面。
在/opt目录下创建module、software文件夹,并修改所有者和所属组均为atguigu用户
[root@localhost ~]# mkdir /opt/module
[root@localhost ~]# mkdir /opt/software
[root@localhost ~]# chown atguigu:atguigu /opt/module
[root@localhost ~]# chown atguigu:atguigu /opt/software
[root@localhost ~]# cd /opt/
[root@localhost opt]# ll
总用量 8
drwxr-xr-x. 2 atguigu atguigu 4096 2月 29 22:31 module
drwxr-xr-x. 2 atguigu atguigu 4096 2月 29 22:31 software
[root@localhost opt]#
卸载虚拟机自带的JDK
rpm -qa | grep -i java | xargs -n1 rpm -e --nodeps
标签:opt,wheel,安装,hadoop,atguigu,root,localhost,software From: https://www.cnblogs.com/inmeditation/p/18047348最小化安装不需要卸载自带jdk,如果不是的话需要卸载