Sunday, September 23, 2018

How to build a server for spatial information

How to build a server for spatial information

In this post I gather all the tutorials needed to setup a server for managing spatial information with open source software.



1. Install Ubuntu Server 18.04 LTS

Tutorial: https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-server#0

When installation finish update the system:
sudo apt-get update && sudo apt-get upgrade -y


2. Install Apache

Tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-18-04-quickstart
Apache landing page: http://localhost or http://My_SERVER_IP

Commands:
sudo service apache2 restart
sudo service apache2 reload
sudo start apache2
sudo stop apache2
sudo reload apache2
sudo restart apache2
>check Apache your status
sudo service apache2 status


3. Install PostgreSQL

phpMyAdmin landing page:  http://My_SERVER_IP/phpmyadmin

Commands:
/etc/init.d/postgresql restart
sudo -u postgres createuser -P MyNAME
MyPASSWORD
sudo -u postgres createdb -O MyDATABASE
Test Connection to Postgresql
psql -h localhost -U MyNAME MyDATABASE
To exit type:
\q
Backap Database:
sudo pg_dump -Fc -U postgres -h localhost MyDATABASE --no-owner --no-acl --verbose -f /home/MyNAME/Documents/NAMEdump-20170727-0230.bak


4. Install PostGIS 

PostGIS is spatial database extension to PostgreSQL

Commands:
sudo -u postgres createdb -O MyNAME MyDATABASE
sudo -u postgres psql -c "CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;" MyDATABASE
sudo -u postgres psql -c "CREATE EXTENSION adminpack;" MyDATABASE


5. Install GeoServer

Tutorial: https://docs.geoserver.org/stable/en/user/installation/war.html#installation-war
Default username and password is: admin/geoserver
To Start GeoServer
cd /usr/share/geoserver/bin
sh startup.sh
GeoServer landing page: http://My_SERVER_IP:8080/geoserver/


6. WebTools

a. Django or other...working on it... trying to find a replacement for the old drupal..

b. CesiumJS
An open-source JavaScript library for world-class 3D globes and maps
Tutorial data: https://cesiumjs.org/downloads

c. WebODM
A free, user-friendly, extendable application and API for drone image processing. Generate georeferenced maps, point clouds, elevation models and textured 3D models from aerial images. It uses ODM for processing.

d. Install TightVNC
TightVNC is a free remote control software package. With TightVNC, you can see the desktop of a remote machine and control it with your local mouse and keyboard, just like you would do it sitting in the front of that computer.

e. ytalk
A helpful command line tool to communicate between network computers
Tutorial: http://manpages.ubuntu.com/manpages/cosmic/en/man1/ytalk.1.html
Installation
sudo apt-get update
sudo apt-get install ytalk


6. Drupal 7 and Cartaro outdated

1. import shp with shp2pgsql-gui
2. Add new Store in geoserver > PostGIS - PostGIS Database
2. publish new story
3. New drupal openlayers postgis leyer
4. Import to map
Note: in Drupal if there is no PostgreSQL you need to install php-pgsql and php7.0-pgsql

Cartaro
updated only the outside modules
If problems with FTP in Drupal install PureFTPd
https://www.server-world.info/en/note?os=Ubuntu_17.04&p=ftp&f=2
-x-cartaro with GDAL extension and php7 patch
https://github.com/geonef/php5-gdal/issues/12

No comments:

Post a Comment