This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
apt-get install openjdk-8-jre | |
# PostgreSQL and PostGIS | |
apt-get install postgresql postgresql-contrib postgis postgresql-10-postgis-2.4 | |
# Create "geoserver" database | |
sudo -u postgres createuser -P geoserver | |
sudo -u postgres createdb -O geoserver geoserver | |
sudo -u postgres psql -c "CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;" geoserver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: geoserver | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: S 0 1 6 | |
# Short-Description: GeoServer OGC server | |
### END INIT INFO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION giscuit_layers.tst_postrau_change() RETURNS TRIGGER AS $$ | |
BEGIN | |
NEW.the_geom := (SELECT the_geom FROM giscuit_layers.tst_postrau WHERE tst_postrau.gid = NEW.postraugid); | |
RETURN NEW; | |
END; | |
$$ LANGUAGE plpgsql; | |
DROP TRIGGER IF EXISTS tst_postrau_change ON giscuit_layers.tst_dtpstrau_map; | |
CREATE TRIGGER tst_postrau_change BEFORE UPDATE ON giscuit_layers.tst_dtpstrau_map FOR EACH ROW EXECUTE PROCEDURE giscuit_layers.tst_postrau_change(); |