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命令基本没啥概念,所以在最终完成之前,走了很多弯路,在这里记载下 ...
随机推荐
- GNU/Linux下Freeplane的界面渲染问题
如下图所示,思维导图软件Freeplane在GNU/Linux下默认的界面渲染效果是很差的,即便将Preferences → Appearance → Antialias设置为Antialias al ...
- digitalocean Vultr Linode 三家海外vps最新真实情况
中国有大批用户,在使用海外vps服务器.好处是不言而喻的:性价比高.带宽大.免备案.可搭梯子,没有后门监控. 有趣的是,每一年的周期观察,都能发现海外vps对中国大陆的线路速度.可用性变化.过去速度快 ...
- ios版本更新总结
更新思路,获取APP Store 版本号与项目本地版本号对比,如果本地低于商店版本号,就提示用户更新(说明:在上架项目时请保持本地和商店版本号一致,避免检测更新问题被拒) 1.获取商店版本号,代码如下 ...
- Js的Url中传递中文参数乱码的解决
一:Js的Url中传递中文参数乱码问题,重点:encodeURI编码,decodeURI解码: 1.传参页面Javascript代码: 2. 接收参数页面:test02.html 二:如何获取Url& ...
- Spring Security(16)——基于表达式的权限控制
目录 1.1 通过表达式控制URL权限 1.2 通过表达式控制方法权限 1.2.1 使用@PreAuthorize和@PostAuthorize进行访问控制 1.2.2 ...
- Python学习笔记——基础篇1【第三周】——set集合
set集合 不允许重复的元素出现(相当于特殊的列表) set 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 练习:寻找差异 # 数据库中原有 old_dic ...
- nyoj587 hdu1045 简单深搜
#include<iostream> #include<cstdio> #include<queue> #include<vector> #includ ...
- C# 语言规范_版本5.0 (第16章 异常)
1. 异常 C# 中的异常用于处理系统级和应用程序级的错误状态,它是一种结构化的.统一的和类型安全的处理机制.C# 中的异常机制非常类似于 C++ 的异常机制,但是有一些重要的区别: 在 C# 中,所 ...
- transient关键字小结
java中实现序列化有两种实现方式,一种是自动的,只要实现Serilizable接口,另一种是需要手动指定需要序列化的成员变量,实现Externalizable接口. transient的特点: 1. ...
- centos6.8安装superctl 后台管理工具
下载安装python yum install python-setuptools 从官网下载supervisor包 https://pypi.python.org/pypi/supervisor 解压 ...