Created
August 31, 2012 09:52
-
-
Save mattclements/3550980 to your computer and use it in GitHub Desktop.
SFTP Bank Download
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#FILE="/tmp/out.$$" | |
#GREP="/bin/grep" | |
clear | |
#Make sure only root can run our script | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
#Install Packages Required | |
clear | |
echo "Step 1: Installing Required Linux Packages" | |
echo "Press [ENTER] to start"; read line; echo; | |
yum install gedit tigervnc-server | |
echo "VNCSERVERS=\"2:bankdownload\"" >> /etc/sysconfig/vncservers | |
echo "VNCSERVERARGS[2]=\"-geometry 1024x786\"" >> /etc/sysconfig/vncservers | |
echo "Required Linux Packages Install Completed, Press [ENTER] to continue..."; read line; echo; | |
#Download Oracle Install Files | |
clear | |
echo "Step 2: Downloading and Installing Oracle Instant Client" | |
echo "Press [ENTER] to start"; read line; echo; | |
cd ~/ | |
rm -R .oracledownload | |
mkdir .oracledownload | |
cd .oracledownload | |
#Create a Cookie File to be used for WGET below | |
echo "login.oracle.com TRUE / FALSE 1361959236 ORA_UCM_INFO 3~791B9A783D4EA00EE040149096B6504D~Matt~Clements~matt-clements@ntlworld.com" > cookie.txt | |
wget --load-cookies=cookie.txt https://edelivery.oracle.com/akam/otn/linux/instantclient/11203/oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm | |
wget --load-cookies=cookie.txt http://download.oracle.com/otn/linux/instantclient/11203/oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm | |
rpm -Uvh oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm | |
rpm -Uvh oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm | |
echo "export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib:$LD_LIBRARY_PATH" >> /etc/profile | |
echo "Oracle Install Completed, Press [ENTER] to continue..."; read line; echo; | |
#Add Bank Download User to Sudoers List | |
clear | |
echo "Step 3: Adding Bank Download user to sudo list" | |
echo "Press [ENTER] to start"; read line; echo; | |
sed -e 's/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/g' | |
usermod -G wheel bankdownload | |
echo "Adding Bank Download user to sudo list completed, Press [ENTER] to continue..."; read line; echo; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment