-
Notifications
You must be signed in to change notification settings - Fork 16
/
19-8-2018
35 lines (35 loc) · 1.75 KB
/
19-8-2018
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
cd /tmp/
yum install wget vim unzip -y
wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
rpm -ivh jdk-8u131-linux-x64.rpm
wget http://www-eu.apache.org/dist/tomcat/tomcat-8/v8.5.32/bin/apache-tomcat-8.5.32-windows-x64.zip
unzip apache-tomcat-8.5.32-windows-x64.zip
mv apache-tomcat-8.5.32 /opt/tomcat
chmod -R 755 /opt/tomcat/
rm -rf /opt/tomcat/webapps/*
sed -i 's/8080/80/g' /opt/tomcat/conf/server.xml
/opt/tomcat/bin/startup.sh
# Install Mysql Database.
#install the mysql
wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
rpm -ivh mysql57-community-release-el7-7.noarch.rpm
yum install mysql-server*
#Start mysql
service mysqld start
wget http://cliqr-appstore.s3.amazonaws.com/petclinic/petclinic.war
cp petclinic.war /opt/tomcat/webapps/
sleep 5
/opt/tomcat/bin/startup.shutdown.sh
mv /opt/tomcat/webapps/petclinic/WEB-INF/classes/db/mysql/initDB.sql /opt/tomcat/webapps/petclinic/WEB-INF/classes/db/mysql/initDB.sql.backup
mv /opt/tomcat/webapps/petclinic/WEB-INF/classes/spring/data-access.properties /opt/tomcat/webapps/petclinic/WEB-INF/classes/spring/data-access.properties.backup
cd /opt/tomcat/webapps/petclinic/WEB-INF/classes/db/mysql
wget https://s3.amazonaws.com/mohanbucketfiles/initDB.sql
cd /opt/tomcat/webapps/petclinic/WEB-INF/classes/spring/
wget https://s3.amazonaws.com/mohanbucketfiles/data-access.properties
cd /tmp
wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.12.zip
unzip mysql-connector-java-8.0.12.zip
cp mysql-connector-java-8.0.12/mysql-connector-java-8.0.12.jar /opt/tomcat/lib/
chmod 755 /opt/tomcat/lib/mysql-connector-java-8.0.12.jar
/opt/tomcat/bin/startup.sh