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

adding missing resources (adding folder "etc")

parent f4239473
No related branches found
No related tags found
No related merge requests found
Showing
with 758 additions and 0 deletions
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<NamedLayer>
<Name>Default Polygon</Name>
<UserStyle>
<Title>Default polygon style</Title>
<Abstract>A sample style that just draws out a solid gray interior with a black 1px outline</Abstract>
<FeatureTypeStyle>
<Rule>
<Title>Polygon</Title>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#AAAAAA</CssParameter>
<CssParameter name="fill-opacity">0.3</CssParameter>
</Fill>
<!--Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
<CssParameter name="fill-opacity">0.4</CssParameter>
</Stroke-->
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
\ No newline at end of file
<style>
<id>StyleInfoImpl-598c7b7:13f2d06bbb1:-7ff2</id>
<name>Buffer</name>
<workspace>
<id>WorkspaceInfoImpl-62a194ec:13f1f1ad116:-7fff</id>
</workspace>
<sldVersion>
<version>1.0.0</version>
</sldVersion>
<filename>Buffer.sld</filename>
</style>
\ No newline at end of file
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<NamedLayer>
<Name>Default Polygon</Name>
<UserStyle>
<Title>Default polygon style</Title>
<Abstract>A sample style that just draws out a solid gray interior with a black 1px outline</Abstract>
<FeatureTypeStyle>
<Rule>
<Title>Polygon</Title>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#AAAAAA</CssParameter>
<CssParameter name="fill-opacity">0.5</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
<CssParameter name="stroke-opacity">0.9</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
\ No newline at end of file
<style>
<id>StyleInfoImpl-598c7b7:13f2d06bbb1:-7ff3</id>
<name>Iso_Area_Polygon</name>
<workspace>
<id>WorkspaceInfoImpl-62a194ec:13f1f1ad116:-7fff</id>
</workspace>
<sldVersion>
<version>1.0.0</version>
</sldVersion>
<filename>Iso_Area_Polygon.sld</filename>
</style>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>STYLE_BLACK_BNODES</Name>
<UserStyle>
<Name>STYLE_BNODES</Name>
<Title>Reached bus nodes</Title>
<Abstract>Generated by GeoServer</Abstract>
<FeatureTypeStyle>
<Rule>
<Name>Large Zoom</Name>
<Title>Bus Node</Title>
<Abstract>Abstract</Abstract>
<MinScaleDenominator>10000</MinScaleDenominator>
<MaxScaleDenominator>150000</MaxScaleDenominator>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>square</WellKnownName>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
</Stroke>
<Fill>
<CssParameter name="fill">#FFFFFF</CssParameter>
<CssParameter name="fill-opacity">0.9</CssParameter>
</Fill>
</Mark>
<Opacity>0.9</Opacity>
<Size>4</Size>
</Graphic>
</PointSymbolizer>
</Rule>
<Rule>
<Name>Small Zoom</Name>
<Title>Bus Node</Title>
<Abstract>Abstract</Abstract>
<MaxScaleDenominator>10000</MaxScaleDenominator>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>square</WellKnownName>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
</Stroke>
<Fill>
<CssParameter name="fill">#FFFFFF</CssParameter>
<CssParameter name="fill-opacity">0.9</CssParameter>
</Fill>
</Mark>
<Opacity>0.9</Opacity>
<Size>12</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
\ No newline at end of file
<style>
<id>StyleInfoImpl-598c7b7:13f2d06bbb1:-7ff4</id>
<name>STYLE_BLACK_BNODES</name>
<workspace>
<id>WorkspaceInfoImpl-62a194ec:13f1f1ad116:-7fff</id>
</workspace>
<sldVersion>
<version>1.0.0</version>
</sldVersion>
<filename>STYLE_BLACK_BNODES.sld</filename>
</style>
\ No newline at end of file
<wcs>
<id>WCSInfoImpl--7847af3:13f322305ce:-4ac9</id>
<workspace>
<id>WorkspaceInfoImpl-62a194ec:13f1f1ad116:-7fff</id>
</workspace>
<enabled>true</enabled>
<name>WCS</name>
<title>Web Coverage Service</title>
<maintainer>http://jira.codehaus.org/secure/BrowseProject.jspa?id=10311</maintainer>
<abstrct>This server implements the WCS specification 1.0 and 1.1.1, it&apos;s reference implementation of WCS 1.1.1. All layers published by this service are available on WMS also.
</abstrct>
<accessConstraints>NONE</accessConstraints>
<fees>NONE</fees>
<versions>
<org.geotools.util.Version>
<version>1.0.0</version>
</org.geotools.util.Version>
<org.geotools.util.Version>
<version>1.1.1</version>
</org.geotools.util.Version>
<org.geotools.util.Version>
<version>2.0.1</version>
</org.geotools.util.Version>
</versions>
<keywords>
<string>WCS</string>
<string>WMS</string>
<string>GEOSERVER</string>
</keywords>
<metadataLink>
<type>undef</type>
<about>http://geoserver.sourceforge.net/html/index.php</about>
<metadataType>other</metadataType>
</metadataLink>
<citeCompliant>false</citeCompliant>
<onlineResource>http://geoserver.sourceforge.net/html/index.php</onlineResource>
<schemaBaseURL>http://schemas.opengis.net</schemaBaseURL>
<verbose>false</verbose>
<gmlPrefixing>false</gmlPrefixing>
<latLon>false</latLon>
<maxInputMemory>0</maxInputMemory>
<maxOutputMemory>0</maxOutputMemory>
<subsamplingEnabled>true</subsamplingEnabled>
<overviewPolicy>IGNORE</overviewPolicy>
</wcs>
\ No newline at end of file
<wfs>
<id>WFSInfoImpl--7847af3:13f322305ce:-4ac7</id>
<workspace>
<id>WorkspaceInfoImpl-62a194ec:13f1f1ad116:-7fff</id>
</workspace>
<enabled>true</enabled>
<name>WFS</name>
<title>GeoServer Web Feature Service</title>
<maintainer>http://jira.codehaus.org/secure/BrowseProject.jspa?id=10311</maintainer>
<abstrct>This is the reference implementation of WFS 1.0.0 and WFS 1.1.0, supports all WFS operations including Transaction.</abstrct>
<accessConstraints>NONE</accessConstraints>
<fees>NONE</fees>
<versions>
<org.geotools.util.Version>
<version>1.0.0</version>
</org.geotools.util.Version>
<org.geotools.util.Version>
<version>1.1.0</version>
</org.geotools.util.Version>
<org.geotools.util.Version>
<version>2.0.0</version>
</org.geotools.util.Version>
</versions>
<keywords>
<string>WFS</string>
<string>WMS</string>
<string>GEOSERVER</string>
</keywords>
<metadataLink/>
<citeCompliant>false</citeCompliant>
<onlineResource>http://geoserver.sourceforge.net/html/index.php</onlineResource>
<schemaBaseURL>http://schemas.opengis.net</schemaBaseURL>
<verbose>false</verbose>
<gml>
<entry>
<version>V_10</version>
<gml>
<srsNameStyle>XML</srsNameStyle>
<overrideGMLAttributes>true</overrideGMLAttributes>
</gml>
</entry>
<entry>
<version>V_20</version>
<gml>
<srsNameStyle>URN2</srsNameStyle>
<overrideGMLAttributes>false</overrideGMLAttributes>
</gml>
</entry>
<entry>
<version>V_11</version>
<gml>
<srsNameStyle>URN</srsNameStyle>
<overrideGMLAttributes>false</overrideGMLAttributes>
</gml>
</entry>
</gml>
<serviceLevel>COMPLETE</serviceLevel>
<maxFeatures>1000000</maxFeatures>
<featureBounding>false</featureBounding>
<canonicalSchemaLocation>false</canonicalSchemaLocation>
<encodeFeatureMember>false</encodeFeatureMember>
</wfs>
\ No newline at end of file
<wms>
<id>WMSInfoImpl--7847af3:13f322305ce:-4ac8</id>
<workspace>
<id>WorkspaceInfoImpl-62a194ec:13f1f1ad116:-7fff</id>
</workspace>
<enabled>true</enabled>
<name>WMS</name>
<title>GeoServer Web Map Service</title>
<maintainer>http://jira.codehaus.org/secure/BrowseProject.jspa?id=10311</maintainer>
<abstrct>A compliant implementation of WMS plus most of the SLD extension (dynamic styling). Can also generate PDF, SVG, KML, GeoRSS</abstrct>
<accessConstraints>NONE</accessConstraints>
<fees>NONE</fees>
<versions>
<org.geotools.util.Version>
<version>1.1.1</version>
</org.geotools.util.Version>
<org.geotools.util.Version>
<version>1.3.0</version>
</org.geotools.util.Version>
</versions>
<keywords>
<string>WFS</string>
<string>WMS</string>
<string>GEOSERVER</string>
</keywords>
<metadataLink/>
<citeCompliant>false</citeCompliant>
<onlineResource>http://geoserver.sourceforge.net/html/index.php</onlineResource>
<schemaBaseURL>http://schemas.opengis.net</schemaBaseURL>
<verbose>false</verbose>
<metadata>
<entry key="svgAntiAlias">true</entry>
<entry key="svgRenderer">Batik</entry>
</metadata>
<bboxForEachCRS>false</bboxForEachCRS>
<watermark class="org.geoserver.wms.WatermarkInfoImpl">
<enabled>false</enabled>
<position>BOT_RIGHT</position>
<transparency>0</transparency>
</watermark>
<interpolation>Nearest</interpolation>
<maxBuffer>25</maxBuffer>
<maxRequestMemory>65536</maxRequestMemory>
<maxRenderingTime>60</maxRenderingTime>
<maxRenderingErrors>1000</maxRenderingErrors>
</wms>
\ No newline at end of file
<workspace>
<id>WorkspaceInfoImpl-62a194ec:13f1f1ad116:-7fff</id>
<name>iso</name>
</workspace>
\ No newline at end of file
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Enable vagrant-cachier plugin
if VagrantPlugins.const_defined?(:Cachier)
config.cache.enable :yum
end
# Setup environment on startup (done using a shell script)
config.vm.provision "shell", path: "bootstrap.sh"
# Information about the box itself (name and url)
# config.vm.box = "fedora19-x86_64"
# config.vm.box_url = "http://www.krismer.de/files/VM/fedora19-x86_64.box"
config.vm.box = "centos64-x86_64"
config.vm.box_url = "http://www.krismer.de/files/VM/centos64-x86_64.box"
# Network configuration
config.vm.network :forwarded_port, guest: 8080, host: 8080, auto_correct: true, id: "tomcat"
config.vm.network :forwarded_port, guest: 7474, host: 7474, auto_correct: true, id: "neo4j"
config.vm.network :forwarded_port, guest: 5432, host: 5432, auto_correct: true, id: "postgresql"
config.vm.network :forwarded_port, guest: 80, host: 8000, auto_correct: true, id: "httpd"
# config.vm.network :private_network, :ip => '192.168.4.50'
# config.vm.network :public_network
end
#! /bin/bash
###########################
# This bootstrap script installs some build tools and the packages
# postgresql, neo4j, httpd, postgis, pgRouting, osmosis, osm2pgrouting
# into a centos6/fedora19 environment.
# It can be used in the context of a Vagrantfile to configure a vagrant box.
#
# Some data (from the road network of innsbruck) is also downloaded and
# imported into the databases (neo4j and postgresql)
#
# After various installations, the databases, the httpd server, tomcat
# (and therefor also geoserver, which is installed as war file) are started
###########################
# Environment configuration
###########################
IMPORT_DATA=true
IMPORT_DATA_CACHED=true
INSTALL_HTTPD=true
INSTALL_NEO4J=true
INSTALL_POSTGIS=true
INSTALL_TOMCAT=true
DISTRI=$(cat /etc/issue | head -n 1 | cut -d " " -f 1)
DOWNLOAD_DIR=/tmp/vagrant-cache/wget
DEPLOY_DIR=/opt
GEOSERVER_VERSION=2.4.2
GEOSERVER_FILE=geoserver-$GEOSERVER_VERSION-war.zip
GEOSERVER_SHELL_VERSION=0.2-SNAPSHOT
GEOSERVER_SHELL_FILE=gs-shell-$GEOSERVER_SHELL_VERSION-app.zip
JAVA_VERSION=7u45
JAVA_FILE=jdk-$JAVA_VERSION-linux-x64.rpm
MAVEN_VERSION=3.1.1
MAVEN_FILE=apache-maven-$MAVEN_VERSION-bin.zip
NEO4J_VERSION=1.9.5
NEO4J_FILE=neo4j-community-$NEO4J_VERSION-unix.tar.gz
NEO4J_SPATIAL_VERSION=0.11-neo4j-1.9
OSM_BBOX_IBK="top=47.3592 left=11.3020 bottom=47.2108 right=11.4554"
OSM_FILE=austria-131101.osm.pbf
OSM_FILE_FILTERED=innsbruck-131101-filtered.osm
OSM_KEYS="aerialway,highway,public_transport,railway,route"
OSM2PGROUTING_VERSION=v2.0.0
OSM2PGROUTING_MAPPING_CONF=$DEPLOY_DIR/osm2pgrouting/mapconfig.xml
OSMOSIS_VERSION=0.43.1
OSMOSIS_FILE=osmosis-$OSMOSIS_VERSION.zip
POSTGRESQL_HBA_CONF=/var/lib/pgsql/9.3/data/pg_hba.conf
POSTGRESQL_PKG_NAME=postgresql93
POSTGRESQL_REPO_RPM=http://yum.postgresql.org/9.3/fedora/fedora-19-x86_64/pgdg-fedora93-9.3-1.noarch.rpm
POSTGRESQL_SERVICE_NAME=postgresql-9.3
PGROUTING_VERSION=2.0.0
REPO_CONFIG_FILE=/etc/yum.repos.d/fedora-updates.repo
START=$(date +%s)
TABLE_PREFIX=ibk_
TOMCAT_PKG_NAME=tomcat
TOMCAT_SERVICE_NAME=$TOMCAT_PKG_NAME
WORKING_DIR=`pwd`
DATABASE_NAME=isochrone
DATABASE_USER=niko
DATABASE_PASSWORD=secretPhdPassword#2013!
## Functions
############
# "wget -N" does not work with "-O" option... so we use a workaround here
download_newer()
{
FILE=$1
URL=$2
if [ ! -f "$FILE" ]; then
wget -q $URL -O $FILE
fi
}
## Start of environment preparation
###################################
echo ""
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " Bootstrapping the VM:"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
# Are we punching above our weight?
if [ "$EUID" -ne "0" ]; then
echo '- The bootstrap script must be run as root!'
exit 1
fi
cd $WORKING_DIR
mkdir -p $DOWNLOAD_DIR
echo "Configuring timezone"
cp /usr/share/zoneinfo/Europe/Vienna /etc/localtime > setup_timezone.log 2>&1
if [ $DISTRI == "CentOS" ]; then
POSTGRESQL_REPO_RPM=http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm
REPO_CONFIG_FILE=/etc/yum.repos.d/CentOS-Base.repo
TOMCAT_PKG_NAME=tomcat6
TOMCAT_SERVICE_NAME=$TOMCAT_PKG_NAME
fi
if [ $INSTALL_POSTGIS ]; then
if [ $DISTRI == "CentOS" ]; then
if [ $INSTALL_POSTGIS ]; then
sed -i 's/\[base\]/\[base\]\nexclude=postgresql\*/' $REPO_CONFIG_FILE
sed -i 's/\[updates\]/\[updates\]\nexclude=postgresql\*/' $REPO_CONFIG_FILE
fi
else
if [ $INSTALL_POSTGIS ]; then
sed -i 's/\[fedora\]/\[fedora\]\nexclude=postgresql\*/' $REPO_CONFIG_FILE
fi
fi
echo "Installing postgresql-9.3 repository"
download_newer $DOWNLOAD_DIR/postgresql-repo.rpm $POSTGRESQL_REPO_RPM
yum -y localinstall $DOWNLOAD_DIR/postgresql-repo.rpm > install_postgresql_repo.log 2>&1
echo "Installing epel repository"
download_newer $DOWNLOAD_DIR/epel-repo.rpm http://fedora.aau.at/epel/6/i386/epel-release-6-8.noarch.rpm
yum -y localinstall $DOWNLOAD_DIR/epel-repo.rpm > install_epel_repo.log 2>&1
fi
echo "Installing utils (gcc, git, ...) with yum repository version"
yum -y install cmake gcc gcc-c++ git iptables-services tar unzip wget > install_utils.log 2>&1
echo "Stopping iptables and SELinux"
service iptables stop > stop_iptables.log 2>&1
if [ $(getenforce) == "Enforcing" ]; then
setenforce 0 > stop_selinux.log 2>&1
fi
if [ $INSTALL_HTTPD ]; then
echo "Installing httpd server"
yum -y install httpd > install_httpd.log 2>&1
fi
if [ $INSTALL_POSTGIS ]; then
echo "Installing $POSTGRESQL_PKG_NAME"
yum -y install $POSTGRESQL_PKG_NAME $POSTGRESQL_PKG_NAME-server $POSTGRESQL_PKG_NAME-contrib postgis2_93 > install_database.log 2>&1
# echo "Installing postgis dependencies"
# yum -y install gdal-devel geos-devel json-c-devel libxml2-devel proj-devel > install_postgis_deps.log 2>&1
# echo "Installing postgis $POSTGIS_VERSION"
# git clone -q https://github.com/postgis/postgis.git $DEPLOY_DIR/postgis-$POSTGIS_VERSION
# ln -sf $DEPLOY_DIR/postgis-$POSTGIS_VERSION $DEPLOY_DIR/postgis
# cd $DEPLOY_DIR/postgis
# ./configure > $WORKING_DIR/install_postgis.log 2>&1
# make >> $WORKING_DIR/install_postgis.log 2>&1
# make install >> $WORKING_DIR/install_postgis.log 2>&1
# cd $WORKING_DIR
echo "Installing pgRouting dependencies"
yum -y install $POSTGRESQL_PKG_NAME-devel $POSTGRESQL_PKG_NAME-libs postgis2_93-devel > install_pgRouting_deps.log 2>&1
echo "Installing pgRouting $PGROUTING_VERSION"
git clone -q https://github.com/pgRouting/pgrouting.git $DEPLOY_DIR/pgRouting-$PGROUTING_VERSION
ln -sf $DEPLOY_DIR/pgRouting-$PGROUTING_VERSION $DEPLOY_DIR/pgRouting
cd $DEPLOY_DIR/pgRouting
git checkout -q pgrouting-$PGROUTING_VERSION > /dev/null 2>&1
mkdir build
cd build
cmake -DWITH_DD=ON .. > $WORKING_DIR/install_pgRouting.log 2>&1
make >> $WORKING_DIR/install_pgRouting.log 2>&1
make install >> $WORKING_DIR/install_pgRouting.log 2>&1
cd $WORKING_DIR
fi
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
echo "Installing geoserver $GEOSERVER_VERSION"
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
echo "CATALINA_OPTS=\"-Djava.awt.headless=true -DGEOSERVER_DATA_DIR=$DEPLOY_DIR/geoserver/data_dir\"" >> /usr/share/$TOMCAT_PKG_NAME/conf/tomcat.conf
mkdir -p $DEPLOY_DIR/geoserver/data_dir
echo "Installing geoserver web archive into tomcat"
mkdir -p $DEPLOY_DIR/$TOMCAT_PKG_NAME/webapps/geoserver
unzip $DEPLOY_DIR/$TOMCAT_PKG_NAME/webapps/geoserver.war -d $DEPLOY_DIR/$TOMCAT_PKG_NAME/webapps/geoserver >> install_geoserver.log 2>&1
echo "Installing geoserver-shell $GEOSERVER_SHELL_VERSION"
download_newer $DOWNLOAD_DIR/$GEOSERVER_SHELL_FILE http://www.krismer.de/files/$GEOSERVER_SHELL_FILE
unzip $DOWNLOAD_DIR/$GEOSERVER_SHELL_FILE -d $DEPLOY_DIR > install_geoserver_shell.log 2>&1
ln -sf $DEPLOY_DIR/gs-shell-0.2-SNAPSHOT $DEPLOY_DIR/gs-shell
make >> install_geoserver_shell.log 2>&1
make install >> install_geoserver_shell.log 2>&1
fi
if [ $INSTALL_TOMCAT -o $INSTALL_NEO4J -o $IMPORT_DATA ]; then
echo "Installing java (oracle jdk-$JAVA_VERSION)"
download_newer $DOWNLOAD_DIR/$JAVA_FILE http://www.krismer.de/files/$JAVA_FILE
yum -y localinstall $DOWNLOAD_DIR/$JAVA_FILE > install_java.log 2>&1
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"
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
alternatives --install /usr/bin/javac javac $DEPLOY_DIR/jdk/bin/javac 200000 >> setup_java.log 2>&1
alternatives --install /usr/bin/jar jar $DEPLOY_DIR/jdk/bin/jar 200000 >> setup_java.log 2>&1
fi
if [ $INSTALL_NEO4J ]; then
echo "Installing neo4j dependencies"
yum install -y lsof > install_neo4j_deps.log 2>&1
echo "Installing neo4j $NEO4J_VERSION"
download_newer $DOWNLOAD_DIR/$NEO4J_FILE http://dist.neo4j.org/$NEO4J_FILE
tar -xvzf $DOWNLOAD_DIR/$NEO4J_FILE -C $DEPLOY_DIR > install_neo4j.log 2>&1
ln -sf $DEPLOY_DIR/neo4j-community-$NEO4J_VERSION $DEPLOY_DIR/neo4j
echo "Installing maven $MAVEN_VERSION"
mkdir -p /tmp/vagrant-cache/maven
download_newer $DOWNLOAD_DIR/$MAVEN_FILE http://tweedo.com/mirror/apache/maven/maven-3/3.1.1/binaries/$MAVEN_FILE
unzip -o $DOWNLOAD_DIR/$MAVEN_FILE -d $DEPLOY_DIR > install_maven.log 2>&1
ln -sf $DEPLOY_DIR/apache-maven-$MAVEN_VERSION $DEPLOY_DIR/apache-maven
# yum -y install xmlstarlet >> install_maven.log
# echo "Configuring maven to use vagrant-cache plugin"
# xmlstarlet edit --inplace --subnode "/_:settings" -t elem -n "localRepository" -v "/tmp/vagrant-cache/maven" $DEPLOY_DIR/apache-maven/conf/settings.xml
cp /vagrant/maven-settings.xml $DEPLOY_DIR/apache-maven/conf/settings.xml
echo "export M2_HOME=/opt/apache-maven" > /etc/profile.d/maven.sh
echo "export PATH=\${M2_HOME}/bin:\${PATH}" >> /etc/profile.d/maven.sh
source /etc/profile.d/maven.sh
echo "Installing neo4j-spatial $NEO4J_SPATIAL_VERSION"
git clone -q https://github.com/neo4j/spatial.git $DEPLOY_DIR/neo4j-spatial-$NEO4J_SPATIAL_VERSION
ln -sf $DEPLOY_DIR/neo4j-spatial-$NEO4J_SPATIAL_VERSION $DEPLOY_DIR/neo4j-spatial
cd $DEPLOY_DIR/neo4j-spatial
git checkout -q $NEO4J_SPATIAL_VERSION > /dev/null 2>&1
mvn clean install -DskipTests > $WORKING_DIR/install_neo4j_spatial.log 2>&1
unzip -o target/*server-plugin.zip -d $DEPLOY_DIR/$TOMCAT_PKG_NAME/webapps/geoserver/WEB-INF/lib > $WORKING_DIR/install_neo4j_spatial_plugin.log 2>&1
cd $WORKING_DIR
# echo "Installing neo4j-spatial $NEO4J_SPATIAL_VERSION"
# download_newer $DOWNLOAD_DIR/neo4j-spatial-$NEO4J_SPATIAL_VERSION-server-plugin.zip http://dist.neo4j.org.s3.amazonaws.com/spatial/neo4j-spatial-$NEO4J_SPATIAL_VERSION-server-plugin.zip
# unzip -o $DOWNLOAD_DIR/neo4j-spatial-$NEO4J_SPATIAL_VERSION-server-plugin.zip -d $DEPLOY_DIR/$TOMCAT_PKG_NAME/webapps/geoserver/WEB-INF/lib > install_neo4j_spatial_plugin.log 2>&1
fi
if [ $IMPORT_DATA ]; then
if [ ! $IMPORT_DATA_CACHED ]; then
echo "Installing osmosis $OSMOSIS_VERSION"
download_newer $DOWNLOAD_DIR/$OSMOSIS_FILE http://bretth.dev.openstreetmap.org/osmosis-build/$OSMOSIS_FILE
mkdir -p $DEPLOY_DIR/osmosis-$OSMOSIS_VERSION
unzip -o $DOWNLOAD_DIR/$OSMOSIS_FILE -d $DEPLOY_DIR/osmosis-$OSMOSIS_VERSION > install_osmosis.log 2>&1
ln -sf $DEPLOY_DIR/osmosis-* $DEPLOY_DIR/osmosis
chmod a+x $DEPLOY_DIR/osmosis/bin/osmosis
fi
if [ $INSTALL_POSTGIS ]; then
echo "Installing osm2pgrouting dependencies"
yum install -y expat-devel boost-devel > install_osm2pgrouting_deps.log 2>&1
echo "export PostgreSQL_ROOT=/usr/pgsql-9.3" > /etc/profile.d/postgresql.sh
source /etc/profile.d/postgresql.sh
echo "Installing osm2pgrouting $OSM2PGROUTING_VERSION"
git clone -q https://github.com/pgRouting/osm2pgrouting.git $DEPLOY_DIR/osm2pgrouting-$OSM2PGROUTING_VERSION
ln -sf $DEPLOY_DIR/osm2pgrouting-$OSM2PGROUTING_VERSION $DEPLOY_DIR/osm2pgrouting
cd $DEPLOY_DIR/osm2pgrouting
git checkout -q $OSM2PGROUTING_VERSION > /dev/null 2>&1
cmake -H. -Bbuild > $WORKING_DIR/install_osm2pgrouting.log 2>&1
cd build/
make >> $WORKING_DIR/install_osm2pgrouting.log 2>&1
make install >> $WORKING_DIR/install_osm2pgrouting.log 2>&1
cd $WORKING_DIR
fi
fi
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " Installations done!"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
if [ $INSTALL_POSTGIS ]; then
echo "Initialize postgresql database"
service $POSTGRESQL_SERVICE_NAME initdb > initialize_postgresql.log 2>&1
echo "Configuring and starting postgresql-server"
cp /vagrant/pg_hba.conf $POSTGRESQL_HBA_CONF
fi
if [ $INSTALL_NEO4J ]; then
echo "Initialize neo4j database"
$DEPLOY_DIR/neo4j/bin/neo4j start > initialize_neo4j.log 2>&1
$DEPLOY_DIR/neo4j/bin/neo4j stop > initialize_neo4j.log 2>&1
fi
if [ $INSTALL_TOMCAT ]; then
echo "Configuring tomcat"
cp /vagrant/tomcat-users.xml /usr/share/$TOMCAT_PKG_NAME/conf/tomcat-users.xml
echo "Setting permissions"
chown -R tomcat:tomcat $DEPLOY_DIR/$TOMCAT_PKG_NAME/webapps/geoserver
chown -R tomcat:tomcat $DEPLOY_DIR/geoserver
chown -R tomcat:tomcat $DEPLOY_DIR/neo4j
chown -R tomcat:tomcat $DEPLOY_DIR/neo4j-community-$NEO4J_VERSION
fi
echo "Starting services"
if [ $INSTALL_HTTPD ]; then
service httpd start > start_httpd.log 2>&1
chkconfig httpd on >> start_httpd.log 2>&1
fi
if [ $INSTALL_POSTGIS ]; then
service $POSTGRESQL_SERVICE_NAME start > start_pg.log 2>&1
chkconfig $POSTGRESQL_SERVICE_NAME on >> start_pg.log 2>&1
fi
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
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " Services prepared!"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
if [ $IMPORT_DATA ]; then
if [ $IMPORT_DATA_CACHED ]; then
echo "Downloading cached OpenStreetMap file"
download_newer $DOWNLOAD_DIR/$OSM_FILE_FILTERED http://www.krismer.de/files/$OSM_FILE_FILTERED
cp $DOWNLOAD_DIR/$OSM_FILE_FILTERED $DEPLOY_DIR/$OSM_FILE_FILTERED
else
echo "Downloading OpenStreetMap file"
download_newer $DOWNLOAD_DIR/$OSM_FILE http://download.geofabrik.de/europe/$OSM_FILE
echo "Filtering OpenStreetMap data"
$DEPLOY_DIR/osmosis/bin/osmosis --read-pbf file="$DOWNLOAD_DIR/$OSM_FILE" --bounding-box $OSM_BBOX_IBK --way-key keyList="$OSM_KEYS" --used-node --write-xml file="$DEPLOY_DIR/$OSM_FILE_FILTERED" > initialize_osm_data.sh 2>&1
fi
fi
if [ $INSTALL_POSTGIS ]; then
echo "Creating postgresql database $DATABASE_NAME"
cd $DEPLOY_DIR
sudo -u postgres psql -d template1 -c "CREATE DATABASE $DATABASE_NAME;" > $WORKING_DIR/setup_database.log 2>&1
sudo -u postgres psql -d $DATABASE_NAME -c "CREATE USER $DATABASE_USER WITH PASSWORD '$DATABASE_PASSWORD';" >> $WORKING_DIR/setup_database.log 2>&1
sudo -u postgres psql -d $DATABASE_NAME -c "ALTER DATABASE $DATABASE_NAME OWNER TO $DATABASE_USER;" >> $WORKING_DIR/setup_database.log 2>&1
sudo -u postgres psql -d $DATABASE_NAME -c "GRANT ALL PRIVILEGES ON DATABASE $DATABASE_NAME to $DATABASE_USER;" >> $WORKING_DIR/setup_database.log 2>&1
sudo -u postgres psql -d $DATABASE_NAME -c "CREATE EXTENSION postgis;" >> $WORKING_DIR/setup_database.log 2>&1
sudo -u postgres psql -d $DATABASE_NAME -c "CREATE EXTENSION pgRouting;" >> $WORKING_DIR/setup_database.log 2>&1
cd $WORKING_DIR
fi
if [ $IMPORT_DATA -a $INSTALL_POSTGIS ]; then
echo "Importing filtered OpenStreetMap data into pgRouting database"
$DEPLOY_DIR/osm2pgrouting/build/osm2pgrouting -file "$DEPLOY_DIR/$OSM_FILE_FILTERED" -conf "$OSM2PGROUTING_MAPPING_CONF" -dbname $DATABASE_NAME -user $DATABASE_USER -passwd $DATABASE_PASSWORD -clean -prefixtables $TABLE_PREFIX > import_osm2pgrouting.log 2>&1
fi
if [ $IMPORT_DATA -a $INSTALL_NEO4J ]; then
echo "Importing filtered OpenStreetMap data into neo4j-spatial database"
cd $DEPLOY_DIR/neo4j-spatial
mvn exec:java -Dexec.mainClass=org.neo4j.gis.spatial.osm.OSMImporter -Dexec.args="$DEPLOY_DIR/neo4j/data/graph.db $DEPLOY_DIR/$OSM_FILE_FILTERED" > $WORKING_DIR/import_osm2neo4j.log 2>&1
cd $WORKING_DIR
fi
if [ $INSTALL_TOMCAT ]; then
echo "Starting geoserver $GEOSERVER_VERSION"
JAVA_HOME=$DEPLOY_DIR/jre GEOSERVER_HOME=$DEPLOY_DIR/geoserver $DEPLOY_DIR/geoserver/bin/startup.sh > start_geoserver.log 2>&1 &
if [ $INSTALL_NEO4J -o $INSTALL_POSTGIS ]; then
echo "Configuring geoserver $GEOSERVER_VERSION using geoserver-shell $GEOSERVER_SHELL_VERSION"
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile /vagrant/geoserver_setup_workspace.gs > setup_geoserver_workspace.log 2>&1
if [ $INSTALL_NEO4J ]; then
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile /vagrant/geoserver_setup_neo4j.gs > setup_geoserver_neo4j.log 2>&1
fi
if [ $INSTALL_POSTGIS ]; then
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile /vagrant/geoserver_setup_postgis.gs > setup_geoserver_postgis.log 2>&1
fi
fi
fi
END=$(date +%s)
TOTAL=$(( $END - $START ))
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " All preparations done... box can now be used"
echo " Bootstrapping time: $TOTAL seconds"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
geoserver set --url http://localhost:8080/geoserver --user admin --password geoserver
datastore create --workspace isochrone --name Neo4J --connectionParams "dbtype=neo4j 'The directory path of the Neo4j database: '=/opt/neo4j/data/graph.db"
datastore modify --workspace isochrone --name Neo4J --description "Neo4J datastore"
datastore modify --workspace isochrone --name Neo4J --enabled true
# ToDo: publish /opt/innsbruck-131101-filtered.osm
geoserver set --url http://localhost:8080/geoserver --user admin --password geoserver
postgis datastore create --workspace isochrone --datastore PostGIS --host localhost --port 5432 --database isochrone --schema public --user niko --password secretPhdPassword#2013!
datastore modify --workspace isochrone --name PostGIS --description "PostGIS datastore"
datastore modify --workspace isochrone --name PostGIS --enabled true
postgis featuretype publish --workspace isochrone --datastore PostGIS --table ibk_ways
geoserver set --url http://localhost:8080/geoserver --user admin --password geoserver
workspace create --name isochrone
workspace default set --name isochrone
namespace modify --prefix isochrone --uri de.krismer.isochrone
ows wms create --workspace isochrone
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>/tmp/vagrant-cache/maven</localRepository>
</settings>
\ No newline at end of file
# TYPE DATABASE USER ADDRESS METHOD
local all all peer
host all all 127.0.0.1/32 trust
host all all ::1/128 trust
<tomcat-users>
<role rolename="admin" />
<role rolename="admin-gui" />
<role rolename="manager" />
<role rolename="manager-gui" />
<user name="admin" password="admin" roles="admin,admin-gui,manager,manager-gui" />
</tomcat-users>
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