2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 08:41:51 +00:00

install updates

This commit is contained in:
Philip Sargent 2022-06-25 21:34:42 +03:00
parent 451326789b
commit 2f1ba9cb54
5 changed files with 20 additions and 7 deletions

View File

@ -49,10 +49,10 @@ Follow the instructions contained in the file to fill out your settings.
Python3, Django, and Database setup 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 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. 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 ] [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 PERMISSIONS
https://linuxize.com/post/usermod-command-in-linux/ 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 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. 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.

View File

@ -11,7 +11,9 @@ sudo apt dist-upgrade
sudo apt install sqlite3 sudo apt install sqlite3
sudo apt install python3-pip # this installs a shed-load of other stuff: binutils etc. 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, # On a clean debian 11 (bullseye) installation with Xfce & ssh,
# as debian does not install everything that ubuntu does, you need: # 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 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 apt install python3.10-dev
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 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 apt install libmariadb-dev
sudo python -m pip install --upgrade pip sudo python -m pip install --upgrade pip

View File

@ -5,7 +5,10 @@ Django==3.2
docutils==0.18 docutils==0.18
gunicorn==20.1.0 gunicorn==20.1.0
mariadb==1.0.11 mariadb==1.0.11
mysql-connector-python==8.0.29
mysqlclient==2.1.0
Pillow==9.1.0 Pillow==9.1.0
protobuf==4.21.2
pytz==2022.1 pytz==2022.1
reportlab==3.6.0 reportlab==3.6.0
sqlparse==0.4.0 sqlparse==0.4.0

View File

@ -5,7 +5,10 @@ Django==3.2
docutils==0.18 docutils==0.18
gunicorn==20.1.0 gunicorn==20.1.0
mariadb==1.0.11 mariadb==1.0.11
mysql-connector-python==8.0.29
mysqlclient==2.1.0
Pillow==9.1.0 Pillow==9.1.0
protobuf==4.21.2
pytz==2022.1 pytz==2022.1
reportlab==3.6.0 reportlab==3.6.0
sqlparse==0.4.0 sqlparse==0.4.0

View File

@ -58,11 +58,10 @@ source bin/activate
echo "### Activated." echo "### Activated."
# update local version of pip, more recent than OS version # update local version of pip, more recent than OS version
# debian bullseye installs pip 20.3.4 which barfs, we want >22.0.3 # debian bullseye installs pip 20.3.4 which barfs, we want >22.0.3
#echo "### installing later version of pip inside $VENAME" echo "### installing later version of pip inside $VENAME"
#python -m pip install --upgrade pip python -m pip install --upgrade pip
PIP=pip PIP=pip
sudo python -m pip install --upgrade pip
$PIP list > original-pip.list $PIP list > original-pip.list
$PIP freeze >original.txt $PIP freeze >original.txt
@ -119,7 +118,11 @@ python --version
echo "Django version:" echo "Django version:"
django-admin --version django-admin --version
echo "### Now do echo "### Now do
'sudo service mysql start'
'sudo service mariadb restart'
'sudo mysql_secure_installation'
'cd ../$VENAME' 'cd ../$VENAME'
'source bin/activate' 'source bin/activate'
'cd troggle' 'cd troggle'
'python manage.py check'
'python manage.py test -v 3' " 'python manage.py test -v 3' "