Commit a1b0fb75 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

add support for tomcat9

parent 7e358700
......@@ -26,6 +26,15 @@ then
tar -zcf $BACKUP_DIR/tmp/map_images.tar.gz map_images
fi
CATALINA_HOME="/var/lib/tomcat9"
cp $CATALINA_HOME/webapps/*.war "$BACKUP_DIR/tmp" 2>/dev/null
if [ -d "$CATALINA_HOME/webapps/map_images" ]
then
cd $CATALINA_HOME/webapps/
tar -zcf $BACKUP_DIR/tmp/map_images.tar.gz map_images
fi
export PGPASSWORD="123qweasdzxc"
pg_dump -U map_viewer map_viewer -h localhost | gzip > "$BACKUP_DIR/tmp/map_viewer_db.gz"
......
......@@ -41,7 +41,8 @@ apt-get install -y mc apache2 php libapache2-mod-php minerva
#change tomcat memory limit to 4GB
sed -i 's/-Xmx128m/-Xmx4192m/g' /etc/default/tomcat7
sed -i 's/-Djava.awt.headless=true/-Djava.awt.headless=true -Xmx4192m/g' /etc/default/tomcat8
service tomcat7 restart
sed -i 's/-Djava.awt.headless=true/-Djava.awt.headless=true -Xmx4192m/g' /etc/default/tomcat9
service tomcat9 restart
#setup proxy in apache to go to tomcat
sed -i '2i\ ProxyPass /minerva http://localhost:8080/minerva\n ProxyPass /map_images http://localhost:8080/map_images\n ProxyPass /minerva-big http://localhost:8080/minerva-big\n ProxyPassReverse /minerva http://localhost:8080/minerva\n ProxyPassReverse /minerva-big http://localhost:8080/minerva-big\n ProxyPassReverse /map_images http://localhost:8080/map_images\n' /etc/apache2/sites-enabled/000-default.conf
......
......@@ -19,11 +19,16 @@ then
then
CATALINA_HOME="/var/lib/tomcat8"
fi
if [ -e "/var/lib/tomcat9" ]
then
CATALINA_HOME="/var/lib/tomcat9"
fi
sudo rm -rf $CATALINA_HOME/webapps/map_images/
sudo mv map_images $CATALINA_HOME/webapps/
sudo chown tomcat7:tomcat7 $CATALINA_HOME/webapps/map_images/
sudo chown tomcat8:tomcat8 $CATALINA_HOME/webapps/map_images/
sudo chown tomcat9:tomcat9 $CATALINA_HOME/webapps/map_images/
fi
if [ ! -e "~/.pgpass" ]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment