-
Notifications
You must be signed in to change notification settings - Fork 31
2. Setup
Download latest release and move the contents inside release name to /var/www/html/gisapp/
(create necessary folders manually) or use GIT:
cd /var/www/html/
git clone https://github.com/uprel/gisapp.git
At the end you need such file structure:
/var/www/html/gisapp/:
- _demo
- _scripts
- admin
- client
- vendor
- index.php
- README.md
Example of windows installation folder: c:\Apache24\htdocs\gisapp\
.
Copy Apache configuration file to conf-available folder
cp /var/www/html/gisapp/_setup/gisapp.conf /etc/apache2/conf-available/
Enable gisapp configuration
a2enconf gisapp
Add this 2 lines to /etc/apache2/sites-available/000-default.conf (inside VirtualHost tag)
Include conf-available/serve-cgi-bin.conf
Include conf-available/gisapp.conf
Reload configuration
service apache2 reload
_On Windows you can skip this part and simply create new database with pgAdminIII and run setup.sql (read next part).
First it is recommended that you are using different user for working with database instead of default postgres. If you have to create new PGSQL user, open terminal:
sudo su - postgres
createuser -d -E -i -l -P -r -s newuser
Be sure to change newuser
to desired username
Enter new password when prompted
Log out as postgres user
exit
Log in to psql, create new database and run setup script. Database name used in this setup is gisapp
. Change newuser
to your PGSQL user.
sudo -u postgres psql
CREATE DATABASE gisapp WITH OWNER = newuser ENCODING = 'UTF8';
\connect gisapp
\i /var/www/html/gisapp/_scripts/_setup.sql
Just a simple test to see if everything is OK. Type:
SELECT name FROM layers;
You should get something like this:
gisapp=# SELECT name FROM layers;
name
--------------
google_map
google_sat
mapquest_map
(3 rows)
Quit with: \q
Copy settings_template.php
to settings.php
:
cp /var/www/html/gisapp/admin/settings_template.php /var/www/html/gisapp/admin/settings.php
For Windows use settings_windows.php as template. Make sure to check and edit Apache port!
Open settings.php
and insert correct values for database, user and project location:
//database connection
define('DB_CONN_STRING','pgsql:host=localhost;port=5432;dbname=gisapp');
//db user
define('DB_USER','username');
define('DB_PWD','password');
//project location
define('PROJECT_PATH','/var/www/html/gisapp/_demo');
//qgis server
define('QGISSERVERURL','http://localhost/cgi-bin/qgis_mapserv.fcgi');
Navigate your browser to http://localhost/gisapp/helloworld?public=on.
Now you can continue with adding new users and projects with Managing Database.