From 2f1ba9cb54514368c1585af1fb540730e286b643 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Sat, 25 Jun 2022 21:34:42 +0300 Subject: [PATCH] install updates --- README.txt | 6 ++++-- os-trog.sh | 6 ++++-- requirements-p10d3.txt | 3 +++ requirements.txt | 3 +++ venv-trog.sh | 9 ++++++--- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index dff42e3..f3ef518 100644 --- a/README.txt +++ b/README.txt @@ -49,10 +49,10 @@ Follow the instructions contained in the file to fill out your settings. Python3, Django, and Database setup ----------------------------------- -We are now using Django 2.2.19 and will move to 3.2 shortly +We are now using Django 3.2 and will move to 4.2 in 2024 We are installing with python3.9 -Install Django using pip, not with apt, on your test system. +Install Django using pip, not with apt, on your test system in a venv. Conventionally on our main master expo server we install everything that we can as debian packages, not using pip. [installation instructions removed - now in http://expo.survex.com/handbook/troggle/troglaptop.html ] @@ -151,6 +151,8 @@ these permissions are set in a different 'info' database which usually is untouc PERMISSIONS https://linuxize.com/post/usermod-command-in-linux/ +THIS MAY BE OUT OF DATE - in 2022 we are running Apache as user 'expo' + sudo usermod -a expo www-data adds expo to the www-data group which is what the webserver uses, and thus so the user troggle is acting as when running live. diff --git a/os-trog.sh b/os-trog.sh index d145422..02749a4 100644 --- a/os-trog.sh +++ b/os-trog.sh @@ -11,7 +11,9 @@ sudo apt dist-upgrade sudo apt install sqlite3 sudo apt install python3-pip # this installs a shed-load of other stuff: binutils etc. - +sudo apt install survex-aven +sudo apt install openssh-client tunnelx therion +sudo apt install git sftp # On a clean debian 11 (bullseye) installation with Xfce & ssh, # as debian does not install everything that ubuntu does, you need: sudo usermod -a -G sudo expo # to put expo in sudoers group, re-login required @@ -20,7 +22,7 @@ sudo apt install python3.10-venv sudo apt install python3.10-dev sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 -sudo apt -y install mariadb-server +sudo apt install mariadb-server sudo apt install libmariadb-dev sudo python -m pip install --upgrade pip diff --git a/requirements-p10d3.txt b/requirements-p10d3.txt index f361372..b05fda2 100644 --- a/requirements-p10d3.txt +++ b/requirements-p10d3.txt @@ -5,7 +5,10 @@ Django==3.2 docutils==0.18 gunicorn==20.1.0 mariadb==1.0.11 +mysql-connector-python==8.0.29 +mysqlclient==2.1.0 Pillow==9.1.0 +protobuf==4.21.2 pytz==2022.1 reportlab==3.6.0 sqlparse==0.4.0 diff --git a/requirements.txt b/requirements.txt index f361372..b05fda2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,10 @@ Django==3.2 docutils==0.18 gunicorn==20.1.0 mariadb==1.0.11 +mysql-connector-python==8.0.29 +mysqlclient==2.1.0 Pillow==9.1.0 +protobuf==4.21.2 pytz==2022.1 reportlab==3.6.0 sqlparse==0.4.0 diff --git a/venv-trog.sh b/venv-trog.sh index 4fff9c3..722f65b 100644 --- a/venv-trog.sh +++ b/venv-trog.sh @@ -58,11 +58,10 @@ source bin/activate echo "### Activated." # update local version of pip, more recent than OS version # debian bullseye installs pip 20.3.4 which barfs, we want >22.0.3 -#echo "### installing later version of pip inside $VENAME" -#python -m pip install --upgrade pip +echo "### installing later version of pip inside $VENAME" +python -m pip install --upgrade pip PIP=pip -sudo python -m pip install --upgrade pip $PIP list > original-pip.list $PIP freeze >original.txt @@ -119,7 +118,11 @@ python --version echo "Django version:" django-admin --version echo "### Now do + 'sudo service mysql start' + 'sudo service mariadb restart' + 'sudo mysql_secure_installation' 'cd ../$VENAME' 'source bin/activate' 'cd troggle' + 'python manage.py check' 'python manage.py test -v 3' " \ No newline at end of file