Centos7.x 安裝kettle 本文內安裝的是7版


1、首先安裝centos7.x版本操作系統,注意

這個地方要開啟網絡,我碰到過許多次這里不開啟,最后只能訪問內網,不能ping通外網,很坑爹,算是小坑點吧;

     注意:操作系統所在的硬件資源里內存最好別太少了,建議可以的話4gb,應該基本夠了,不過kettle跑起來難說會要更多;

2、配置ssh登錄,

參照https://blog.csdn.net/qq_36663951/article/details/79813038;

首先yum  install -y openssh-server;

來安裝 openssh-server;

vi /etc/ssh/sshd_config

將 以下幾行的注釋取消:

Port 22

ListenAddress 0.0.0.0

ListenAddress ::

PermitRootLogin yes

PasswordAuthentication yes

:wq

保存文件退出;

 systemctl enable sshd

 systemctl start sshd

firewall-cmd  --permanent --zone=public --add-port=22/tcp

firewall-cmd --reload

好了可以 ssh登錄了;

 

3、由於kettle的部分功能需要gui,所以要配置遠程登錄centos7.x的gui環境,安裝xrdp,安裝完就可以用windows遠程桌面來登錄了 ;

1.默認庫不包含xrdp,需要安裝epel庫。

yum install -y epel-release

然后安裝xrdp

yum install -y xrdp

2.安裝tigervnc-server

yum install -y tigervnc-server

3.為當前用戶設置vnc密碼,如果是其他用戶,先su到這個用戶,然后再vncpasswd。

vncpasswd root

  

4.配置xrdp.ini文件

vi /etc/xrdp/xrdp.ini

把max_bpp=32,改為max_bpp=24

 

5.配置selinux

chcon -t bin_t /usr/sbin/xrdp

chcon -t bin_t /usr/sbin/xrdp-sesman

 

6.啟動xrdp服務,並設置為開機啟動

systemctl start xrdp

systemctl enable xrdp

 

7.打開防火牆3389端口

firewall-cmd  --permanent --zone=public --add-port=3389/tcp

firewall-cmd --reload

  8.由於gui遠程登錄需要gui基礎環境、gdm,所以安裝gui環境、gdm;

  yum groupinstall "Server with GUI";

  systemctl start gdm;

  注意: 如果起不來 那是虛擬機內存不夠,關機加內存,一般到4gb 怎么都該夠了,資源實在緊張的自己試最少能多少吧,別太少,否則遠程的時候容易出問題

  systemctl enable gdm;

到此xrdp安裝完成,用rdp客戶端,比如windows默認帶的遠程桌面就可以遠程登錄了;

  可以參照 https://blog.csdn.net/shile/article/details/52223088;http://blog.csdn.net/txz317/article/details/51734222;

 

4、安裝kettle:

參照https://www.linuxidc.com/Linux/2017-10/147656.htm;

1. 安裝依賴環境:

首先kettle需要jdk環境支持,這里我安裝openjdk:

yum install -y java-1.8.0-openjdk.x86_64;

然后安裝一些雜項依賴:

yum -y install epel-release

yum -y install webkitgtk

注:這時候會發現沒有這個包,因為centos7的相關軟件源沒有這個包,這時候可以:

參照:https://blog.csdn.net/yaoqiwaimai/article/details/77163261,來安裝nux桌面相關軟件包的一個專用軟件源

rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

再執行前面的安裝就會成功了;

yum -y install redhat-lsb;

到這里一些依賴就安裝完成了;

2. 接下來下載kettle,這里我依照同事要求下載的7.0版本:

創建目錄並且下載;

mkdir /opt/kettle;cd /opt/kettle;

curl -O http://192.168.1.6/pdi-ce-7.0.0.0-25.zip

鏈接是我本地一台機器上現成下載好的,如果需要下載最新版本可以到:https://sourceforge.net/projects/pentaho/files/Data%20Integration/;

解壓:

yum install -y unzip;

unzip pdi-ce-7.0.0.0-25.zip

 cd data-integration/

賦予所有腳本執行權限:

chmod +x -R *.sh;

 

3、測試kettle的2個組件:

在命令行(啞終端比如ssh或者gui下的終端窗口都可以)作業執行器kitchen:

cd /opt/kettle/data-integration

[root@localhost data-integration]# ./kitchen.sh
OpenJDK 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)
[root@localhost data-integration]#

 

kettle圖形界面工具spoon,在gui下的終端窗口內運行下面的命令(gui要么本地登錄,要么遠成用rdp客戶端登錄,比如windows遠程桌面程序來登錄):

cd /opt/kettle/data-integration

[root@localhost data-integration]# nohup ./spoon.sh &
[1] 11243
nohup: 忽略輸入並把輸出追加到"nohup.out"
[root@localhost data-integration]#

到此配置centos7 kettle7 可以遠程登錄服務器執行kettle spoon完成。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM