WSL updates for Ubuntu 22.04 - online edit of handbook/troggle/troglaptop.html

This commit is contained in:
Expo on server 2022-10-26 20:30:48 +01:00
parent 160009d5ba
commit cc144da380

View File

@ -31,14 +31,31 @@ http://expo.survex.com/repositories/troggle/.git/tree/README.txt
<h2 id="os">Installing linux</h2>
<p>If you don't already know how to do this, then you should probably not be attempting to work on the troggle code. But in case you are an experienced linux user who has always had someone else set up the system for them, then Ubuntu is the easiest and more forgiving to install, either directly on the computer or inside WSL. Because we are using fairly old, stable releases of Django, you will want Ubuntu-20.04
<p>If you don't already know how to do this, then you should probably not be attempting to work on the troggle code. But in case you are an experienced linux user who has always had someone else set up the system for them, then Ubuntu is the easiest and more forgiving to install, either directly on the computer or inside WSL. Ubuntu installs python and various essential python dev tools by default.
<p>The server is running fairly old, stable releases of Debian and Django, but you will probably want Ubuntu-22.04 which is compatible.
<ul>
<li>Install in <a href="https://docs.microsoft.com/en-us/windows/wsl/install">WSL on Windows 10</a>.
<li>Install <a href="https://ubuntu.com/download/desktop">Ubuntu 20.04 LTS</a>.
<li>Linux machine
<ul>
<li>Install <a href="https://ubuntu.com/download/desktop">Ubuntu 22.04 LTS</a>
</ul>
<p>and familiarise yourself with the directory structure on the expo server, which we will be duplicating (partly) as docmented in <a href="serverconfig.html">The Expo Server</a>. We are not here doing a full install of all the software and scripts on the server, just the minimum to run, test and debug troggle on Django.
<li>Windows 10 or 11 machine
<ul>
<li>Install in <a href="https://docs.microsoft.com/en-us/windows/wsl/install">WSL on Windows 10/11</a>
<li>Install <a href="https://docs.microsoft.com/en-us/windows/wsl/install">Ubuntu 20.04 LTS</a> - can be done directly from wsl command line <var>wsl --install -d Ubuntu</var>.
<li>Install <a href="https://linuxconfig.org/ubuntu-22-04-on-wsl-windows-subsystem-for-linux">Ubuntu 22.04 LTS</a> - must be done using MS App Store.
</ul>
</ul>
<p>There are two scripts in the <var>troggle</var> folder which will do semi-automatically what is described below. Have a look at
<ul>
<li><var>os-trog.sh</var>
<li><var>venv-trog.sh</var>
</ul>
<h3>Files and directories</h3>
<p>Do familiarise yourself with the directory structure on the expo server, which we will be duplicating (partly) as docmented in <a href="serverconfig.html">The Expo Server</a>. We are not here doing a full install of all the software and scripts on the server, just the minimum to run, test and debug troggle on Django.
<h3>WSL on Windows</h3>
<p>If you are using an old laptop, you may have to run Ubuntu in WSL1 rather than WSL2. WSL2 requires virtualisation features that your hardware may not support if it is more than about 5 years old.
<p>The standard documentation for Ubuntu or debian below all works, but you should first skim the
<a href="../computing/winlaptop.html">Windows expo laptop</a> configuration too. So far as expo software is concerned, WSL1 and WSL2 behave identically.
@ -61,10 +78,10 @@ git config --global user.name "Your Name"
<h2 id="python">Installing python</h2>
<a href="https://xkcd.com/1987/"><img src="https://imgs.xkcd.com/comics/python_environment.png" align="right" hspace="20" width="230" alt='XKCD python install'></a>
<p>Python is not installed by default usually, and in any case we need specific versions to be installed. For Ubuntu 20.04 the
default is python3.9
<p>Python is not installed by default on Debian, and in any case we need specific versions to be installed. For Ubuntu 20.04 the
default installation is python3.9 whereas Ubuntu 22.04 gives you python3.10.
<p>If you are planning on eventually helping the migration of troggle from debian Bullseye (v11) to
<a href="https://www.debian.org/releases/">Bookworm (v12)</a> to then you will also want the appropriate later versions of python e.g. 3.10 below:
<a href="https://www.debian.org/releases/">Bookworm (v12)</a> to then you will also want the appropriate later versions of python e.g. 3.10 on Ubuntu 20.04 like this:
<pre><code>sudo apt install python3 python3-pip
sudo apt install sqlite3 sqlite3-doc
@ -183,6 +200,7 @@ of python code (excluding comments and blank lines) and nearly 3,000 lines of HT
over 400 folders, but only 49MB in size (plus a .git repo of 32MB).
<h4>key exchange</h4>
<p>You need this so that you can upload your edited code to the git repo on the server.
<p>Follow this link to <a href="../computing/keyexchange.html">register a key with the expo server</a> to get git access if you have
not already cloned the <var>:troggle:</var> repo.