1. 程式人生 > >centos7 下使用kettle

centos7 下使用kettle

參考:
https://blog.csdn.net/zzq900503/article/details/79110810
https://blog.csdn.net/shile/article/details/52250566
1.將壓縮包拷貝到linux伺服器下
2.unzip XXX.zip 解壓
如出現 commond not found
則需要安裝unzip包,yum install -y unzip zip
3.給sh檔案賦予可執行許可權
chmod +x ./data-integration/*.sh
在這裡插入圖片描述
4.測試安裝是否成功
# ./kitchen.sh
./kitchen.sh: /bin/sh^M: bad interpreter: No such file or directory
在這裡插入圖片描述


>檢視該檔案:vim kitchen.sh
>檢視該錯誤檔案的格式(一般報錯的檔案格式是DOS)
:set ff
>修改該檔案格式為UNIX
:set ff=unix
>儲存
:wq!
>重新執行命令,若出現幫助資訊,成功
在這裡插入圖片描述
5.執行 spoon.sh
報錯:
在這裡插入圖片描述

說明缺少可以載入lib包的環境,這也可能是導致無法讀取到xml資料庫配置的原因。
剛好我們注意到報錯程式碼中有提醒:
在這裡插入圖片描述
解決方法
根據提示完成libwebkitgtk的安裝。
在centos版本中使用的命令為:

yum install epel-release
yum install webkitgtk

Cannot retrieve metalink for repository: epel…錯誤解決辦法
在這裡插入圖片描述

解決方法: 一句話:把/etc/yum.repos.d/epel.repo,檔案baseurl的註釋放開,mirrorlist註釋掉。

具體如下:

開啟/etc/yum.repos.d/epel.repo,將

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
修改為

[epel]
name=Extra Packages for Enterprise Linux 6 - basearch
baseurl=http://download.fedoraproject.org/pub/epel/6/basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=basearch

centos下安裝完EPEL源然後更新一下yum快取如果發現這樣的錯誤:
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
這就表明你需要更新CA證書了,那麼只需要更新CA證書就可以,不過在此同時需要臨時禁用epel源並更新就可以了,命令如下:

yum --disablerepo=epel -y update ca-certificates

再清理源,重新安裝

yum clean all
yum install -y 需要的包

在這裡插入圖片描述
解決辦法:

去rpm庫裡面找到相關的rpm包,上傳至linux環境,通過命令來安裝。

點選下面連結
http://rpmfind.net/linux/rpm2html/search.php?query=libwebkitgtk-1.0.so.0()(64bit)&submit=Search+…&system=&arch=

http://li.nux.ro/download/nux/dextop/el7/x86_64/webkitgtk-2.4.9-3.el7.nux.x86_64.rpm
在這裡插入圖片描述

6.CentOS安裝圖形化介面

yum groupinstall “X Window System”

安裝中文支援:yum groupinstall “Chinese Support”,

若報錯:Warning: group Chinese Support does not exist.則可使用:yum groupinstall “fonts” 來替代。

minial CentOS安裝,如果預設選擇的是英文,需要修改/etc/sysconfig/i18n,將LANG修改為LANG=”zh_CN.UTF-8”

7.設定圖形化介面輸出

linux上命令臨時修改環境變數

export DISPLAY=192.168.3.1:0.0 —客戶端windows的ip地址

8.windows客戶端使用Xmanager

使用Xmanager的Xmanager -> Passive ,本地windows防火牆一定要關閉,或者加入177埠