Merge branch 'main' of https://git.acugis.com/AcuGIS/QuartzMap
This commit is contained in:
commit
7d4e8b19a7
docs/source
|
@ -42,3 +42,5 @@ html_static_path = ['_static']
|
||||||
html_css_files = [
|
html_css_files = [
|
||||||
'css/custom.css',
|
'css/custom.css',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
pygments_style = "sphinx"
|
|
@ -1,45 +1,8 @@
|
||||||
Install
|
Install
|
||||||
=======
|
=======
|
||||||
|
|
||||||
GeoSync is installed using the included installation script.
|
|
||||||
|
|
||||||
The script will attempt to provision an SSL certificate using Certbot.
|
Installation on Ubuntu 22
|
||||||
|
|
||||||
Ensure that your hostname is properly set. If not set the hostname using 'hostnamectl set-hostname domain.com'
|
|
||||||
|
|
||||||
Basic Install
|
|
||||||
------------
|
|
||||||
|
|
||||||
Clone the repository::
|
|
||||||
|
|
||||||
git clone https://git.acugis.com/AcuGIS/GeoSync.git
|
|
||||||
|
|
||||||
Change to the GeoSync directory::
|
|
||||||
|
|
||||||
cd GeoSync
|
|
||||||
|
|
||||||
Execute the scripts in order::
|
|
||||||
|
|
||||||
$ ./installer/postgres.sh
|
|
||||||
$ ./installer/app-install.sh
|
|
||||||
|
|
||||||
Upon completion, you should see the message below::
|
|
||||||
|
|
||||||
Backend installation is finished.
|
|
||||||
|
|
||||||
|
|
||||||
Complete Setup
|
|
||||||
--------------
|
|
||||||
|
|
||||||
Go to https://domain.com/admin.setup.php to complete the installation.
|
|
||||||
|
|
||||||
.. image:: images/installer-2.png
|
|
||||||
|
|
||||||
|
|
||||||
Populate the required fields with whatever values you want to use.
|
|
||||||
|
|
||||||
|
|
||||||
Manual Installation on Ubuntu 22
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
Follow below to customize your installation.
|
Follow below to customize your installation.
|
||||||
|
@ -54,26 +17,15 @@ If you do not already have it installed, install it now.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
#!/bin/bash -e
|
apt -y install postgresql postgresql-contrib postgis
|
||||||
|
|
||||||
apt install postgresql postgresql-contrib
|
|
||||||
|
|
||||||
|
|
||||||
Install Prerequisties
|
Install Prerequisties
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
|
||||||
For Community Edition:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
apt-get -y install apache2 libapache2-mod-php php-{pgsql,zip,gd,simplexml} proftpd postfix python3-certbot-apache
|
|
||||||
|
|
||||||
For Commerical Edition:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
apt-get -y install apache2 libapache2-mod-php php-{pgsql,zip,gd,simplexml} proftpd libapache2-mod-fcgid postfix python3-certbot-apache
|
apt-get -y install apache2 libapache2-mod-php php-{pgsql,zip,gd,simplexml} proftpd libapache2-mod-fcgid postfix python3-certbot-apache
|
||||||
install_qgis_server
|
|
||||||
|
|
||||||
|
|
||||||
Create the PostGIS Database
|
Create the PostGIS Database
|
||||||
|
@ -91,82 +43,137 @@ Create the Database Objects
|
||||||
|
|
||||||
.. code-block:: sql
|
.. code-block:: sql
|
||||||
|
|
||||||
CREATE TYPE public.userlevel AS ENUM ('Admin', 'User');
|
CREATE TYPE public.userlevel AS ENUM ('Admin', 'User');
|
||||||
|
|
||||||
CREATE TABLE public.user ( id SERIAL PRIMARY KEY,
|
CREATE TABLE public.user ( id SERIAL PRIMARY KEY,
|
||||||
name character varying(250),
|
name character varying(250),
|
||||||
email character varying(250),
|
email character varying(250),
|
||||||
password character varying(255),
|
password character varying(255),
|
||||||
ftp_user character varying(250),
|
ftp_user character varying(250),
|
||||||
accesslevel public.userlevel,
|
accesslevel public.userlevel,
|
||||||
owner_id integer NOT NULL REFERENCES public.user(id),
|
owner_id integer NOT NULL REFERENCES public.user(id),
|
||||||
UNIQUE(email)
|
UNIQUE(email)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE public.access_groups ( id SERIAL PRIMARY KEY,
|
CREATE TABLE public.access_groups ( id SERIAL PRIMARY KEY,
|
||||||
name character varying(255) NOT NULL,
|
name character varying(255) NOT NULL,
|
||||||
owner_id integer NOT NULL REFERENCES public.user(id)
|
owner_id integer NOT NULL REFERENCES public.user(id)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE public.user_access ( id SERIAL PRIMARY KEY,
|
CREATE TABLE public.user_access ( id SERIAL PRIMARY KEY,
|
||||||
user_id integer NOT NULL REFERENCES public.user(id),
|
user_id integer NOT NULL REFERENCES public.user(id),
|
||||||
access_group_id integer NOT NULL REFERENCES public.access_groups(id),
|
access_group_id integer NOT NULL REFERENCES public.access_groups(id),
|
||||||
UNIQUE(user_id, access_group_id)
|
UNIQUE(user_id, access_group_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE public.map ( id SERIAL PRIMARY KEY,
|
CREATE TABLE public.map ( id SERIAL PRIMARY KEY,
|
||||||
name character varying(50) NOT NULL,
|
name character varying(50) NOT NULL,
|
||||||
description character varying(50) NOT NULL,
|
description character varying(50) NOT NULL,
|
||||||
is_public BOOLEAN DEFAULT false,
|
is_public BOOLEAN DEFAULT false,
|
||||||
owner_id integer NOT NULL REFERENCES public.user(id)
|
owner_id integer NOT NULL REFERENCES public.user(id)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE public.map_access ( id SERIAL PRIMARY KEY,
|
CREATE TABLE public.map_access ( id SERIAL PRIMARY KEY,
|
||||||
map_id integer NOT NULL REFERENCES public.map(id),
|
map_id integer NOT NULL REFERENCES public.map(id),
|
||||||
access_group_id integer NOT NULL REFERENCES public.access_groups(id),
|
access_group_id integer NOT NULL REFERENCES public.access_groups(id),
|
||||||
UNIQUE(map_id, access_group_id)
|
UNIQUE(map_id, access_group_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE public.permalink ( id SERIAL PRIMARY KEY,
|
CREATE TABLE public.permalink ( id SERIAL PRIMARY KEY,
|
||||||
description character varying(255),
|
description character varying(255),
|
||||||
query character varying(255),
|
query character varying(255),
|
||||||
map_id integer NOT NULL REFERENCES public.map(id),
|
map_id integer NOT NULL REFERENCES public.map(id),
|
||||||
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
expires TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP + interval '1 hour',
|
expires TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP + interval '1 hour',
|
||||||
visits integer NOT NULL DEFAULT 0,
|
visits integer NOT NULL DEFAULT 0,
|
||||||
visits_limit integer NOT NULL DEFAULT 1,
|
visits_limit integer NOT NULL DEFAULT 1,
|
||||||
hash character varying(36) NOT NULL,
|
hash character varying(36) NOT NULL,
|
||||||
owner_id integer NOT NULL REFERENCES public.user(id)
|
owner_id integer NOT NULL REFERENCES public.user(id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE TABLE public.signup ( id SERIAL PRIMARY KEY,
|
||||||
|
name character varying(250),
|
||||||
|
email character varying(250),
|
||||||
|
password character varying(250),
|
||||||
|
verify character varying(250),
|
||||||
|
UNIQUE(email)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Install QGIS Server
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
To advertise WMS, WFS, and WTMS, install QGIS server.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
RELEASE=$(lsb_release -cs)
|
||||||
|
wget --no-check-certificate --quiet -O /etc/apt/keyrings/qgis-archive-keyring.gpg https://download.qgis.org/downloads/qgis-archive-keyring.gpg
|
||||||
|
|
||||||
|
cat >>/etc/apt/sources.list.d/qgis.sources <<CAT_EOF
|
||||||
|
Types: deb deb-src
|
||||||
|
URIs: https://qgis.org/ubuntu
|
||||||
|
Suites: ${RELEASE}
|
||||||
|
Architectures: amd64
|
||||||
|
Components: main
|
||||||
|
Signed-By: /etc/apt/keyrings/qgis-archive-keyring.gpg
|
||||||
|
CAT_EOF
|
||||||
|
|
||||||
|
apt-get update -y || true
|
||||||
|
apt-get install -y qgis-server
|
||||||
|
|
||||||
|
if [ -d /etc/logrotate.d ]; then
|
||||||
|
cat >/etc/logrotate.d/qgisserver <<CAT_EOF
|
||||||
|
/var/log/qgisserver.log {
|
||||||
|
su www-data www-data
|
||||||
|
size 100M
|
||||||
|
notifempty
|
||||||
|
missingok
|
||||||
|
rotate 3
|
||||||
|
daily
|
||||||
|
compress
|
||||||
|
create 660 www-data www-data
|
||||||
|
}
|
||||||
|
CAT_EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
touch /var/log/qgisserver.log
|
||||||
|
chown www-data:www-data /var/log/qgisserver.log
|
||||||
|
|
||||||
CREATE TABLE public.signup ( id SERIAL PRIMARY KEY,
|
|
||||||
name character varying(250),
|
|
||||||
email character varying(250),
|
|
||||||
password character varying(250),
|
|
||||||
verify character varying(250),
|
|
||||||
UNIQUE(email)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Configure ProFTPD
|
Configure ProFTPD
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
|
Configure ProFTPD to jail users to FTP directories
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sed -i.save '
|
sed -i.save '
|
||||||
s/#DefaultRoot~/DefaultRoot ~/
|
s/#DefaultRoot~/DefaultRoot ~/
|
||||||
s/# RequireValidShelloff/RequireValidShell off/' /etc/proftpd/proftpd.conf
|
s/# RequireValidShelloff/RequireValidShell off/' /etc/proftpd/proftpd.conf
|
||||||
|
|
||||||
|
Restart ProFTPD for changes to take effect.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
systemctl enable proftpd
|
systemctl enable proftpd
|
||||||
systemctl restart proftpd
|
systemctl restart proftpd
|
||||||
|
|
||||||
|
|
||||||
Configure Apache
|
Configure Apache
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
a2enmod ssl headers expires fcgid cgi
|
a2enmod ssl headers expires fcgid cgi
|
||||||
|
|
||||||
cp installer/apache2.conf /etc/apache2/sites-available/default-ssl.conf
|
cp installer/apache2.conf /etc/apache2/sites-available/default-ssl.conf
|
||||||
|
|
||||||
|
# Below is required for Certbot to provision SSL
|
||||||
|
|
||||||
for f in 000-default default-ssl; do
|
for f in 000-default default-ssl; do
|
||||||
sed -i.save "s/#ServerName example.com/#ServerName ${HNAME}/" /etc/apache2/sites-available/${f}.conf
|
sed -i.save "s/#ServerName example.com/#ServerName ${HNAME}/" /etc/apache2/sites-available/${f}.conf
|
||||||
done
|
done
|
||||||
|
@ -174,11 +181,15 @@ Configure Apache
|
||||||
a2ensite 000-default default-ssl
|
a2ensite 000-default default-ssl
|
||||||
systemctl reload apache2
|
systemctl reload apache2
|
||||||
|
|
||||||
|
Request certificate from Let's Encrypt:
|
||||||
|
|
||||||
certbot --apache --agree-tos --email hostmaster@${HNAME} --no-eff-email -d ${HNAME}
|
certbot --apache --agree-tos --email hostmaster@${HNAME} --no-eff-email -d ${HNAME}
|
||||||
|
|
||||||
|
|
||||||
Create Data and Cache Directories
|
Create Data and Cache Directories
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
|
Set the DATA_DIR outside of public directories
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
@ -186,6 +197,12 @@ Create Data and Cache Directories
|
||||||
mkdir -p "${CACHE_DIR}"
|
mkdir -p "${CACHE_DIR}"
|
||||||
mkdir -p "${DATA_DIR}"
|
mkdir -p "${DATA_DIR}"
|
||||||
|
|
||||||
|
|
||||||
|
Grant Apache permissions
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
chown -R www-data:www-data "${APPS_DIR}"
|
chown -R www-data:www-data "${APPS_DIR}"
|
||||||
chown -R www-data:www-data "${CACHE_DIR}"
|
chown -R www-data:www-data "${CACHE_DIR}"
|
||||||
chown -R www-data:www-data "${DATA_DIR}"
|
chown -R www-data:www-data "${DATA_DIR}"
|
||||||
|
@ -195,8 +212,18 @@ Create Data and Cache Directories
|
||||||
chown -R www-data:www-data /var/www/html
|
chown -R www-data:www-data /var/www/html
|
||||||
rm -rf /var/www/html/installer
|
rm -rf /var/www/html/installer
|
||||||
|
|
||||||
|
Restart Apache for changes to take effect
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
systemctl restart apache2
|
systemctl restart apache2
|
||||||
|
|
||||||
|
|
||||||
|
Create Groups and Permissions
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
# create group for all FTP users
|
# create group for all FTP users
|
||||||
groupadd qatusers
|
groupadd qatusers
|
||||||
|
|
||||||
|
@ -215,9 +242,13 @@ Create Data and Cache Directories
|
||||||
echo -e "postgres and other passwords are saved in /root/auth.txt file"
|
echo -e "postgres and other passwords are saved in /root/auth.txt file"
|
||||||
|
|
||||||
|
|
||||||
Install More Stuff
|
Create incl/const.php file
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
|
|
||||||
|
Copy the incl/const.php.dist file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.. code-block:: php
|
.. code-block:: php
|
||||||
|
|
||||||
cat >admin/incl/const.php <<CAT_EOF
|
cat >admin/incl/const.php <<CAT_EOF
|
||||||
|
@ -236,25 +267,5 @@ Install More Stuff
|
||||||
?>
|
?>
|
||||||
CAT_EOF
|
CAT_EOF
|
||||||
|
|
||||||
.. note:: If you want to quickly install and test Lizmap Web Client in a few steps, you can follow those
|
|
||||||
`instructions <https://github.com/3liz/lizmap-docker-compose>`_ using Docker and Docker-Compose.
|
|
||||||
|
|
||||||
.. note:: In Debian distributions, you can work as administrator (log in with ``root``), without using ``sudo`` on contrary to Ubuntu.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
ln -s /etc/nginx/sites-available/lizmap.conf /etc/nginx/sites-enabled/lizmap.conf
|
|
||||||
|
|
||||||
Restart Nginx
|
|
||||||
-------------
|
|
||||||
|
|
||||||
You must restart the Nginx server to validate the configuration.
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
service nginx restart
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ Introduction
|
||||||
|
|
||||||
.. image:: images/admin-2.png
|
.. image:: images/admin-2.png
|
||||||
|
|
||||||
Usage
|
Overview
|
||||||
------------
|
------------
|
||||||
|
|
||||||
GeoSync provides a UI for DB-Sync and GeoDiff, allowing you to easily add Projects to be syncronized using PostGIS.
|
GeoSync provides a UI for DB-Sync and GeoDiff, allowing you to easily add Projects to be syncronized using PostGIS.
|
||||||
|
@ -11,3 +11,21 @@ GeoSync provides a UI for DB-Sync and GeoDiff, allowing you to easily add Projec
|
||||||
GeoSync is built with Mergin Maps DB-Sync and GeoDiff
|
GeoSync is built with Mergin Maps DB-Sync and GeoDiff
|
||||||
|
|
||||||
It can be used with either self-hosted Mergin Maps servers or Mergin Maps Team accounts (which provides API access)
|
It can be used with either self-hosted Mergin Maps servers or Mergin Maps Team accounts (which provides API access)
|
||||||
|
|
||||||
|
Authors
|
||||||
|
------------
|
||||||
|
|
||||||
|
QuartzMap is from AcuGIS and produced by Cited, Inc.
|
||||||
|
|
||||||
|
https://github.com/AcuGIS
|
||||||
|
|
||||||
|
https://github.com/DavidGhedini
|
||||||
|
|
||||||
|
https://github.com/kaloyan13
|
||||||
|
|
||||||
|
https://github.com/Cited
|
||||||
|
|
||||||
|
qgis2web is an indepedent project.
|
||||||
|
|
||||||
|
Learn more about qgis2web at https://github.com/qgis2web/qgis2web
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue