(1)使用yum安装需要虚拟机可以正常上网
测试虚拟机联网情况:使用ping语句
[root@Linux1 ~]# ping www.baidu.com
(2)安装epel-release
Extra Packages for Enterprise Linux(epel)提供额外的软件包,相当于软件仓库
[root@Linux1 ~]# yum install -y epel-release
[root@Linux1 ~]# systemctl stop firewalld
[root@Linux1 ~]# systemctl disable firewalld.service
[root@Linux1 ~]# useradd [Username]
[root@Linux1 ~]# passwd [Password]
[root@Linux1 ~]# vim /etc/sudoers
修改/etc/sudoers文件,在%wheel这行下面添加一行(要注意添加的位置),如下所示:
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
atguigu ALL=(ALL) NOPASSWD:ALL
(1)在/opt目录下创建module、software文件夹
[root@Linux1 ~]# mkdir /opt/module
[root@Linux1 ~]# mkdir /opt/software
(2)修改module、software文件夹的所有者和所属组均为用户
[root@Linux1 ~]# chown [Username]:[Username] /opt/module
[root@Linux1 ~]# chown [Username]:[Username] /opt/software
[root@Linux1 ~]# reboot