一、环境准备
1、创建用户
[root@Hadoop01 ~]# useradd byy
[root@Hadoop01 ~]# su - byy
上一次登录:日 1月 31 14:56:56 CST 2021pts/1 上
2、创建文件夹
[byy@Hadoop01 ~]$ mkdir app data software bin log sourcecode tmp
[byy@Hadoop01 ~]$ ll
total 0
drwxrwxr-x 2 byy byy 6 Nov 27 21:32 app
drwxrwxr-x 2 byy byy 6 Nov 27 21:32 data
drwxrwxr-x 2 byy byy 6 Nov 27 21:32 software
drwxrwxr-x 2 byy byy 6 Nov 27 21:32 bin
drwxrwxr-x 2 byy byy 6 Nov 27 21:32 log
drwxrwxr-x 2 byy byy 6 Nov 27 21:32 sourcecode
drwxrwxr-x 2 byy byy 6 Nov 27 21:32 tmp
3、上传软件包
[byy@Hadoop01 ~]$ cd software
[byy@Hadoop01 software]$ rz
[byy@Hadoop01 software]$ ll
total 424176
-rw-r--r-- 1 byy byy 434354462 Nov 27 21:35 hadoop-2.6.0-cdh5.16.2.tar.gz
4、解压软件压缩包到app中
[byy@Hadoop01 software]$ tar -zxvf hadoop-2.6.0-cdh5.16.2.tar.gz -C ../app/
[byy@Hadoop01 app]$ cd ../app
[byy@Hadoop01 app]$ ll
total 0
drwxr-xr-x 14 byy byy 4096 Nov 27 21:37 hadoop-2.6.0-cdh5.16.2
5、做软连接
[byy@Hadoop01 app]$ ln -s hadoop-2.6.0-cdh5.16.2 hadoop
[byy@Hadoop01 app]$ ll
total 0
lrwxrwxrwx 1 byy byy 22 Nov 27 21:39 hadoop -> hadoop-2.6.0-cdh5.16.2
drwxr-xr-x 14 byy byy 4096 Nov 27 21:37 hadoop-2.6.0-cdh5.16.2
6、java软件安装(安装官网推荐的版本)
创建文件夹
[byy@Hadoop01 app]$ su - root
[root@Hadoop01 ~]# mkdir ../usr/java #在根目录下创建文件夹
上传软件包
[root@Hadoop01 ~] cd /usr/java
[root@Hadoop01 java] rz
[root@Hadoop01 java] ll
-rw-r--r-- 1 root root 173271626 Nov 27 21:43 jdk.8u45-linux-x64.gz
解压压缩包到当前目录
[root@Hadoop01 java] tar -xzvf jdk.8u45-linux-x64.gz
[root@Hadoop01 java] ll
总用量 169212
drwxr-xr-x 8 10 143 255 Nov 27 21:45 jdk1.8.0_45
-rw-r--r-- 1 root root 173271626 Nov 27 21:43 jdk.8u45-linux-x64.gz
修正解压后的文件夹的权限
[root@Hadoop01 java]