Last active
May 31, 2021 15:59
-
-
Save tiagoleonmelo/02bd71c1b7764f760e2493ed56133e94 to your computer and use it in GitHub Desktop.
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 | |
#installation | |
sudo yum update -y | |
sudo yum install java-1.7.0-openjdk-devel.x86_64 -y | |
sudo yum install git -y | |
wget http://sdk-for-java.amazonwebservices.com/latest/aws-java-sdk.zip | |
unzip -q aws-java-sdk.zip | |
dir_name=$(ls -d */|head -n 1) | |
dir_name=${dir_name::-1} | |
#fetch commons | |
wget https://downloads.apache.org//commons/math/binaries/commons-math3-3.6.1-bin.zip | |
unzip -q commons-math3-3.6.1-bin.zip | |
#modifying bashrc and rclocal | |
sudo echo "source /home/ec2-user/AWSome/BIT/config-bit.sh" >> /home/ec2-user/.bashrc | |
sudo echo "source /home/ec2-user/AWSome/BIT/java-config-rnl-vm.sh" >> /home/ec2-user/.bashrc | |
sudo echo "export CLASSPATH=\"\$CLASSPATH:/home/ec2-user/${dir_name}/lib/${dir_name}.jar:/home/ec2-user/${dir_name}/third-party/lib/*:.\"" >> /home/ec2-user/.bashrc | |
sudo echo "export CLASSPATH=\"\$CLASSPATH:/home/ec2-user/commons-math3-3.6.1/commons-math3-3.6.1.jar/\"" >> /home/ec2-user/.bashrc | |
sudo echo "source /home/ec2-user/.bashrc" >> /etc/rc.local | |
sudo echo "cd /home/ec2-user/AWSome/cnv-project" >> /etc/rc.local | |
sudo echo "java LoadBalancerServer -address \"0.0.0.0\" -port 80" >> /etc/rc.local | |
sudo chmod +x /etc/rc.d/rc.local | |
#git | |
git clone https://github.com/Joao-Nogueira-gh/AWSome.git | |
sudo cp -R /home/ec2-user/AWSome/.aws /root/ | |
sudo cp -R /home/ec2-user/AWSome/.aws /home/ec2-user/ | |
source /home/ec2-user/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment