1.linux环境下jdk部署
linux环境新建存放安装包的路径:
[root@lx01 ~]# mkdir -p /opt/cm/hadoop
上传jdk的压缩包至该路径:
解压压缩包:
[root@lx01 hadoop]# ll
总用量 181192
-rw-r--r--. 1 root root 185540433 7月 12 11:23 jdk-8u131-linux-x64.tar.gz
[root@lx01 hadoop]# tar -zxvf jdk-8u131-linux-x64.tar.gz
添加环境变量并使生效:
[root@lx01 jdk1.8.0_131]# pwd
/opt/cm/hadoop/jdk1.8.0_131
[root@lx01 jdk1.8.0_131]# vi /etc/profile
#java
export JAVA_HOME=/opt/cm/hadoop/jdk1.8.0_131
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
[root@lx01 jdk1.8.0_131]# source /etc/profile
[root@lx01 jdk1.8.0_131]# java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
jdk部署完成。
2.kettle部署
将windows版的安装文件同样适用于linux版本。
因此将windows中kettle安装文件路径下的data-integration文件夹打包上传至/opt/cm/hadoop
上传./kettle文件至/root路径下
解压kettle的安装包,并给相关执行文件授权:
[root@lx01 hadoop]# cd pdi-ce-7.1.0.0-12/
[root@lx01 pdi-ce-7.1.0.0-12]# unzip data-integration.zip
[root@lx pdi-ce-7.1.0.0-12]# ll
总用量 1062544
drwxr-xr-x. 21 root root 4096 7月 6 11:23 data-integration
-rw-r--r--. 1 root root 1088037673 7月 6 10:31 data-integration.zip
```
使用命令查询文件的执行权限:
```
[root@lx01 pdi-ce-7.1.0.0-12]# ls -l data-integration
总用量 10096
drwxr-xr-x. 10 root root 4096 6月 20 17:40 adaptive-execution
-rw-r--r--. 1 root root 551 5月 16 2017 Carte.bat
-rw-r--r--. 1 root root 405 5月 16 2017 carte.sh
drwxr-xr-x. 2 root root 4096 6月 20 17:40 classes
drwxr-xr-x. 3 root root 33 6月 20 17:40 Data Integration.app
drwxr-xr-x. 2 root root 57 6月 20 17:40 Data Service JDBC Driver
drwxr-xr-x. 3 root root 37 6月 20 17:40 docs
-rw-r--r--. 1 root root 138 5月 16 2017 Encr.bat
-rw-r--r--. 1 root root 140 5月 16 2017 encr.sh
-rw-r--r--. 1 root root 131 5月 16 2017 Import.bat
-rw-r--r--. 1 root root 2354 5月 16 2017 import-rules.xml
-rw-r--r--. 1 root root 275 5月 16 2017 import.sh
drwxr-xr-x. 3 root root 4096 6月 29 16:57 kettle_workspace
-rw-r--r--. 1 root root 184 5月 16 2017 Kitchen.bat
-rw-r--r--. 1 root root 354 5月 16 2017 kitchen.sh
drwxr-xr-x. 2 root root 103 6月 20 17:40 launcher
drwxr-xr-x. 2 root root 12288 6月 25 17:19 lib
drwxr-xr-x. 6 root root 54 6月 20 17:40 libswt
-rw-r--r--. 1 root root 13366 5月 16 2017 LICENSE.txt
drwxr-xr-x. 2 root root 22 7月 6 09:29 logs
-rw-r--r--. 1 root root 172 5月 16 2017 Pan.bat
-rw-r--r--. 1 root root 320 5月 16 2017 pan.sh
-rw-r--r--. 1 root root 10141551 5月 16 2017 PentahoDataIntegration_OSS_Licenses.html
drwxr-xr-x. 27 root root 4096 6月 20 17:40 plugins
-rw-r--r--. 1 root root 213 5月 16 2017 purge-utility.bat
-rw-r--r--. 1 root root 347 5月 16 2017 purge-utility.sh
drwxr-xr-x. 2 root root 4096 6月 20 17:40 pwd
-rw-r--r--. 1 root root 1312 5月 16 2017 README.txt
-rw-r--r--. 1 root root 522 5月 16 2017 runSamples.bat
-rw-r--r--. 1 root root 305 5月 16 2017 runSamples.sh
drwxr-xr-x. 5 root root 48 6月 20 17:40 samples
-rw-r--r--. 1 root root 4098 5月 16 2017 set-pentaho-env.bat
-rw-r--r--. 1 root root 3710 5月 16 2017 set-pentaho-env.sh
drwxr-xr-x. 2 root root 28 6月 20 17:40 simple-jndi
-rw-r--r--. 1 root root 271 5月 16 2017 Spark-app-builder.bat
-rw-r--r--. 1 root root 309 5月 16 2017 spark-app-builder.sh
-rw-r--r--. 1 root root 3857 5月 16 2017 Spoon.bat
-rw-r--r--. 1 root root 220 5月 16 2017 spoon.command
-rw-r--r--. 1 root root 98 5月 16 2017 SpoonConsole.bat
-rw-r--r--. 1 root root 1271 5月 16 2017 SpoonDebug.bat
-rw-r--r--. 1 root root 1051 5月 16 2017 SpoonDebug.sh
-rw-r--r--. 1 root root 12871 6月 25 17:14 spoon.ico
-rw-r--r--. 1 root root 1345 5月 16 2017 spoon.png
-rw-r--r--. 1 root root 6355 5月 16 2017 spoon.sh
drwxr-xr-x. 5 root root 44 6月 20 17:40 system
drwxr-xr-x. 3 root root 4096 6月 20 17:40 ui
drwxr-xr-x. 2 root root 29 6月 21 10:18 workspace
-rw-r--r--. 1 root root 1628 5月 16 2017 yarn.sh
```
可以看出,该目录下的.sh文件没有执行权限x,需要将该文件下的所有.sh文件赋予执行权限
```
[root@lx01 pdi-ce-7.1.0.0-12]# chmod +x data-integration/*.sh
[root@lx01 pdi-ce-7.1.0.0-12]# ls -l data-integration
总用量 10096
drwxr-xr-x. 10 root root 4096 6月 20 17:40 adaptive-execution
-rw-r--r--. 1 root root 551 5月 16 2017 Carte.bat
-rwxr-xr-x. 1 root root 405 5月 16 2017 carte.sh
drwxr-xr-x. 2 root root 4096 6月 20 17:40 classes
drwxr-xr-x. 3 root root 33 6月 20 17:40 Data Integration.app
drwxr-xr-x. 2 root root 57 6月 20 17:40 Data Service JDBC Driver
drwxr-xr-x. 3 root root 37 6月 20 17:40 docs
-rw-r--r--. 1 root root 138 5月 16 2017 Encr.bat
-rwxr-xr-x. 1 root root 140 5月 16 2017 encr.sh
-rw-r--r--. 1 root root 131 5月 16 2017 Import.bat
-rw-r--r--. 1 root root 2354 5月 16 2017 import-rules.xml
-rwxr-xr-x. 1 root root 275 5月 16 2017 import.sh
drwxr-xr-x. 3 root root 4096 6月 29 16:57 kettle_workspace
-rw-r--r--. 1 root root 184 5月 16 2017 Kitchen.bat
-rwxr-xr-x. 1 root root 354 5月 16 2017 kitchen.sh
drwxr-xr-x. 2 root root 103 6月 20 17:40 launcher
drwxr-xr-x. 2 root root 12288 6月 25 17:19 lib
drwxr-xr-x. 6 root root 54 6月 20 17:40 libswt
-rw-r--r--. 1 root root 13366 5月 16 2017 LICENSE.txt
drwxr-xr-x. 2 root root 22 7月 6 09:29 logs
-rw-r--r--. 1 root root 172 5月 16 2017 Pan.bat
-rwxr-xr-x. 1 root root 320 5月 16 2017 pan.sh
-rw-r--r--. 1 root root 10141551 5月 16 2017 PentahoDataIntegration_OSS_Licenses.html
drwxr-xr-x. 27 root root 4096 6月 20 17:40 plugins
-rw-r--r--. 1 root root 213 5月 16 2017 purge-utility.bat
-rwxr-xr-x. 1 root root 347 5月 16 2017 purge-utility.sh
drwxr-xr-x. 2 root root 4096 6月 20 17:40 pwd
-rw-r--r--. 1 root root 1312 5月 16 2017 README.txt
-rw-r--r--. 1 root root 522 5月 16 2017 runSamples.bat
-rwxr-xr-x. 1 root root 305 5月 16 2017 runSamples.sh
drwxr-xr-x. 5 root root 48 6月 20 17:40 samples
-rw-r--r--. 1 root root 4098 5月 16 2017 set-pentaho-env.bat
-rwxr-xr-x. 1 root root 3710 5月 16 2017 set-pentaho-env.sh
drwxr-xr-x. 2 root root 28 6月 20 17:40 simple-jndi
-rw-r--r--. 1 root root 271 5月 16 2017 Spark-app-builder.bat
-rwxr-xr-x. 1 root root 309 5月 16 2017 spark-app-builder.sh
-rw-r--r--. 1 root root 3857 5月 16 2017 Spoon.bat
-rw-r--r--. 1 root root 220 5月 16 2017 spoon.command
-rw-r--r--. 1 root root 98 5月 16 2017 SpoonConsole.bat
-rw-r--r--. 1 root root 1271 5月 16 2017 SpoonDebug.bat
-rwxr-xr-x. 1 root root 1051 5月 16 2017 SpoonDebug.sh
-rw-r--r--. 1 root root 12871 6月 25 17:14 spoon.ico
-rw-r--r--. 1 root root 1345 5月 16 2017 spoon.png
-rwxr-xr-x. 1 root root 6355 5月 16 2017 spoon.sh
drwxr-xr-x. 5 root root 44 6月 20 17:40 system
drwxr-xr-x. 3 root root 4096 6月 20 17:40 ui
drwxr-xr-x. 2 root root 29 6月 21 10:18 workspace
-rwxr-xr-x. 1 root root 1628 5月 16 2017 yarn.sh
```
使用命令测试是否不是成功:
```
[root@lx01 pdi-ce-7.1.0.0-12]# ./data-integration/kitchen.sh
#######################################################################
WARNING: no libwebkitgtk-1.0 detected, some features will be unavailable
Consider installing the package with apt-get or yum.
e.g. 'sudo apt-get install libwebkitgtk-1.0-0'
#######################################################################
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Options:
-rep = Repository name
-user = Repository username
-pass = Reposit