Update docs/source/install.rst

This commit is contained in:
AcuGIS 2024-03-25 11:34:10 +00:00
parent e995373486
commit f2186aa835
1 changed files with 71 additions and 2 deletions

View File

@ -73,6 +73,7 @@ For Commerical Edition:
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
--------------------------------
@ -83,7 +84,7 @@ Create the PostGIS Database
CREATE DATABASE quartz with OWNER quartz;
Create the Database Object
Create the Database Objects
--------------------------------
.. code-block:: sql
@ -144,9 +145,77 @@ Create the Database Object
UNIQUE(email)
);
Install This and That
Configure ProFTPD
----------------------------
.. code-block:: bash
sed -i.save '
s/#DefaultRoot~/DefaultRoot ~/
s/# RequireValidShelloff/RequireValidShell off/' /etc/proftpd/proftpd.conf
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
for f in 000-default default-ssl; do
sed -i.save "s/#ServerName example.com/#ServerName ${HNAME}/" /etc/apache2/sites-available/${f}.conf
done
a2ensite 000-default default-ssl
systemctl reload apache2
certbot --apache --agree-tos --email hostmaster@${HNAME} --no-eff-email -d ${HNAME}
Create Data and Cache Directories
----------------------------
.. code-block:: bash
mkdir -p "${APPS_DIR}"
mkdir -p "${CACHE_DIR}"
mkdir -p "${DATA_DIR}"
chown -R www-data:www-data "${APPS_DIR}"
chown -R www-data:www-data "${CACHE_DIR}"
chown -R www-data:www-data "${DATA_DIR}"
cp -r . /var/www/html/
chown -R www-data:www-data /var/www/html
rm -rf /var/www/html/installer
systemctl restart apache2
# create group for all FTP users
groupadd qatusers
create_ftp_user
# install ftp user creation script
for f in update; do
cp installer/${f}_ftp_user.sh /usr/local/bin/
chown www-data:www-data /usr/local/bin/${f}_ftp_user.sh
chmod 0550 /usr/local/bin/${f}_ftp_user.sh
done
cat >/etc/sudoers.d/q2w <<CAT_EOF
www-data ALL = NOPASSWD: /usr/local/bin/update_ftp_user.sh
CAT_EOF
echo -e "postgres and other passwords are saved in /root/auth.txt file"
Install More Stuff
---------------------------------------
APP_DB='q2w'
APP_DB_PASS=$(< /dev/urandom tr -dc _A-Za-z0-9 | head -c32);
DATA_DIR='/var/www/data'