Wow.. Weeknd End with my first Shell Scripting, Its work , feeling like on Air, Time to have some Beer.
Description : Once you run it, it will download the tomcat and start the tomcat service and you will be ready to kick off the installtion of Open AM.
Note : Drop me a mail any.singha@gmail.com in case it not work,
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
echo "Start Downloading from the net" | |
curl -O http://www.us.apache.org/dist/tomcat/tomcat-7/v7.0.65/bin/apache-tomcat-7.0.65.tar.gz | |
if [ $? -eq 0 ] | |
then | |
echo "The File is sucessfully downloaded" | |
else | |
echo " Warning Failure, Check for the failure" | |
fi | |
echo "Checking the Java Version" | |
if [ $JAVA_HOME=="/usr/java/jdk1.8.10_65" ] | |
then | |
echo "Good to go, we are copying the war file" | |
cp apache-tomcat-7.0.65.tar.gz /usr/share/ | |
tar -xzf /usr/apache-tomcat-7.0.65.tar.gz -C /usr/share/ | |
echo "Starting the tomcat server" | |
sh /usr/share/apache-tomcat-7.0.65/bin/startup.sh | |
else | |
echo "Java version is not correclt installed" | |
fi |