-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
61 additions
and
45 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
chmod +x setup_user_postgis.sh | ||
chmod +x move_postgres.sh | ||
chmod +x setup_styles.sh | ||
chmod +x setup_dataset.sh | ||
chmod +x setup_apache.sh | ||
chmod +x load_mod_tile.sh | ||
|
||
./setup_user_postgis.sh | ||
./move_postgres.sh | ||
./setup_styles.sh | ||
./setup_datset.sh | ||
./setup_apache.sh | ||
./load_mod_tile.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,31 @@ | ||
#!/bin/bash | ||
|
||
NEW_PATH="/srv/postgresql" | ||
OLD_PATH="/var/lib/postgresql/9.4/main" | ||
FILE_PATH="/etc/postgresql/9.4/main/postgresql.conf" | ||
|
||
# REMOVE OLD DIRS | ||
rm -rf /srv/ | ||
|
||
# STOP SERVICES | ||
systemctl stop postgresql | ||
|
||
# CHANGE POSTGRES DIRECTORY | ||
sed -i "s|$OLD_PATH|$NEW_PATH|g" $FILE_PATH | ||
|
||
# CREATE STRUCTURE | ||
mkdir -p /srv/postgresql | ||
mkdir /srv/styles | ||
mkdir /srv/planet | ||
|
||
# COPY POSTGRESQL | ||
cp -r $OLD_PATH/. $NEW_PATH/ | ||
|
||
# FIX PERMISSIONS | ||
chown -R postgres:postgres /srv/postgresql/ | ||
chmod 700 /srv/postgresql/ | ||
|
||
|
||
|
||
# START SERVICES | ||
systemctl start postgresql | ||
|
||
|
||
#!/bin/bash | ||
|
||
NEW_PATH="/srv/postgresql" | ||
OLD_PATH="/var/lib/postgresql/9.4/main" | ||
FILE_PATH="/etc/postgresql/9.4/main/postgresql.conf" | ||
|
||
# REMOVE OLD DIRS | ||
rm -rf /srv/postgresql | ||
|
||
# STOP SERVICES | ||
systemctl stop postgresql | ||
|
||
# CHANGE POSTGRES DIRECTORY | ||
sed -i "s|$OLD_PATH|$NEW_PATH|g" $FILE_PATH | ||
|
||
# CREATE STRUCTURE | ||
mkdir -p /srv/postgresql | ||
|
||
# COPY POSTGRESQL | ||
cp -r $OLD_PATH/. $NEW_PATH/ | ||
|
||
# FIX PERMISSIONS | ||
chown -R postgres:postgres /srv/postgresql/ | ||
chmod 700 /srv/postgresql/ | ||
|
||
|
||
|
||
# START SERVICES | ||
systemctl start postgresql | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
#!/bin/bash | ||
|
||
DATABASE_NAME="gis" | ||
|
||
# SETUP USER FOR DB | ||
sudo -u postgres createuser algogis | ||
sudo -u postgres createdb -E UTF8 -O algogis gis | ||
useradd -m algogis | ||
|
||
# SETUP DB | ||
sudo -u postgres psql $DATABASE_NAME -c 'CREATE EXTENSION postgis;ALTER TABLE geometry_columns OWNER TO algogis; ALTER TABLE spatial_ref_sys OWNER TO algogis;' | ||
#!/bin/bash | ||
|
||
DATABASE_NAME="gis" | ||
|
||
# SETUP USER FOR DB | ||
sudo -u postgres createuser algogis | ||
sudo -u postgres createdb -E UTF8 -O algogis gis | ||
useradd -m algogis | ||
|
||
# SETUP DB | ||
sudo -u postgres psql $DATABASE_NAME -c 'CREATE EXTENSION postgis;ALTER TABLE geometry_columns OWNER TO algogis; ALTER TABLE spatial_ref_sys OWNER TO algogis;' |
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