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 -------------------------------- Follow below to customize your installation. Install PostgreSQL with PostGIS ------------------------------------------ QuartzMap requires PostgreSQL with PostGIS. If you do not already have it installed, install it now. .. code-block:: bash apt -y install postgresql postgresql-contrib postgis 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 -------------------------------- .. code-block:: sql CREATE USER quartz with password 'SuperSecret'; CREATE DATABASE quartz with OWNER quartz; Create the Database Objects -------------------------------- .. code-block:: sql 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.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.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.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) ); 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 </etc/sudoers.d/q2w <admin/incl/const.php < CAT_EOF