troggle-unchained/os-trog.sh

71 lines
2.4 KiB
Bash
Raw Normal View History

2022-06-25 17:28:01 +01:00
#!/bin/bash
# Run this in a terminal in the troggle directory: 'bash os-trog.sh'
2022-10-27 12:30:59 +01:00
# On WSL, do Shift-click in the file explorer on the troggle folder to open a Linux command line
# 'Open Linux shell here'
2022-06-25 17:28:01 +01:00
echo 'Run this in a terminal in the troggle directory: "bash venv-trog.sh"'
2022-10-27 12:30:59 +01:00
cat /etc/os-release
2022-06-25 17:28:01 +01:00
# Expects an Ubuntu 22.04 relatively clean install.
2023-05-02 21:26:53 +01:00
sudo apt install python-is-python3 -y
2022-06-25 17:28:01 +01:00
python --version : ensure python is an alias for python3 not python2.7
2022-10-27 12:30:59 +01:00
sudo apt update -y
sudo apt dist-upgrade -y
sudo apt autoremove -y
sudo apt install sqlite3 -y
sudo apt install python3-pip -y
2023-05-02 21:26:53 +01:00
sudo apt install python3.10-venv -y
sudo apt install python3.11-venv python3.11-dev -y
2022-06-25 17:28:01 +01:00
# this installs a shed-load of other stuff: binutils etc.sudo apt install survex-aven
2023-05-02 21:26:53 +01:00
sudo apt install openssh-server -y
# sudo apt install sftp -y
2022-11-23 21:59:42 +00:00
sudo apt install git openssh-client -y
2022-06-25 17:28:01 +01:00
# On a clean debian 11 (bullseye) installation with Xfce & ssh,
2022-10-27 12:30:59 +01:00
2023-05-02 21:26:53 +01:00
#on ubuntu 20.04 and 22.04
2022-10-27 12:30:59 +01:00
#Package sftp is not available, but is referred to by another package.
2023-05-02 21:26:53 +01:00
# this is why we install openssh-server because it includes it.
2022-10-27 12:30:59 +01:00
# On Ubuntu 20.04, with python10, the pip install fails.
2022-11-23 21:59:42 +00:00
# So you need to get the pip from source
2022-10-27 12:30:59 +01:00
# sudo curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
# but really you should be using 22.04
# and also, isf using debian,
# sudo python3.10 -m pip install -U virtualenv
2022-06-25 17:28:01 +01:00
# as debian does not install everything that ubuntu does, you need:
2023-05-01 20:01:47 +01:00
# sudo useradd expo
# sudo usermod -a -G sudo expo # to put expo in sudoers group, re-login required
2022-10-27 12:30:59 +01:00
# default since 22.04
2022-11-23 21:59:42 +00:00
# sudo apt install python3.10
2023-05-01 20:01:47 +01:00
# sudo apt install python3.10-venv -y
# sudo apt install python3.10-dev -y
# sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1
2022-06-25 17:28:01 +01:00
2023-05-01 20:01:47 +01:00
# sudo apt install mariadb-server -y
# sudo apt install libmariadb-dev -y
2022-06-25 17:28:01 +01:00
sudo python -m pip install --upgrade pip
2023-05-01 20:01:47 +01:00
2022-10-27 12:30:59 +01:00
2022-06-25 17:28:01 +01:00
# Go to https://expo.survex.com/handbook/troggle/troglaptop.html#dbtools
# sudo service mysql start
2022-11-23 21:59:42 +00:00
2023-05-01 20:01:47 +01:00
echo '### git config --global user.email "you@example.com"
echo '### git config --global user.name "Your Name"
2022-11-23 21:59:42 +00:00
echo '###'
echo '### Currently set version of python'
python --version
echo '###'
echo '### Now YOU have to configure the git settings for YOURSELF (not "expo")'
2023-05-01 20:01:47 +01:00
echo '###'
echo '### NOW INSTALLING tunnel and therion, go and have a cup of tea. Or a 3-course meal.'
echo '###'
sudo apt install tunnelx therion -y