Update docs/source/install.rst

This commit is contained in:
AcuGIS 2024-03-27 22:05:56 +00:00
parent 83a54bbe10
commit 5fa9f0b479
1 changed files with 50 additions and 21 deletions

View File

@ -2,6 +2,12 @@ Install
======= =======
Requirements
-----------------------
QuartzMap requires only a LAPP stack.
Installation on Ubuntu 22 Installation on Ubuntu 22
-------------------------------- --------------------------------
@ -170,18 +176,29 @@ Configure Apache
a2enmod ssl headers expires fcgid cgi a2enmod ssl headers expires fcgid cgi
Copy the apache2.conf file to sites-available/default-ssl.conf (or use own config)
.. code-block:: bash
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 Below is required for Certbot to provision SSL
.. code-block:: bash
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
Enable confs and reload Apache
.. code-block:: bash
a2ensite 000-default default-ssl a2ensite 000-default default-ssl
systemctl reload apache2 systemctl reload apache2
Request certificate from Let's Encrypt: Request certificate from Let's Encrypt
.. code-block:: bash
certbot --apache --agree-tos --email hostmaster@${HNAME} --no-eff-email -d ${HNAME} certbot --apache --agree-tos --email hostmaster@${HNAME} --no-eff-email -d ${HNAME}
@ -189,13 +206,20 @@ Request certificate from Let's Encrypt:
Create Data and Cache Directories Create Data and Cache Directories
---------------------------- ----------------------------
Set the DATA_DIR outside of public directories Set the DATA_DIR and CACHE_DIR should be outside of public directories
For example /var/www
.. code-block:: bash .. code-block:: bash
mkdir -p "${APPS_DIR}" mkdir -p /var/www/cache
mkdir -p "${CACHE_DIR}" mkdir -p /var/www/data
mkdir -p "${DATA_DIR}"
Create the apps directory
.. code-block:: bash
mkdir -p /var/www/html/apps
Grant Apache permissions Grant Apache permissions
@ -247,25 +271,30 @@ Create incl/const.php file
Copy the incl/const.php.dist file Copy the incl/const.php.dist file
.. code-block:: php
cp const.php.dist const.php
Populate using values from above.
.. code-block:: php .. code-block:: php
cat >admin/incl/const.php <<CAT_EOF <?php
<?php define("DB_HOST", "localhost");
define("DB_HOST", "localhost"); define("DB_NAME", "quartz");
define("DB_NAME", "${APP_DB}"); define("DB_USER", "quartz");
define("DB_USER", "${APP_DB}"); define("DB_PASS", "SuperSecretPassword");
define("DB_PASS", "${APP_DB_PASS}"); define("DB_PORT", 5432);
define("DB_PORT", 5432); define("DB_SCMA", 'public');
define("DB_SCMA", 'public'); define("APPS_DIR", "/var/www/html/apps");
define("APPS_DIR", "${APPS_DIR}"); define("CACHE_DIR", "/var/www/cache");
define("CACHE_DIR", "${CACHE_DIR}"); define("DATA_DIR", "/var/www/data");
define("DATA_DIR", "${DATA_DIR}"); define("SUPER_ADMIN_ID", 1);
define("SUPER_ADMIN_ID", 1); define("SESS_USR_KEY", 'q2w_user');
define("SESS_USR_KEY", 'q2w_user'); const ACCESS_LEVELS = array('User', 'Admin');
?> ?>
CAT_EOF