2.12.1. General Information¶
The following extensions are available to increase the functionality of the software:
Basemaps - adding and managing basemaps.
File buckets - file sets, adds ability to upload any files, including non-geospatial ones.
QGIS - map rendering with QGIS.
MapServer - map rendering with MapServer.
Audit - logging user events such as log in/out, resource addition or removal etc.
NextGIS ID on premise - enterprise authentification and authorization features, such as LDAP or OAuth.
Specific extensions may require installation of additional software components.
2.12.2. Installing an extension¶
Here are the steps to add nextgisweb_filebucket extension:
Execute command to download extension source code to a server where NextGIS Web is installed:
git clone https://github.com/nextgis/nextgisweb_filebucket.git
Install extension in NextGIS Web:
env/bin/pip install -e ./nextgisweb_filebucket
Create nessesary directories (optional):
Make changes to configuration file (optional):
Example: changes to configuration file:
[file_bucket] path = /home/username/ngw/file_bucket
Reinitialize NextGIS Web database:
env/bin/nextgisweb --config config.ini initialize_db
Restart NextGIS Web to apply changes.
2.12.3. Adding NextGIS Web QGIS extension¶
This extension adds support for rending with QGIS. To operate it needs QGIS 2.8 or higher already installed on the system.
cd ~/ngw git clone firstname.lastname@example.org:nextgis/nextgisweb_qgis.git source env/bin/activate pip install -e nextgisweb_qgis/
QGIS and PyQT4 dependencies are not listed in
setup.py because it is hard to install it in virtualenv. So lets copy these libraries from system packages to virtualenv. On Ubuntu these libraries are located in
# DST should point to virtualenv site-packages directory. # If it is point to another place you have to modify DST definition. # For example: DST=`python -c "import sys; print sys.path[-2]"` DST=`python -c "import sys; print sys.path[-1]"` echo $DST cp `/usr/bin/python -c "import sip; print sip.__file__"` $DST cp -r `/usr/bin/python -c "import PyQt4, os.path; print os.path.split(PyQt4.__file__)"` $DST cp -r `/usr/bin/python -c "import qgis, os.path; print os.path.split(qgis.__file__)"` $DST
For QGIS 2.16 and higher:
# Only for latest QGIS version (2.16 and higher) export PYTHONPATH=$PYTHONPATH:/usr/share/qgis/python cp -r `/usr/bin/python -c "import PyQt, os.path; print os.path.split(PyQt.__file__)"` $DST
220.127.116.11. uWSGI Deployment Notes¶
You have to add –lazy-apps to the command line, in this way application will be loaded after master’s fork, so each worker will get its thread.
[uwsgi] lazy-apps = True
Beware as there is an older options named lazy that is way more invasive and highly discouraged (it is still here only for backward compatibility).
If you get an error message ERROR: Auth db directory path could not be created then you have to specify directory where an existing qgis-auth.db is located or created if not present. This directory needs to be writeable by uwsgi process user. For example:
[uwsgi] env = QGIS_AUTH_DB_DIR_PATH=/var/www
If you don’t see cyrillic labels add the following environment variable:
environment = LC_ALL="en_US.UTF-8"