diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2021-05-03 22:47:57 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2021-05-03 22:47:57 +0100 |
commit | 8ad791c594c478eb08b346f2efefc9adb7e72246 (patch) | |
tree | 9aa4d3d717b8776adb78e106ad77ca474a162e14 /debian | |
parent | e6adced39d08e2719fb000f5ce5fa89f395547fc (diff) | |
download | troggle-8ad791c594c478eb08b346f2efefc9adb7e72246.tar.gz troggle-8ad791c594c478eb08b346f2efefc9adb7e72246.tar.bz2 troggle-8ad791c594c478eb08b346f2efefc9adb7e72246.zip |
rearranged config files
Diffstat (limited to 'debian')
-rw-r--r-- | debian/serversetup | 90 | ||||
-rw-r--r-- | debian/sitecustomize.py | 7 | ||||
-rw-r--r-- | debian/wookey-exposerver-recipe.txt | 95 |
3 files changed, 0 insertions, 192 deletions
diff --git a/debian/serversetup b/debian/serversetup deleted file mode 100644 index 644baea..0000000 --- a/debian/serversetup +++ /dev/null @@ -1,90 +0,0 @@ -Instructions for setting up new expo debian server/VM -For Debian Stretch, June 2019. - -[Note added March 2021: -See also http://expo.survex.com/handbook/troggle/serverconfig.html -and troggle/README.txt -] - -adduser expo -apt install openssh-server mosh tmux mc zile emacs-nox mc most ncdu -apt install python-django apache2 mysql-server survex make rsync -apt install libjs-openlayers make -apt install git mercurial mercurial-server? - -for boe: -apt install libcgi-session-perl libcrypt-passwdmd5-perl libfile-slurp-perl libgit-wrapper-perl libhtml-template-perl libhtml-template-pro-perl libmime-lite-perl libtext-password-pronounceable-perl libtime-parsedate-perl libuuid-tiny-perl libcrypt-cracklib-perl - -obsolete-packages: - bins (move to jigl?) (for photos) - python-django 1.7 -backports: survex therion -not-packaged: caveview - -make these dirs available at top documentroot: -cuccfiles -expofiles -loser (link to repo) -tunneldata (link to repo) -troggle (link to repo) -expoweb (link to repo) -boc/boe - - -config -containing: - -setup apache configs for cucc and expo -#disable default website -a2dissite 000-default -a2ensite cucc -a2ensite expo -a2enmod cgid - - -Boe config: -Alias /boe /home/expo/boe/boc/boc.pl -<Directory /home/expo/boe/boc> - AddHandler cgi-script .pl - SetHandler cgi-script - Options +ExecCGI - Require all granted -</Directory> -And remember to set both program and data dir to be -www-data:www-data -(optionally make file group read/write by treasurer account) -create empty repo by clicking create in boe interface -then set names in 'settings' - -Set up mysql (as root) -mysql -p -CREATE DATABASE troggle; -GRANT ALL PRIVILEGES ON troggle.* TO 'expo'@'localhost' IDENTIFIED BY 'somepassword'; - -install django: -sudo apt install python-django python-django-registration python-django-imagekit python-django-tinymce fonts-freefont-ttf libapache2-mod-wsgi - -python-django-imagekit comes from https://salsa.debian.org/python-team/modules/python-django-imagekit -python-django-tinymce comes from https://salsa.debian.org/python-team/modules/python-django-tinymce -(both modified for stretch/python2). packages under /home/wookey/packages/ - -need fonts-freefont-ttf (to have truetype freesans available for troggle via PIL) -need libapache2-mod-wsgi for apache wsgi support. - -On stretch the django 1.10 is no use so get rid of that: -apt remove python3-django python-django python-django-common python-django-doc - -Then replace with django 1.7 (Needs to be built for stretch) -apt install python-django python-django-common python-django-doc -apt install python-django-registration python-django-imagekit python-django-tinymce - -then hold them to stop them being upgraded by unattended upgrades: -echo "python-django hold" | sudo dpkg --set-selections -echo "python-django-common hold" | sudo dpkg --set-selections -echo "python-django-doc hold" | sudo dpkg --set-selections - -#troggle has to have a writable logfile otherwise the website explodes -# 500 error on the server, and apache error log has non-rentrant errors -create /var/log/troggle/troggle.log -chown www-data:adm /var/log/troggle/troggle.log -chmod 660 /var/log/troggle/troggle.log diff --git a/debian/sitecustomize.py b/debian/sitecustomize.py deleted file mode 100644 index 89c6712..0000000 --- a/debian/sitecustomize.py +++ /dev/null @@ -1,7 +0,0 @@ -# install the apport exception handler if available -try: - import apport_python_hook -except ImportError: - pass -else: - apport_python_hook.install() diff --git a/debian/wookey-exposerver-recipe.txt b/debian/wookey-exposerver-recipe.txt deleted file mode 100644 index ab2fa60..0000000 --- a/debian/wookey-exposerver-recipe.txt +++ /dev/null @@ -1,95 +0,0 @@ -adduser expo -apt install openssh-server mosh tmux mc zile emacs-nox mc most ncdu -apt install python-django apache2 mysql-server survex make rsync -apt install libjs-openlayers make -apt install git mercurial mercurial-server? - -for boe: -apt install libcgi-session-perl libcrypt-passwdmd5-perl libfile-slurp-perl libgit-wrapper-perl libhtml-template-perl libhtml-template-pro-perl libmime-lite-perl libtext-password-pronounceable-perl libtime-parsedate-perl libuuid-tiny-perl libcrypt-cracklib-perl - -apt install ufraw for PEF image decoding. -sudo apt install python-django python-django-registration e fonts-freefont-ttf libapache2-mod-wsgi python3-gdbm -# sudo apt install python-django-imagekit python-django-tinymc - -obsolete-packages: bins (move to jigl?) - older python-django? -backports: survex therion -not-packaged: caveview - - -make these dirs available at top documentroot: -cuccfiles -expofiles -loser -tunneldata -troggle -expoweb -boc/boe - -config -containing: - -setup apache configs for cucc and expo -#disable default website -a2dissite 000-default -a2ensite cucc -a2ensite expo -a2enmod cgid - - -Boe config: -Alias /boe /home/expo/boe/boc/boc.pl -<Directory /home/expo/boe/boc> - AddHandler cgi-script .pl - SetHandler cgi-script - Options +ExecCGI - Require all granted -</Directory> -And remember to set both program and data dir to be -www-data:www-data -(optionally make file group read/write by treasurer account) -create empty repo by clicking create in boe interface -then set names in 'settings' - -Set up mysql (as root) -mysql -p -CREATE DATABASE troggle; -GRANT ALL PRIVILEGES ON troggle.* TO 'expo'@'localhost' IDENTIFIED BY 'somepassword'; - -install django: -sudo apt install python-django python-django-registration python-django-imagekit python-django-tinymce fonts-freefont-ttf libapache2-mod-wsgi - -python-django-imagekit comes from https://salsa.debian.org/python-team/modules/python-django-imagekit -python-django-tinymce comes from https://salsa.debian.org/python-team/modules/python-django-tinymce - -need fonts-freefont-ttf (to have truetype freesans available for troggle via PIL) -need libapache2-mod-wsgi for apache wsgi support. - -On stretch the django 1.10 is no use so get rid of that: -apt remove python3-django python-django python-django-common python-django-doc - -Then replace with django 1.7 (Needs to be built for stretch) -apt install python-django python-django-common python-django-doc -apt install python-django-registration python-django-imagekit python-django-tinymce - -then hold them to stop them being upgraded by unattended upgrades: -echo "python-django hold" | sudo dpkg --set-selections -echo "python-django-common hold" | sudo dpkg --set-selections -echo "python-django-doc hold" | sudo dpkg --set-selections - -Optimizing server -I've tweaked the apache and mysql settings to make them a bit more suitable for a small machine. Seems to have shaved 200MB or so off the idling footprint. -https://www.narga.net/optimizing-apachephpmysql-low-memory-server/ - -(just discovered 'ab' for running apache performance tests - handy). - -Do the edit to site-packages/django/db/backends/base.py -to comment out the requirement for mysqlclient >1.3.13 -as we run perfectly happily with Django 2.2.19 & mysqlite 1.3.10 -: - -version = Database.version_info -#test nobbled by Wookey 2021-04-08 as 1.3.13 is not available on stable -#if version < (1, 3, 13): -# raise ImproperlyConfigured('mysqlclient 1.3.13 or newer is required; you have %s.' % Database.__version__) - |