Skip to content
Snippets Groups Projects
Commit a1919cc0 authored by User expired's avatar User expired
Browse files

added possibility to install template project into tomcat

parent 2497eee0
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,7 @@ INSTALL_PGROUTING=true
INSTALL_POSTGIS=true
INSTALL_POSTGRES=true
INSTALL_POSTGRES_ADMIN=true
INSTALL_TEMPLATE_PROJECT=true
NEO4J_DB_USER=neo4j
PG_DB_NAME="isochrone"
......@@ -78,6 +79,7 @@ REPO_BASE_CONFIG=/etc/yum.repos.d/fedora-updates.repo
REPO_RPMFORGE_CONFIG=/etc/yum.repos.d/rpmforge.repo
TABLE_PREFIX_BZ=bz_
TABLE_PREFIX_IBK=ibk_
TEMPLATE_PROJECT_FILE=https://server.krismer.de/nexus/content/groups/public/de/krismer/CanIGet2/0.1-SNAPSHOT/CanIGet2-0.1-20131204.174349-1.war
TOMCAT_VERSION=7
TOMCAT_PKG_NAME=tomcat
TOMCAT_SERVICE_NAME=$TOMCAT_PKG_NAME
......@@ -89,9 +91,13 @@ TOPOLOGY_TOLERANCE=0.0005
DISTRI=$(cat /etc/issue | head -n 1 | cut -d " " -f 1)
INSTALL_JAVA=false
INSTALL_MAVEN=false
INSTALL_TOMCAT=false
START=$(date +%s)
WORKING_DIR=`pwd`
if $INSTALL_GEOSERVER || $INSTALL_TEMPLATE_PROJECT; then
INSTALL_TOMCAT=true
if
if $INSTALL_NEO4J_SPATIAL; then
INSTALL_MAVEN=$IMPORT_OSMDATA || $IMPORT_OSMDATA_CACHED
fi
......@@ -203,7 +209,7 @@ if $INSTALL_NEO4J_SPATIAL; then echo " - neo4j-spatial $NEO4J_SPATIAL_VERSION";
if $INSTALL_POSTGRES; then echo " - postgresql 9.3"; fi
if $INSTALL_POSTGIS; then echo " - postgis 2"; fi
if $INSTALL_PGROUTING; then echo " - pgRouting $PGROUTING_VERSION"; fi
if $INSTALL_GEOSERVER; then echo " - tomcat $TOMCAT_VERSION"; fi
if $INSTALL_TOMCAT; then echo " - tomcat $TOMCAT_VERSION"; fi
if $INSTALL_POSTGRES_ADMIN; then echo " - phpPgAdmin"; fi
if $IMPORT_OSMDATA; then echo " - osmosis $OSMOSIS_VERSION"; fi
if $IMPORT_OSMDATA_CACHED; then echo "Importing cached data from OSM (if possible)"; elif $IMPORT_OSMDATA; then echo "Importing data from OSM"; fi
......@@ -332,11 +338,13 @@ if $INSTALL_PGROUTING; then
cd $WORKING_DIR
fi
if $INSTALL_GEOSERVER; then
if $INSTALL_TOMCAT; then
echo "Installing $TOMCAT_PKG_NAME servlet container"
yum -y install $TOMCAT_PKG_NAME $TOMCAT_PKG_NAME-webapps $TOMCAT_PKG_NAME-admin-webapps > install_tomcat.log 2>&1
ln -sf /usr/share/$TOMCAT_PKG_NAME $DEPLOY_DIR/$TOMCAT_PKG_NAME
fi
if $INSTALL_GEOSERVER; then
echo "Installing geoserver $GEOSERVER_VERSION"
fn_download_newer $DOWNLOAD_DIR/$GEOSERVER_FILE http://sourceforge.net/projects/geoserver/files/GeoServer/$GEOSERVER_VERSION/$GEOSERVER_FILE
unzip -o -d $DEPLOY_DIR/$TOMCAT_PKG_NAME/webapps $DOWNLOAD_DIR/$GEOSERVER_FILE geoserver.war > install_geoserver.log 2>&1
......@@ -476,7 +484,7 @@ if $INSTALL_NEO4J; then
ulimit -n 40000
fi
if $INSTALL_GEOSERVER; then
if $INSTALL_TOMCAT; then
echo "Configuring tomcat users"
cp $SHARED_DIR/tomcat-users.xml /usr/share/$TOMCAT_PKG_NAME/conf/tomcat-users.xml
......@@ -498,7 +506,7 @@ if $INSTALL_NEO4J; then
service $NEO4J_SERVICE_NAME start > start_neo4j.log 2>&1
chkconfig $NEO4J_SERVICE_NAME on >> start_neo4j.log 2>&1
fi
if $INSTALL_GEOSERVER; then
if $INSTALL_TOMCAT; then
service $TOMCAT_SERVICE_NAME start > start_tomcat.log 2>&1
chkconfig $TOMCAT_SERVICE_NAME on >> start_tomcat.log 2>&1
fi
......@@ -545,6 +553,16 @@ if $IMPORT_OSMDATA || $IMPORT_OSMDATA_CACHED; then
fi
fi
if $INSTALL_TEMPLATE_PROJECT; then
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " Installing template project(s)
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Installing template project 'CanIGet2'"
fn_download_newer $DOWNLOAD_DIR/caniget2.war $TEMPLATE_PROJECT_FILE
cp $DOWNLOAD_DIR/caniget2.war $DEPLOY_DIR/$TOMCAT_PKG_NAME/webapps
fi
END=$(date +%s)
TOTAL=$(( $END - $START ))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment