Skip to content
Snippets Groups Projects
Commit f85d2245 authored by Nikolaus Krismer's avatar Nikolaus Krismer
Browse files

fixed some epsg projection issues

parent 23acdec2
No related branches found
No related tags found
No related merge requests found
......@@ -360,7 +360,7 @@ if $INSTALL_JAVA; then
ln -sf /usr/java/latest $DEPLOY_DIR/jdk > setup_java.log 2>&1
ln -sf /usr/java/latest/jre $DEPLOY_DIR/jre > setup_java.log 2>&1
echo "Configuring java $JAVA_VERSION"
echo " - setting alternatives for java"
alternatives --install /usr/bin/java java $DEPLOY_DIR/jre/bin/java 200000 >> setup_java.log 2>&1
alternatives --install /usr/bin/javaws javaws $DEPLOY_DIR/jre/bin/javaws 200000 >> setup_java.log 2>&1
alternatives --set java $DEPLOY_DIR/jre/bin/java >> setup_java.log 2>&1
......@@ -380,22 +380,14 @@ if $INSTALL_TOMCAT; then
fn_download_newer $DOWNLOAD_DIR/$TOMCAT_FILE http://tweedo.com/mirror/apache/tomcat/tomcat-7/v$TOMCAT_VERSION/bin/$TOMCAT_FILE
cp $DOWNLOAD_DIR/$TOMCAT_FILE $DEPLOY_DIR/$TOMCAT_FILE
tar -xvzf $DEPLOY_DIR/$TOMCAT_FILE -C $DEPLOY_DIR > install_tomcat.log 2>&1
rm -f $DEPLOY_DIR/$TOMCAT_FILE >> install_tomcat.log 2>&1
ln -sf $DEPLOY_DIR/apache-tomcat-$TOMCAT_VERSION $DEPLOY_DIR/$TOMCAT_NAME >> install_tomcat.log 2>&1
groupadd -g 521 $TOMCAT_USER >> install_tomcat.log 2>&1
useradd -u 521 -g 521 -c "Tomcat Service Account" -d $DEPLOY_DIR/apache-tomcat-$TOMCAT_VERSION $TOMCAT_USER >> install_tomcat.log 2>&1
chown -R $TOMCAT_USER:$TOMCAT_USER $DEPLOY_DIR/apache-tomcat-$TOMCAT_VERSION >> install_tomcat.log 2>&1
chown -R $TOMCAT_USER:$TOMCAT_USER $DEPLOY_DIR/$TOMCAT_NAME >> install_tomcat.log 2>&1
cp $SHARED_CONF_DIR/tomcat_startscript.sh /etc/init.d/$TOMCAT_NAME >> install_tomcat.log 2>&1
chmod 755 /etc/init.d/$TOMCAT_NAME >> install_tomcat.log 2>&1
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 $TOMCAT_WEBAPP_DIR $DOWNLOAD_DIR/$GEOSERVER_FILE geoserver.war > install_geoserver.log 2>&1
echo "CATALINA_OPTS=\"-Djava.awt.headless=true -Xmx512m -Xms128m -XX:MaxPermSize=128m -DGEOSERVER_DATA_DIR=$DEPLOY_DIR/geoserver/data\"" >> $DEPLOY_DIR/$TOMCAT_NAME/conf/$TOMCAT_NAME.conf
echo "Installing geoserver web archive into tomcat"
mkdir -p $TOMCAT_WEBAPP_DIR/geoserver
......@@ -403,8 +395,11 @@ if $INSTALL_GEOSERVER; then
rm -f $TOMCAT_WEBAPP_DIR/geoserver.war >> install_geoserver.log 2>&1
echo "Installing geoserver data directory"
mkdir -p $DEPLOY_DIR/geoserver >> install_geoserver.log 2>&1
mv $TOMCAT_WEBAPP_DIR/geoserver/data $DEPLOY_DIR/geoserver >> install_geoserver.log 2>&1
# mkdir -p $DEPLOY_DIR/geoserver >> install_geoserver.log 2>&1
# mv $TOMCAT_WEBAPP_DIR/geoserver/data $DEPLOY_DIR/geoserver >> install_geoserver.log 2>&1
mkdir -p $DEPLOY_DIR/geoserver/data >> install_geoserver.log 2>&1
echo "export CATALINA_OPTS=\"-Djava.awt.headless=true -Xmx512m -Xms128m -XX:MaxPermSize=128m -DGEOSERVER_DATA_DIR=$DEPLOY_DIR/geoserver/data\"" > /etc/profile.d/catalina.sh
source /etc/profile.d/catalina.sh
echo "Installing geoserver-shell $GEOSERVER_SHELL_VERSION"
fn_download_newer $DOWNLOAD_DIR/$GEOSERVER_SHELL_FILE $CACHE_DIR_REMOTE/$GEOSERVER_SHELL_FILE
......@@ -530,11 +525,27 @@ fi
if $INSTALL_TOMCAT; then
echo "Configuring tomcat users"
groupadd -g 521 $TOMCAT_USER >> install_tomcat.log 2>&1
useradd -u 521 -g 521 -c "Tomcat Service Account" -d $DEPLOY_DIR/apache-tomcat-$TOMCAT_VERSION $TOMCAT_USER >> install_tomcat.log 2>&1
chown -R $TOMCAT_USER:$TOMCAT_USER $DEPLOY_DIR/apache-tomcat-$TOMCAT_VERSION >> install_tomcat.log 2>&1
chown -R $TOMCAT_USER:$TOMCAT_USER $DEPLOY_DIR/$TOMCAT_NAME >> install_tomcat.log 2>&1
cp $SHARED_CONF_DIR/tomcat-users.xml $DEPLOY_DIR/$TOMCAT_NAME/conf/tomcat-users.xml
echo "Configuring tomcat permissions"
chown -R $TOMCAT_USER:$TOMCAT_USER $TOMCAT_WEBAPP_DIR/geoserver
chown -R $TOMCAT_USER:$TOMCAT_USER $DEPLOY_DIR/geoserver
echo "Configuring tomcat startup script"
cp $SHARED_CONF_DIR/tomcat_startscript.sh /etc/init.d/$TOMCAT_NAME >> install_tomcat.log 2>&1
chmod 755 /etc/init.d/$TOMCAT_NAME >> install_tomcat.log 2>&1
fi
if $INSTALL_POSTGIS && $INSTALL_GEOSERVER; then
echo "Configuring geoserver epsg projections"
mkdir -p $DEPLOY_DIR/geoserver/data/user_projections
echo "82344=`grep ^[^//,^#] /vagrant/conf/srid_82344_wkt.txt | paste -sd "" | sed 's/ \+ / /g'`" >> $DEPLOY_DIR/geoserver/data/user_projections/epsg.properties
chown -R $TOMCAT_USER:$TOMCAT_USER $DEPLOY_DIR/geoserver/data/user_projections
fi
echo "Starting services"
......@@ -575,10 +586,6 @@ if $INSTALL_PGROUTING; then
PGPASSWORD=$PG_DB_PASSWORD psql -U $PG_DB_USER -h localhost -d $PG_DB_NAME -c "CREATE EXTENSION pgRouting;" >> $WORKING_DIR/setup_database.log 2>&1
fi
if $INSTALL_POSTGIS && $INSTALL_GEOSERVER; then
echo "82344=`grep ^[^//,^#] /vagrant/conf/srid_82344_wkt.txt | paste -sd "" | sed 's/ \+ / /g'`" >> $DEPLOY_DIR/geoserver/data/user_projections/epsg.properties
fi
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " Services prepared!"
if $IMPORT_OSMDATA || $IMPORT_OSMDATA_CACHED; then
......
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