Linux中kettle自动化部署脚本
自己写的一个自动化在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自动化部署脚本的更多相关文章
- 自动化部署脚本--linux执行sh脚本
自动化部署脚本文件目录: 运行主程序:./install.sh #!/bin/bash SCRIPTPATH=$(cd "$(dirname "$0")"; p ...
- Jenkins持续集成-自动化部署脚本的实现
要实现Jenkins端的持续集成,其实在CI服务配置端很容易,难点呢?就是如何实现自动化的部署.我的脚本设计就是为了解决以下难题: 难点一.如何使得自动化部署脚本更通用 我用的脚本,依赖依赖一个配置文 ...
- MySQL5.7多实例自动化部署脚本
一.安装说明 ------------------------------------------------------ mysql5.7.10_onekey_install.sh自动化部署脚本支持 ...
- 《转载》Jenkins持续集成-自动化部署脚本的实现《python》
本文转载自慕课网 读者须知:1.本手记本着记续接前面的两张手记内容整理2.本手记针对tomcat部署测试环境实现 最近工作比较繁忙,导致这章一直拖延,没有太抽出时间来总结.要实现Jenkins端的持续 ...
- 设置ssh免密码登录脚本(hadoop自动化部署脚本一)
设置ssh免密码登录脚本(hadoop自动化部署脚本一) 设置ssh免密码登录脚本(飞谷云大数据自动化部署脚本一) 1.#!/bin/sh2.#important note:this script i ...
- python+paramiko库+svn写的自动化部署脚本
第一篇博文 直接开门见山的说了. 这是件什么事?:每次部署都是复制本地的文件粘贴到服务器端,因为路径复杂,所以费时且手工容易出漏洞. 一直在想有什么办法可以解决这种,因为以前在微软的一个牛人同事做过一 ...
- Linux下面kettle的部署
一直以来服务器是linux系统,但是感觉linux图形化不强,于是从接触kettle以来都是在windows系统操作ETL的设计和处理.现在需要在linux中查看一下kettle资源库是否连接正常,以 ...
- Mysql安装及自动化部署脚本方案
一.简介 数据库(Database)是按照数据结构来组织.存储和管理数据的仓库, 每个数据库都有一个或多个不同的API用于创建,访问,管理,搜索和复制所保存的数据. 我们也可以将数据存储在文件中,但是 ...
- 应用在Windows系统中的自动化部署实践
因为公司的产品有linux 和windows两套部署环境,领导安排我先来做windows的自动化部署.由于本人对windows 的dos命令基本没啥概念,所以在最终完成之前,走了很多弯路,在这里记载下 ...
随机推荐
- Epidemic in Monstropolis
Epidemic in Monstropolis 题目链接:http://codeforces.com/contest/733/problem/C 贪心 新序列的m个数肯定是由原序列的连续的m个子序列 ...
- Ubuntu下安装python相关数据处理
01. Ubuntu下安装ipython sudo apt-get install ipython 02. Ubuntu下安装pip $ sudo apt-get install python-pip ...
- Mammoth官方文档翻译
用于.NET的.docx转HTML的Mammoth Mammoth可用于将.docx文档(比如由Microsoft Word创建的)转换为HTML.Mammoth致力于通过文档中的语义信息生成简洁的H ...
- excel 常用函数
1.统计整列唯一值的数量 =sumproduct(1/countif(offset(A1,,,COUNTA(A:A)),OFFSET(A1,,,COUNTA(A:A))))
- 关于Python2字符编码的体会
对于Python的字符编码问题也懵了很久,最近做爬虫多次遇到网页转码的问题,干脆彻底解决掉!Just Do it! 1.两种类型str与unicode str和unicode都是basestring的 ...
- 圆形图片CustomShapeImageView
第三方控件 [GitHub的源码下载] (https://github.com/MostafaGazar/CustomShapeImageView) 1:依赖包 dependencies { ... ...
- linux挂载新硬盘
Linux添加新硬盘自动挂载硬盘的具体步骤 1.插入新硬盘,启动Linux服务器,使用fdisk -l 查看硬盘 #fdisk -l Disk /dev/sdb: 1000.2 GB, 1000204 ...
- CodeForces 546D
Description 两个士兵在玩一个游戏,开始的时候第一个士兵选择一个数n,并把这个数交给第二个士兵,第二个士兵必须选择一个x满足x>1 且n能被x整除,然后将n变为n/x,然后把这个数交给 ...
- .a与.framework的区别
库是共享程序代码的方式,一般分为静态库和动态库. 静态库:链接时完整地拷贝至可执行文件中,被多次使用就有多份冗余拷贝. iOS中静态库形式: .a和.framework 动态库:链接时不复制,程序运行 ...
- ural 1100. Final Standings(数据结构)
1100. Final Standings Time limit: 1.0 secondMemory limit: 16 MB Old contest software uses bubble sor ...