Data Engineering Integration
- Data Engineering Integration H2L
- All Products
#!/bin/bash echo s3 location of RPM export S3_LOCATION_RPM=s3://<s3 bucket name> echo Temp location to extract the RPM export TEMP_DIR=/tmp/<TEMP-DIR-TO-EXTRACT-RPM> echo Default location to install Informatica RPM #make sure that INFA_RPM_INSTALL_HOME will have enough space to install the Informatica RPM export INFA_RPM_INSTALL_HOME=/opt/ echo Extracting the prefix part from the rpm file name echo The rpm installer name would be InformaticaHadoop-10.1.1.Linux-x64.tar.gz export INFA_RPM_FILE_PREFIX=InformaticaHadoop-10.1.1.Linux-x64 export INFA_RPM_FOLDER=InformaticaHadoop-10.1.1-1.231 echo S3_LOCATION_RPM = $S3_LOCATION_RPM echo TEMP_DIR = $TEMP_DIR echo INFA_RPM_INSTALL_HOME = $INFA_RPM_INSTALL_HOME echo INFA_RPM_FILE_PREFIX = $INFA_RPM_FILE_PREFIX echo Installing the RPM: echo "Creating temporary folder for rpm extraction" sudo mkdir -p $TEMP_DIR cd $TEMP_DIR/ echo "current directory =" $(pwd) echo Getting RPM installer echo Copying the rpm installer $S3_LOCATION_RPM/$INFA_RPM_FILE_PREFIX.tar.gz to $(pwd) sudo aws s3 cp $S3_LOCATION_RPM/$INFA_RPM_FILE_PREFIX.tar.gz . sudo tar -zxvf $INFA_RPM_FILE_PREFIX.tar.gz cd $INFA_RPM_FOLDER echo Installing RPM to $INFA_RPM_INSTALL_HOME sudo rpm -ivh --replacefiles --replacepkgs InformaticaHadoop-10.1.1-1.x86_64.rpm --prefix= $INFA_RPM_INSTALL_HOME # You can insert additional tasks at this point in the script. echo Contents of $INFA_RPM_INSTALL_HOME echo $(ls $INFA_RPM_INSTALL_HOME) echo chmod cd $INFA_RPM_INSTALL_HOME sudo mkdir Informatica/blazeLogs sudo chmod 766 -R Informatica/blazeLogs/ echo removing temporary folder sudo rm -rf $TEMP_DIR/ echo done