Kettle Automated deployment scripts in Linux

Source: Internet
Author: User

Write your own script that automates the deployment of kettle in Linux, including some of the problems encountered in scripting.

Kettle is the official website version Pdi-ce-6.1.0.1-196.zip

Script:

#!/bin/Bash#record The current directory!Mulu=`pwd' #The output of java_home number of Bytesc=`Echo$JAVA _home|WC-C 'Echo "Tips:install JDK rather than jre! Configuration Java_home"#PleaseInstallJdkifJava_home Bytes is equal to1if[$c-eq1]; ThenEcho "Please install jdk!"#If already configured java_home,continue! Otherwise, the exit!elif[ $? !=0]; ThenEcho "already configured java_home!"CD~/.kettle/#If There is afile. spoonrc,continue!if[-F. SPOONRC]; ThenEcho "Exist. SPOONRC file!"AA=`Cat~/.KETTLE/.SPOONRC |grepShowwelcomepageonstartup |awk-F'=' '{print $}'' #If the showwelcomepageonstartup commandfileIs empty,continue!if[! $AA]; ThenEcho "without showwelcomepageonstartup=n, appended to the file!"Echo "showwelcomepageonstartup=n">> ~/.kettle/. spoonrc#if Thefile inchThis command showwelcomepageonstartup was not equal to n,continue!elif[$aa! ="N"]; ThenEcho "Showwelcomepageonstartup is isn't equal to N, to modify Showwelcomepageonstartup are equal to n!"sed-I."s/$aa/n/g"~/.kettle/. SPOONRCfi#If There is nofile. SPOONRCElseEcho "There is no file spoonrc,created. spoonrc file and add command!"Echo "showwelcomepageonstartup=n"> ~/.kettle/. SPOONRCfi#Switch to the original directory!CD $mulu # If there is a directory"data-integration", enter the directory, otherwiseUnzipThe package!if[-D"data-integration"]; ThenEcho "Directory exists, into the directory!"CD Data-IntegrationElseEcho "Directory does not exist, unzip the package!"Unzippdi-ce-6.1.0.1-196.ZipCD Data-Integrationfi#Open the graphical interface!Echo "Open the graphical interface!"Echo "If It does not has a graphical interface, please install,use this command yum groupinstall \ "X window system\"!"SHSpoon.SHfi

Note: Scripts and pdi-ce-6.1. 0.1-196. The zip Archive is placed in the same directory. It's a good idea to install the X Window System first, although there are hints in the script. This script launches the graphical interface directly.

Kettle Automated deployment scripts in Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.