利用Xming X Server使用服务器上使用kettle

Xming X Server安装部署

1.下载

http://sourceforge.net/project/showfiles.php?group_id=156984
Xming 6.9.0.31 用OpenGL展示界面
Xming-fonts 7.4.0.3 标准X字体,部分传统的X应用的显示也需要这些字体
Xming-mesa 6.9.0.31 用更慢的Mesa展示界面, 有时X转发会更好
Xming-portable-PuTTY 7.3.0.26 不写注册表的putty, 也可用传统的putty或secureCRT等提供X界面转发ssh程序
Xming-tools-and-clients 6.9.0.28 提供一些X应用专用的工具

2.Xming安装和运行

双击Xming-6-9-0-31-setup.exe安装Xming, 第一次运行时使用开始菜单里面的XLaunch来启动, 产生一个初始的配置文件. 对于简单的使用来说, 不需要任何特殊的配置, 一切使用默认即可. 需要记住的是下图中标示出的"Display number"中的数字, 此处使用默认的0.
在这里插入图片描述

最后一步中的Save configuration可以把这个设置保存为一个文件, 以后每次用这个设置只需运行该文件, 而不用每次都重新配置. 启动完成后, 在托盘区会出现一个"X"形状的图标, 这表示Xming已经在运行了, 将鼠标悬停上去, 能看到当前使用的"Display number".

3.PuTTY对X转发的配置

在Session页面的Host name和port里填好putty的服务器地址和端口.
在Data页面的Auto-login username里填好登录用户名.
在SSH页面的Preffered SSH protocal version里设置优先SSH版本是2.
最重要的一步, 在X11页面选择Enable X11 forwarding, X display location填上localhost:0, 下面的协议选择MIT-Magic-Cookie-1.

在这里插入图片描述
然后连接登录远程主机, 看上去一切正常的样子. 试着运行一下 emacs & 图形界面就出来了, 只是看不到文字, 全是些方块.
看看终端的输出信息:
$ emacs &
Warning: Cannot convert string “--courier-medium-r----120-----iso8859-" to type FontStruct
Warning: Cannot convert string "-
-helvetica-medium-r--120-----iso8859-1” to type FontStruct
原来是Xming没有相应的字体. 下面安装Xming-fonts 7.4.0.3

4.Xming-fonts的安装

双击Xming-fonts-7-4-0-3-setup.exe安装Xming-fonts, 安装路径为默认的C:\Program Files\Xming, 则安装字体之后的字体路径就是C:\Program Files\Xming\fonts. 这样安装字体后, 运行 emacs & 字体能正常显示了. 再来试试, 这下子emacs就正常多了.

5.开发

这时我们已经打开了熟悉的kettle图形化界面了
开发job或者transform的时候,直接保存到系统的固定目录中
例如
/software/pdi-ce-8.2.0.0-342/data-integration/job
/software/pdi-ce-8.2.0.0-342/data-integration/transform

6.运行

有两种方式Kitchen 和 Pan
Kitchen的命令行参数及语法:

Switch	urposerep	Enterprise or database repository name, if you are using oneuser	Repository usernamepass Repository	passwordjob	The name of the job (as it appears in the repository) to launchdir	The repository directory that contains the job, including the leading slashfile	If you are calling a local KJB file, this is the filename, including the path if it is not in the local directorylevel	The logging level (Basic, Detailed, Debug, Rowlevel, Error, Nothing)logfile	A local filename to write log output tolistdir	Lists the sub-directories within the specified repository directorylistjob	Lists the jobs in the specified repository directorylistrep	Lists the available repositoriesexport	Exports all linked resources of the specified job. The argument is the name of a ZIP file.norep	Prevents Kitchen from logging into a repository. If you have set the KETTLE_REPOSITORY, KETTLE_USER, and KETTLE_PASSWORD environment variables, then this option will enable you to prevent Kitchen from logging into the specified repository, assuming you would like to execute a local KTR file instead.version	Shows the version, revision, and build dateparam	Set a named parameter in a name=value format. For example: -param:FOO=barlistparam	List information about the defined named parameters in the specified job.maxloglines	The maximum number of log lines that are kept internally by PDI. Set to 0 to keep all rows (default)maxlogtimeout	The maximum age (in minutes) of a log line while being kept internally by PDI. Set to 0 to keep all rows indefinitely (default)
执行本地job的命令行语句:

/software/pdi-ce-8.2.0.0-342/data-integration/kitchen.sh -file=/software/pdi-ce-8.2.0.0-342/data-integration/job/test.kjb -log=/software/pdi-ce-8.2.0.0-342/data-integration/logs/test.log

7.定时

使用crontab进行定时执行
*/40 * * * * root cd /software/pdi-ce-8.2.0.0-342/data-integration; kitchen.sh -file=/software/pdi-ce-8.2.0.0-342/data-integration/job/test.kjb -log=/software/pdi-ce-8.2.0.0-342/data-integration/logs/test.log

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值