This description corresponds to the installation on a server with the Linux operating system Ubuntu Server 14.04. As usual in Ubuntu, sudo
is prepended to commands that require administrative rights in order to obtain the appropriate authorization. The installation on other Debian-based systems should be quite similar. In this instructions, GNU nano is used to edit configuration files. This console-based text editor is shipped with Ubuntu and other Linux distributions but you can of course use another text editor of your choice.
Install the required packages (Apache web server, PHP, PostgrSQL, PostGIS, GDAL):
sudo apt-get install apache2 php libapache2-mod-php php-mbstring php-gd php-xml php-zip php-pgsql postgresql postgresql-9.5-postgis-2.2 gdal-bin
.htaccess
files needs to be enabled. Therefor, the Apache configuration file /etc/apache2/sites-available/default
needs to be edited (it is assumed that only the default virtual host is used; if several virtual hosts are in use, edit the corresponding configuration file for the specific virtual host):sudo nano /etc/apache2/sites-available/default
Directory
as follows:
<Directory /var/www> Options -Indexes AllowOverride All Order allow,deny allow from all </Directory>Save the changes with
[STRG]+[O]
and close the editor with [STRG]+[X]
.mod_rewrite
:sudo a2enmod rewrite
sudo service apache2 restart
sudo -u postgres psql
CREATE ROLE "geocre-user" WITH LOGIN PASSWORD 'foobar123';
CREATE DATABASE "geocre" WITH OWNER "geocre-user" ENCODING 'UTF-8';
\connect geocre
CREATE EXTENSION postgis;
SELECT PostGIS_version();An output similar to the following should be returned:
2.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1 (1 row)
\q
psql -U "geocre-user" -d "geocre" -f /var/www/geocre/config/sql/initial.sqlThe path to the initialization schema initial.sql might be adapted, it is located in the directory config/sql of the web application. If you encounter authentication problems (e.g. psql: FATAL: Peer authentication failed for user "geocre-user"), you need to change the authentication method in the PostgreSQL configuration file
pg_hba.conf
(more about that in the Ubuntu documentation)./var/www
.sudo chown geocre /var/www/geocre -R
find /var/www/geocre -type f -exec chmod 644 {} \;
find /var/www/geocre -type d -exec chmod 755 {} \;
nano /var/www/geocre/config/db_settings.conf.phpThe following lines need to be adapted:
$db_settings['database'] = 'geocre'; $db_settings['user'] = 'geocre-user'; $db_settings['password'] = 'foobar123';Save the file with
[STRG]+[O]
and exit the editor with [STRG]+[X]
.files/page_images
and files/data_images
with the containing directories to the web server user "www-data":
chown www-data /var/www/geocre/files/data_images -R chown www-data /var/www/geocre/files/page_images -R
The web application should now be ready for use and accessible under the web address of the web server (e.g. http://127.0.0.1/geocre/
if you installed it locally). While initializing the data base a user with administrative permissions was created (e-mail address: "mail@example.org", password "foobar123"). At first, you should log in with this access data and change the password (go to your profile and click the button "Edit profile").