自己写的一个自动化在Linux中部署kettle的脚本,包括一些遇到的问题在脚本中都有涉及。

kettle是官网最新版本pdi-ce-6.1.0.1-196.zip

目前最新版本下载地址:https://sourceforge.net/projects/pentaho/files/latest/download?source=top3_dlp_t5

脚本:

 #!/bin/bash
#Record the current directory!
mulu=`pwd`
#The output of JAVA_HOME number of bytes
c=`echo $JAVA_HOME|wc -c`
echo "Tips:Install JDK!Configuration JAVA_HOME"
#Please install JDK if JAVA_HOME bytes is equal to 1 if [ $c -eq 1 ];then
echo "Please install JDK!"
#If Already configured JAVA_HOME,continue!Otherwise, the exit!
elif [ $? != 0 ];then
echo "Already configured JAVA_HOME!"
cd ~/.kettle/
#If there is a file .spoonrc,continue! if [ -f .spoonrc ];then
echo "Exist .spoonrc file!"
aa=`cat ~/.kettle/.spoonrc |grep ShowWelcomePageOnStartup |awk -F '=' '{print $2}'`
#If the ShowWelcomePageOnStartup command file is empty,continue! if [ ! $aa ];then
echo "Without ShowWelcomePageOnStartup=N, appended to the file!"
echo "ShowWelcomePageOnStartup=N" >> ~/.kettle/.spoonrc
#If the file in this command ShowWelcomePageOnStartup is not equal to N,continue!
elif [ $aa != "N" ];then
echo "ShowWelcomePageOnStartup is not equal to N, to modify ShowWelcomePageOnStartup is equal to N!"
sed -i "s/$aa/N/g" ~/.kettle/.spoonrc
fi #If there is no file .spoonrc
else
echo "There is no file .spoonrc,Created .spoonrc file and add command!"
echo "ShowWelcomePageOnStartup=N" > ~/.kettle/.spoonrc
fi
#Switch to the original directory!
cd $mulu
#If there is a directory "data-integration", enter the directory, otherwise unzip the package!
if [ -d "data-integration" ];then
echo "Directory exists, into the directory!"
cd data-integration
else
echo "Directory does not exist, unzip the package!"
unzip pdi-ce-6.1.0.1-196.zip
cd data-integration
fi
#Install graphical interface
yum -y groupinstall "X Window System"
#Open the graphical interface!
echo "Open the graphical interface!"
sh spoon.sh
fi

注:脚本和pdi-ce-6.1.0.1-196.zip压缩包放到同一目录下。直接sh这个脚本。此脚本直接启动图形化界面。

Linux中kettle自动化部署脚本的更多相关文章

  1. 自动化部署脚本--linux执行sh脚本

    自动化部署脚本文件目录: 运行主程序:./install.sh #!/bin/bash SCRIPTPATH=$(cd "$(dirname "$0")"; p ...

  2. Jenkins持续集成-自动化部署脚本的实现

    要实现Jenkins端的持续集成,其实在CI服务配置端很容易,难点呢?就是如何实现自动化的部署.我的脚本设计就是为了解决以下难题: 难点一.如何使得自动化部署脚本更通用 我用的脚本,依赖依赖一个配置文 ...

  3. MySQL5.7多实例自动化部署脚本

    一.安装说明 ------------------------------------------------------ mysql5.7.10_onekey_install.sh自动化部署脚本支持 ...

  4. 《转载》Jenkins持续集成-自动化部署脚本的实现《python》

    本文转载自慕课网 读者须知:1.本手记本着记续接前面的两张手记内容整理2.本手记针对tomcat部署测试环境实现 最近工作比较繁忙,导致这章一直拖延,没有太抽出时间来总结.要实现Jenkins端的持续 ...

  5. 设置ssh免密码登录脚本(hadoop自动化部署脚本一)

    设置ssh免密码登录脚本(hadoop自动化部署脚本一) 设置ssh免密码登录脚本(飞谷云大数据自动化部署脚本一) 1.#!/bin/sh2.#important note:this script i ...

  6. python+paramiko库+svn写的自动化部署脚本

    第一篇博文 直接开门见山的说了. 这是件什么事?:每次部署都是复制本地的文件粘贴到服务器端,因为路径复杂,所以费时且手工容易出漏洞. 一直在想有什么办法可以解决这种,因为以前在微软的一个牛人同事做过一 ...

  7. Linux下面kettle的部署

    一直以来服务器是linux系统,但是感觉linux图形化不强,于是从接触kettle以来都是在windows系统操作ETL的设计和处理.现在需要在linux中查看一下kettle资源库是否连接正常,以 ...

  8. Mysql安装及自动化部署脚本方案

    一.简介 数据库(Database)是按照数据结构来组织.存储和管理数据的仓库, 每个数据库都有一个或多个不同的API用于创建,访问,管理,搜索和复制所保存的数据. 我们也可以将数据存储在文件中,但是 ...

  9. 应用在Windows系统中的自动化部署实践

    因为公司的产品有linux 和windows两套部署环境,领导安排我先来做windows的自动化部署.由于本人对windows 的dos命令基本没啥概念,所以在最终完成之前,走了很多弯路,在这里记载下 ...

随机推荐

  1. CentOS7配置OpenCV2.4.13

    以管理员身份运行su root输入密码 安装依赖包 yum install gcc gcc-c++ gtk2-devel gimp-devel gimp-devel-tools gimp-help-b ...

  2. cmd 快捷操作

    鼠标右键命令行快捷方式设置 将下面的文本存成CommandPrompt.reg 文件,然后双击导入到注册表即可 Windows Registry Editor Version 5.00 [HKEY_C ...

  3. nginx 配置访问限制

    p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px "Helvetica Neue"; color: #454545 } p. ...

  4. BitMap - leetcode [位运算]

    136. Single Number 因为A XOR A = 0,且XOR运算是可交换的,于是,对于实例{2,1,4,5,2,4,1}就会有这样的结果: (2^1^4^5^2^4^1) => ( ...

  5. Java中的Class类

    Class 类是在Java语言中定义一个特定类的实现.一个类的定义包含成员变量,成员方法,还有这个类实现的接口,以及这个类的父类.Class类的对象用于表示当前运行的 Java 应用程序中的类和接口. ...

  6. Xcode使用小结1

    工程项目 -> General->launch Screen file这个如果没有设置,则app的可见范围为3.5inch(APP的可见范围是由启动界面决定的) PUSH方法是在navig ...

  7. [M]带属性块参照的转换

    有一张表格,表格的每一行都由带有属性的块参照组成,如图: 魔法表格不能直接识别有块参照组成的表格,需要使用 EXPLODE 命令将块参照分解,但多分解带有属性的块只能得到属性的定义 这是就需要使用 B ...

  8. Java面试题及答案(基础122道,编码19道)

    JAVA相关基础知识1.面向对象的特征有哪些方面 1.抽象:抽象就是忽略一个主题中与当前目标无关的那些方面,以便更充分地注意与当前目标有关的方面.抽象并不打算了解全部问题,而只是选择其中的一部分,暂时 ...

  9. 【卷二】网络二—TCP服务器与客户端

    经过上回简单地介绍,大家对服务器多少应该清楚一些了吧!还记得TCP: (Transmission Control Protocol) 传输控制协议? 还记得IP: (Internet Protocol ...

  10. MediaPlayer的错误列表速查(android)

    public static final int MEDIA_ERROR_IO Added in API level 17 File or network related operation error ...