Commit 3de424682fa1e55bc0d7282832b44840b34ef849
1 parent
5ea8a937
Exists in
dev
update README.md
Showing
1 changed file
with
22 additions
and
23 deletions
Show diff stats
README.md
... | ... | @@ -21,13 +21,13 @@ Each of these steps is explained below. |
21 | 21 | |
22 | 22 | ### Install python3 with sqlite3 support |
23 | 23 | |
24 | -Minimum supported version is python3.8. The installed versions depend on the | |
24 | +Minimum supported version is python3.9. The installed versions depend on the | |
25 | 25 | operating system default. |
26 | 26 | |
27 | 27 | ```sh |
28 | -sudo pkg install python3 py38-sqlite3 # FreeBSD | |
28 | +sudo pkg install python3 py39-sqlite3 # FreeBSD | |
29 | 29 | sudo apt install python3 # Linux (Ubuntu) |
30 | -sudo port install python310 # MacOS | |
30 | +sudo port install python311 # MacOS | |
31 | 31 | ``` |
32 | 32 | |
33 | 33 | ### Install pip |
... | ... | @@ -35,21 +35,20 @@ sudo port install python310 # MacOS |
35 | 35 | Install `pip` from the system package manager: |
36 | 36 | |
37 | 37 | ```sh |
38 | -sudo pkg install py38-pip # FreeBSD | |
38 | +sudo pkg install py39-pip # FreeBSD | |
39 | 39 | sudo apt install python3-pip # Linux (Ubuntu) |
40 | -sudo port install py310-pip # MacOS | |
40 | +sudo port install py311-pip # MacOS | |
41 | 41 | ``` |
42 | 42 | |
43 | -In the end you should be able to run `pip --version` and `python3 -c "import | |
44 | -sqlite3"` without errors. | |
45 | -In some systems, `pip` can be named `pip3`, `pip3.8` or `pip-3.8`, etc. | |
43 | +In the end you should be able to run `python3 -m pip --version` and `python3 -c | |
44 | +"import sqlite3"` without errors. | |
46 | 45 | |
47 | 46 | Packages should **not** be installed system-wide. Either install them to a |
48 | 47 | python virtual environment or in the user area. |
49 | 48 | |
50 | -To install in the user area use `pip install --user some_package` or edit the | |
51 | -configuration file `~/.config/pip/pip.conf` (FreeBSD, Linux) or | |
52 | -`Library/Application Support/pip/pip.conf` (MacOS) and add the lines | |
49 | +To install in the user area use `python3 -m pip install --user some_package` or | |
50 | +edit the configuration file `~/.config/pip/pip.conf` (FreeBSD, Linux) or | |
51 | +`~/Library/Application Support/pip/pip.conf` (MacOS) and add the lines | |
53 | 52 | |
54 | 53 | ```ini |
55 | 54 | [global] |
... | ... | @@ -59,13 +58,13 @@ user = yes |
59 | 58 | ### Install aprendizations |
60 | 59 | |
61 | 60 | ```sh |
62 | -pip install git+https://git.xdi.uevora.pt/mjsb/aprendizations.git | |
61 | +python3 -m pip install git+https://git.xdi.uevora.pt/mjsb/aprendizations.git | |
63 | 62 | ``` |
64 | 63 | |
65 | 64 | Python packages are usually installed in: |
66 | 65 | |
67 | -* `~/.local/lib/python3.8/site-packages/` in Linux/FreeBSD. | |
68 | -* `~/Library/python/3.10/lib/python/site-packages/` in MacOS. | |
66 | +* `~/.local/lib/python3.9/site-packages/` in Linux/FreeBSD. | |
67 | +* `~/Library/python/3.11/lib/python/site-packages/` in MacOS. | |
69 | 68 | |
70 | 69 | When aprendizations is installed with pip, all the dependencies are also |
71 | 70 | installed. |
... | ... | @@ -75,7 +74,7 @@ installed in |
75 | 74 | |
76 | 75 | ```sh |
77 | 76 | ~/.local/bin # Linux/FreeBSD |
78 | -~/Library/Python/3.10/bin # MacOS | |
77 | +~/Library/Python/3.11/bin # MacOS | |
79 | 78 | ``` |
80 | 79 | |
81 | 80 | and can be run from the terminal: |
... | ... | @@ -108,12 +107,12 @@ openssl req -x509 -newkey rsa:4096 -keyout privkey.pem -out cert.pem -days 365 - |
108 | 107 | Install the certbot from LetsEncrypt: |
109 | 108 | |
110 | 109 | ```sh |
111 | -sudo pkg install py38-certbot # FreeBSD | |
110 | +sudo pkg install py39-certbot # FreeBSD | |
112 | 111 | sudo apt install certbot # Ubuntu |
113 | 112 | ``` |
114 | 113 | |
115 | 114 | To generate or renew the certificates, ports 80 and 443 must be accessible. |
116 | -**Any firewall and webserver have to be stopped**. | |
115 | +**The firewall and webserver have to be stopped**. | |
117 | 116 | |
118 | 117 | ```sh |
119 | 118 | sudo certbot certonly --standalone -d www.example.com # first time |
... | ... | @@ -155,8 +154,8 @@ The default password is equal to the user name, if left undefined. |
155 | 154 | |
156 | 155 | ### Running the demo |
157 | 156 | |
158 | -The application includes a small example in `demo/courses.yaml` that can be used | |
159 | -for initial testing. Run it with | |
157 | +The application includes a small example in `demo/courses.yaml` that can be | |
158 | +used for initial testing. Run it with | |
160 | 159 | |
161 | 160 | ```sh |
162 | 161 | cd demo |
... | ... | @@ -208,12 +207,12 @@ Example configuration files are in the `freebsd` directory. |
208 | 207 | |
209 | 208 | Make sure the following steps have been done: |
210 | 209 | |
211 | -* installed python3 and pip | |
212 | -* installed aprendizations using pip | |
210 | +* install python3 and pip | |
211 | +* install aprendizations using pip | |
213 | 212 | * initialized database with at least 1 user |
214 | 213 | * generate and copy certificates to the appropriate place |
215 | -* (optional) configure the firewall to do port forwarding | |
216 | -* run `aprendizations courses.yaml --check` | |
214 | +* (optional) configure the firewall and port forwarding | |
215 | +* run `aprendizations courses.yaml` | |
217 | 216 | |
218 | 217 | ## Keeping aprendizations updated |
219 | 218 | ... | ... |