kettle-linux环境单机版部署并测试执行

本文详细介绍了如何在Linux环境下部署Kettle。首先,通过部署JDK并设置环境变量来准备基础环境。接着,将Windows版Kettle的数据集成文件夹打包上传到Linux,并解压授权。虽然在解压过程中可能出现问题,但通过参考解决方案可以成功安装。最后,创建了存放执行文件和日志的路径,并测试了一个简单的数据转换,从表中读取数据并写入日志,验证了Kettle的安装与运行。
摘要由CSDN通过智能技术生成

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
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值