From 90bba679db287c1ec97dd1e9938146407d3bbc26 Mon Sep 17 00:00:00 2001 From: AcuGIS Date: Tue, 26 Mar 2024 16:51:51 +0000 Subject: [PATCH 01/12] Update docs/source/install.rst --- docs/source/install.rst | 43 +++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index 301f624..af10fb5 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -28,10 +28,7 @@ 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. +Complete setup by navigating to https://domain.com/admin.setup.php to complete the installation. .. image:: images/installer-2.png @@ -159,14 +156,18 @@ Configure ProFTPD systemctl enable proftpd systemctl restart proftpd + Configure Apache ---------------------------- .. code-block:: bash a2enmod ssl headers expires fcgid cgi + 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 sed -i.save "s/#ServerName example.com/#ServerName ${HNAME}/" /etc/apache2/sites-available/${f}.conf done @@ -186,6 +187,12 @@ Create Data and Cache Directories mkdir -p "${CACHE_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 "${CACHE_DIR}" chown -R www-data:www-data "${DATA_DIR}" @@ -197,6 +204,12 @@ Create Data and Cache Directories systemctl restart apache2 + +Create Groups and Permissions +---------------------------- + +.. code-block:: bash + # create group for all FTP users groupadd qatusers @@ -215,7 +228,7 @@ Create Data and Cache Directories echo -e "postgres and other passwords are saved in /root/auth.txt file" -Install More Stuff +Create incl/const.php file --------------------------------------- .. code-block:: php @@ -236,25 +249,5 @@ Install More Stuff ?> CAT_EOF -.. note:: If you want to quickly install and test Lizmap Web Client in a few steps, you can follow those - `instructions `_ 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 From 5b43483b42d652d41dfe75c550123a8e7bd5dfb0 Mon Sep 17 00:00:00 2001 From: AcuGIS Date: Tue, 26 Mar 2024 16:53:19 +0000 Subject: [PATCH 02/12] Update docs/source/install.rst --- docs/source/install.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index af10fb5..5158b01 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -1,11 +1,13 @@ Install ======= -GeoSync is installed using the included installation script. +QuartzMap is installed using the included installation scripts. The script will attempt to provision an SSL certificate using Certbot. -Ensure that your hostname is properly set. If not set the hostname using 'hostnamectl set-hostname domain.com' +.. warning:: + Ensure that your hostname is properly set. If not set the hostname using 'hostnamectl set-hostname domain.com' + Basic Install ------------ @@ -14,9 +16,9 @@ Clone the repository:: git clone https://git.acugis.com/AcuGIS/GeoSync.git -Change to the GeoSync directory:: +Change to the quartz directory:: - cd GeoSync + cd quartz Execute the scripts in order:: From 4400cea9c8b9c880f4427c8c2706eb25daeb69b6 Mon Sep 17 00:00:00 2001 From: AcuGIS Date: Tue, 26 Mar 2024 16:56:55 +0000 Subject: [PATCH 03/12] Update docs/source/install.rst --- docs/source/install.rst | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index 5158b01..0d71860 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -12,24 +12,25 @@ The script will attempt to provision an SSL certificate using Certbot. Basic Install ------------ -Clone the repository:: +Clone the repository + +.. code-block:: bash git clone https://git.acugis.com/AcuGIS/GeoSync.git -Change to the quartz directory:: +Change to the quartz directory + +.. code-block:: bash cd quartz Execute the scripts in order:: +.. code-block:: bash + $ ./installer/postgres.sh $ ./installer/app-install.sh -Upon completion, you should see the message below:: - - Backend installation is finished. - - Complete setup by navigating to https://domain.com/admin.setup.php to complete the installation. .. image:: images/installer-2.png @@ -53,9 +54,7 @@ If you do not already have it installed, install it now. .. code-block:: bash -#!/bin/bash -e - - apt install postgresql postgresql-contrib + apt -y install postgresql postgresql-contrib postgis Install Prerequisties From 80483912d39960623091bc2d1b5ebe82bf5513c3 Mon Sep 17 00:00:00 2001 From: AcuGIS Date: Tue, 26 Mar 2024 17:02:10 +0000 Subject: [PATCH 04/12] Update docs/source/intro.rst --- docs/source/intro.rst | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/source/intro.rst b/docs/source/intro.rst index 38e115b..d047f38 100644 --- a/docs/source/intro.rst +++ b/docs/source/intro.rst @@ -3,7 +3,7 @@ Introduction .. 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. @@ -11,3 +11,17 @@ 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 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 + From ce1eb3a5b02625a346dba524cc62922bf9636eab Mon Sep 17 00:00:00 2001 From: AcuGIS Date: Tue, 26 Mar 2024 17:03:27 +0000 Subject: [PATCH 05/12] Update docs/source/intro.rst --- docs/source/intro.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/source/intro.rst b/docs/source/intro.rst index d047f38..b166760 100644 --- a/docs/source/intro.rst +++ b/docs/source/intro.rst @@ -18,10 +18,14 @@ 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 From 8d7fe17585ece06b5d9fc6641de2cd7366f6f797 Mon Sep 17 00:00:00 2001 From: AcuGIS Date: Tue, 26 Mar 2024 17:29:22 +0000 Subject: [PATCH 06/12] Update docs/source/install.rst --- docs/source/install.rst | 64 ++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index 0d71860..aab556c 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -91,59 +91,59 @@ Create the Database Objects CREATE TYPE public.userlevel AS ENUM ('Admin', 'User'); - CREATE TABLE public.user ( id SERIAL PRIMARY KEY, - name character varying(250), - email character varying(250), - password character varying(255), + CREATE TABLE public.user ( id SERIAL PRIMARY KEY, + name character varying(250), + email character varying(250), + password character varying(255), ftp_user character varying(250), - accesslevel public.userlevel, + accesslevel public.userlevel, owner_id integer NOT NULL REFERENCES public.user(id), UNIQUE(email) - ); + ); - CREATE TABLE public.access_groups ( id SERIAL PRIMARY KEY, - name character varying(255) NOT NULL, - owner_id integer NOT NULL REFERENCES public.user(id) - ); + CREATE TABLE public.access_groups ( id SERIAL PRIMARY KEY, + name character varying(255) NOT NULL, + owner_id integer NOT NULL REFERENCES public.user(id) + ); - CREATE TABLE public.user_access ( id SERIAL PRIMARY KEY, - user_id integer NOT NULL REFERENCES public.user(id), - access_group_id integer NOT NULL REFERENCES public.access_groups(id), + CREATE TABLE public.user_access ( id SERIAL PRIMARY KEY, + user_id integer NOT NULL REFERENCES public.user(id), + access_group_id integer NOT NULL REFERENCES public.access_groups(id), UNIQUE(user_id, access_group_id) - ); + ); - CREATE TABLE public.map ( id SERIAL PRIMARY KEY, - name character varying(50) NOT NULL, + CREATE TABLE public.map ( id SERIAL PRIMARY KEY, + name character varying(50) NOT NULL, description character varying(50) NOT NULL, 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, - map_id integer NOT NULL REFERENCES public.map(id), - access_group_id integer NOT NULL REFERENCES public.access_groups(id), + CREATE TABLE public.map_access ( id SERIAL PRIMARY KEY, + map_id integer NOT NULL REFERENCES public.map(id), + access_group_id integer NOT NULL REFERENCES public.access_groups(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), 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, expires TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP + interval '1 hour', visits integer NOT NULL DEFAULT 0, visits_limit integer NOT NULL DEFAULT 1, hash character varying(36) NOT NULL, 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) -); + 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 From 162681c969fee18e6e6bda1478e3a8592fcd3f78 Mon Sep 17 00:00:00 2001 From: AcuGIS Date: Tue, 26 Mar 2024 17:37:00 +0000 Subject: [PATCH 07/12] Update docs/source/install.rst --- docs/source/install.rst | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index aab556c..cef9bf2 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -89,28 +89,28 @@ Create the Database Objects .. 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, - name character varying(250), - email character varying(250), - password character varying(255), - ftp_user character varying(250), - accesslevel public.userlevel, - owner_id integer NOT NULL REFERENCES public.user(id), - UNIQUE(email) - ); +CREATE TABLE public.user ( id SERIAL PRIMARY KEY, +name character varying(250), +email character varying(250), +password character varying(255), +ftp_user character varying(250), +accesslevel public.userlevel, +owner_id integer NOT NULL REFERENCES public.user(id), +UNIQUE(email) +); - CREATE TABLE public.access_groups ( id SERIAL PRIMARY KEY, - name character varying(255) NOT NULL, - owner_id integer NOT NULL REFERENCES public.user(id) - ); +CREATE TABLE public.access_groups ( id SERIAL PRIMARY KEY, +name character varying(255) NOT NULL, +owner_id integer NOT NULL REFERENCES public.user(id) +); - CREATE TABLE public.user_access ( id SERIAL PRIMARY KEY, - user_id integer NOT NULL REFERENCES public.user(id), - access_group_id integer NOT NULL REFERENCES public.access_groups(id), - UNIQUE(user_id, access_group_id) - ); +CREATE TABLE public.user_access ( id SERIAL PRIMARY KEY, +user_id integer NOT NULL REFERENCES public.user(id), +access_group_id integer NOT NULL REFERENCES public.access_groups(id), +UNIQUE(user_id, access_group_id) +); CREATE TABLE public.map ( id SERIAL PRIMARY KEY, name character varying(50) NOT NULL, From bf126b9e5254e28eefd92b429b13aaa7b80dc879 Mon Sep 17 00:00:00 2001 From: AcuGIS Date: Tue, 26 Mar 2024 17:38:41 +0000 Subject: [PATCH 08/12] Update docs/source/install.rst --- docs/source/install.rst | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index cef9bf2..0059f57 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -89,28 +89,28 @@ Create the Database Objects .. 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, -name character varying(250), -email character varying(250), -password character varying(255), -ftp_user character varying(250), -accesslevel public.userlevel, -owner_id integer NOT NULL REFERENCES public.user(id), -UNIQUE(email) -); + CREATE TABLE public.user ( id SERIAL PRIMARY KEY, + name character varying(250), + email character varying(250), + password character varying(255), + ftp_user character varying(250), + accesslevel public.userlevel, + owner_id integer NOT NULL REFERENCES public.user(id), + UNIQUE(email) + ); -CREATE TABLE public.access_groups ( id SERIAL PRIMARY KEY, -name character varying(255) NOT NULL, -owner_id integer NOT NULL REFERENCES public.user(id) -); + CREATE TABLE public.access_groups ( id SERIAL PRIMARY KEY, + name character varying(255) NOT NULL, + owner_id integer NOT NULL REFERENCES public.user(id) + ); -CREATE TABLE public.user_access ( id SERIAL PRIMARY KEY, -user_id integer NOT NULL REFERENCES public.user(id), -access_group_id integer NOT NULL REFERENCES public.access_groups(id), -UNIQUE(user_id, access_group_id) -); + CREATE TABLE public.user_access ( id SERIAL PRIMARY KEY, + user_id integer NOT NULL REFERENCES public.user(id), + access_group_id integer NOT NULL REFERENCES public.access_groups(id), + UNIQUE(user_id, access_group_id) + ); CREATE TABLE public.map ( id SERIAL PRIMARY KEY, name character varying(50) NOT NULL, From 2c011028330e52ca00ba8335401ae7720bba7315 Mon Sep 17 00:00:00 2001 From: AcuGIS Date: Tue, 26 Mar 2024 17:41:58 +0000 Subject: [PATCH 09/12] Update docs/source/install.rst --- docs/source/install.rst | 58 ++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index 0059f57..65f4805 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -112,38 +112,38 @@ Create the Database Objects UNIQUE(user_id, access_group_id) ); - CREATE TABLE public.map ( id SERIAL PRIMARY KEY, - name character varying(50) NOT NULL, - description character varying(50) NOT NULL, - is_public BOOLEAN DEFAULT false, - owner_id integer NOT NULL REFERENCES public.user(id) - ); + CREATE TABLE public.map ( id SERIAL PRIMARY KEY, + name character varying(50) NOT NULL, + description character varying(50) NOT NULL, + is_public BOOLEAN DEFAULT false, + owner_id integer NOT NULL REFERENCES public.user(id) + ); - CREATE TABLE public.map_access ( id SERIAL PRIMARY KEY, - map_id integer NOT NULL REFERENCES public.map(id), - access_group_id integer NOT NULL REFERENCES public.access_groups(id), - UNIQUE(map_id, access_group_id) - ); + CREATE TABLE public.map_access ( id SERIAL PRIMARY KEY, + map_id integer NOT NULL REFERENCES public.map(id), + access_group_id integer NOT NULL REFERENCES public.access_groups(id), + UNIQUE(map_id, access_group_id) + ); - CREATE TABLE public.permalink ( id SERIAL PRIMARY KEY, - description character varying(255), - query character varying(255), - map_id integer NOT NULL REFERENCES public.map(id), - created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - expires TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP + interval '1 hour', - visits integer NOT NULL DEFAULT 0, - visits_limit integer NOT NULL DEFAULT 1, - hash character varying(36) NOT NULL, - owner_id integer NOT NULL REFERENCES public.user(id) - ); + CREATE TABLE public.permalink ( id SERIAL PRIMARY KEY, + description character varying(255), + query character varying(255), + map_id integer NOT NULL REFERENCES public.map(id), + created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + expires TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP + interval '1 hour', + visits integer NOT NULL DEFAULT 0, + visits_limit integer NOT NULL DEFAULT 1, + hash character varying(36) NOT NULL, + 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) - ); + 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 From 27f66d0ea8c9669f73340f7f9aa09707b0e52565 Mon Sep 17 00:00:00 2001 From: AcuGIS Date: Tue, 26 Mar 2024 18:02:15 +0000 Subject: [PATCH 10/12] Update docs/source/conf.py --- docs/source/conf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index 5ad8dcf..e00d3f4 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -42,3 +42,5 @@ html_static_path = ['_static'] html_css_files = [ 'css/custom.css', ] + +pygments_style = "sphinx" \ No newline at end of file From 96fc618d7516bde672ef9967ebfd0d0966e8f617 Mon Sep 17 00:00:00 2001 From: AcuGIS Date: Tue, 26 Mar 2024 18:06:40 +0000 Subject: [PATCH 11/12] Update docs/source/install.rst --- docs/source/install.rst | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/docs/source/install.rst b/docs/source/install.rst index 65f4805..50a03b8 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -146,6 +146,47 @@ Create the Database Objects ); + +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 </etc/logrotate.d/qgisserver < Date: Tue, 26 Mar 2024 18:19:16 +0000 Subject: [PATCH 12/12] Update docs/source/install.rst --- docs/source/install.rst | 72 ++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 48 deletions(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index 50a03b8..8688e75 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -1,45 +1,8 @@ Install ======= -QuartzMap is installed using the included installation scripts. -The script will attempt to provision an SSL certificate using Certbot. - -.. warning:: - Ensure that your hostname is properly set. If not set the hostname using 'hostnamectl set-hostname domain.com' - - -Basic Install ------------- - -Clone the repository - -.. code-block:: bash - - git clone https://git.acugis.com/AcuGIS/GeoSync.git - -Change to the quartz directory - -.. code-block:: bash - - cd quartz - -Execute the scripts in order:: - -.. code-block:: bash - - $ ./installer/postgres.sh - $ ./installer/app-install.sh - -Complete setup by navigating 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 +Installation on Ubuntu 22 -------------------------------- Follow below to customize your installation. @@ -60,18 +23,9 @@ If you do not already have it installed, install it now. 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 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 @@ -150,6 +104,10 @@ Create the Database Objects Install QGIS Server ----------------------------- +To advertise WMS, WFS, and WTMS, install QGIS server. + + + .. code-block:: bash RELEASE=$(lsb_release -cs) @@ -190,11 +148,17 @@ Install QGIS Server Configure ProFTPD ---------------------------- +Configure ProFTPD to jail users to FTP directories + .. code-block:: bash sed -i.save ' s/#DefaultRoot~/DefaultRoot ~/ s/# RequireValidShelloff/RequireValidShell off/' /etc/proftpd/proftpd.conf + +Restart ProFTPD for changes to take effect. + +.. code-block:: bash systemctl enable proftpd systemctl restart proftpd @@ -217,11 +181,15 @@ Configure Apache a2ensite 000-default default-ssl systemctl reload apache2 +Request certificate from Let's Encrypt: + certbot --apache --agree-tos --email hostmaster@${HNAME} --no-eff-email -d ${HNAME} Create Data and Cache Directories ----------------------------- +---------------------------- + +Set the DATA_DIR outside of public directories .. code-block:: bash @@ -244,6 +212,10 @@ Grant Apache permissions chown -R www-data:www-data /var/www/html rm -rf /var/www/html/installer +Restart Apache for changes to take effect + +.. code-block:: bash + systemctl restart apache2 @@ -273,6 +245,10 @@ Create Groups and Permissions Create incl/const.php file --------------------------------------- +Copy the incl/const.php.dist file + + + .. code-block:: php cat >admin/incl/const.php <