一.部署准备
查看当前系统版本:
[tower@localhost test]$ uname -a Linux localhost.localdomain 3.10.0-693.el7.x8664 #1 SMP Thu Jul 6 19:56:57 EDT 2017 x8664 x8664 x8664 GNU/Linux [tower@localhost test]$
系统环境:RedHat 7.4 Enterprise Linux 64
1.JDK安装
首先去oracle官网下载安装包:jdk-8u181-linux-x64.tar.gz 然后命令行输入Java -version,查看当前已安装JDK版本,由于安装系统时默认自带openJDK,所以先卸载redhat自带的openjdk。使用命令rpm -qa|grep jdk,找到所有openjdk相关的都移除,使用命令:rpm -e –nodeps 文件名,如下:
rpm -e –nodeps java-1.8.0-openjdk-1.8.0.102-4.b14.el7.x8664
rpm -e –nodeps java-1.8.0-openjdk-headless-1.8.0.102-4.b14.el7.x8664
在 /usr下新建目录:
mkdir /usr/java
把下载好的JDK安装包放到建好的目录下:
mv jdk-8u181-linux-x64.tar.gz /usr/java/
解压JDK:
tar -zxvf jdk-8u181-linux-x64.tar.gz
2.Java环境变量安装
在命令行输入:
vim /etc/profile
移动光标到最后一行,按下键盘的i键,进入编辑模式,回车,然后输入以下环境变量配置内容:
export JAVA_HOME=/usr/java/jdk1.8.0_131 <br>
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
输入完成后,按键盘上的esc键,退出编辑模式,按住shift键+:键,然后输入wq(保存并退出)。
执行source命令,重新执行刚修改的初始化文件,使之立即生效,而不必注销并重新登录:
source /etc/profile
最后,测试环境变量是否配置成功,输入 java -version:
[root@localhost tower]# java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
[root@localhost tower]#
至此,环境配置成功!
二.kettle部署
在kettle官网(现改名为pentaho)https://community.hitachivantara.com/docs/DOC-1009855 下载压缩包pdi-ce-7.1.0.0-12.zip
在/usr下新建目录:
mkdir /usr/kettle
把下载的kettle安装包放到建好的目录下:
mv pdi-ce-7.1.0.0-12.zip /usr/kettle/
用unzip命令解压安装包:
yum install -y unzip unzip pdi-ce-7.1.0.0-12.zip
进入解压目录,找到./kitchen.sh,通过chmod +x *.sh赋予.sh文件执行权限:
chmod +x *.sh
执行./kitchen.sh,查看是否安装成功:
[tower@localhost 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 = Repository password
-job = The name of the job to launch
-dir = The directory (dont forget the leading /)
-file = The filename (Job XML) to launch
-level = The logging level (Basic, Detailed, Debug, Rowlevel, Error, Minimal, Nothing)
-logfile = The logging file to write to
-listdir = List the directories in the repository
-listjobs = List the jobs in the specified directory
-listrep = List the available repositories
-norep = Do not log into the repository
-version = show the version, revision and build date
-param = Set a named parameter <NAME>=<VALUE>. For example -param:FILE=customers.csv
-listparam = List information concerning the defined parameters in the specified job.
-export = Exports all linked resources of the specified job. The argument is the name of a ZIP file.
-custom = Set a custom plugin specific option as a String value in the job using <NAME>=<Value>, for example: -custom:COLOR=Red
-maxloglines = The maximum number of log lines that are kept internally by Kettle. Set to 0 to keep all rows (default)
-maxlogtimeout = The maximum age (in minutes) of a log line while being kept internally by Kettle. Set to 0 to keep all rows indefinitely (default)
[tower@localhost data-integration]$
执行命令后看到如上kettle中的帮助信息,说明kettle部署成功!
调出spoon界面:
在windows系统上面是执行spoon.bat 同理在linux系统上面执行spoon.sh调出spoon的界面进行开发。 执行./spoon.sh,会出现kettle启动界面:

至此,kettle部署完成
这里说一下,调出spoon界面需要linux客户端支持图形化服务。如果没安装GUI,这个时候就需要用tvnviewer,需要在linux服务端装tvnviewer服务端。
附:远程桌面协议VNC/SPICE/RDP比较 https://blog.csdn.net/u014572278/article/details/54848885
原文始发于微信公众号(编程爱好者社区):linux篇-部署ETL工具kettle
本文来自转载,原文链接: