Merge pull request #1322 from jvmatl/ubuntu_from_scratch_feedback

Ran through the 'Ubuntu from Scratch' procedure using a fresh Ubuntu 22.04.3 LTS VM and took notes on what worked and what didn't.
This commit is contained in:
Yohan Boniface 2023-09-20 08:02:47 +02:00 committed by GitHub
commit 5587632168
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,8 @@ You need sudo grants on this server, and it must be connected to Internet.
## Install system dependencies ## Install system dependencies
sudo apt install python3 python3-dev python3-venv wget nginx uwsgi uwsgi-plugin-python3 postgresql gcc postgis libpq-dev sudo apt update
sudo apt install python3 python3-dev python3-venv virtualenv wget nginx uwsgi uwsgi-plugin-python3 postgresql gcc postgis libpq-dev
*Note: nginx and uwsgi are not required for local development environment* *Note: nginx and uwsgi are not required for local development environment*
@ -33,17 +34,17 @@ on the various commands and configuration files if you go with your own.*
## Create a postgresql user ## Create a postgresql user
sudo -u postgres createuser umap sudo -u postgres -D ~postgres createuser umap
## Create a postgresql database ## Create a postgresql database
sudo -u postgres createdb umap -O umap sudo -u postgres -D ~postgres createdb umap -O umap
## Activate PostGIS extension ## Activate PostGIS extension
sudo -u postgres psql umap -c "CREATE EXTENSION postgis" sudo -u postgres -D ~postgres psql umap -c "CREATE EXTENSION postgis"
## Login as umap Unix user ## Login as umap Unix user
@ -55,8 +56,8 @@ From now on, unless we say differently, the commands are run as `umap` user.
## Create a virtualenv and activate it ## Create a virtualenv and activate it
virtualenv /srv/umap/venv --python=/usr/bin/python3.6 virtualenv /srv/umap/venv --python=/usr/bin/python3.10
source /srv/umap/venv/bin/activate . /srv/umap/venv/bin/activate
*Note: this activation is not persistent, so if you open a new terminal window, *Note: this activation is not persistent, so if you open a new terminal window,
you will need to run again this last line.* you will need to run again this last line.*
@ -75,12 +76,8 @@ you will need to run again this last line.*
nano /etc/umap/umap.conf nano /etc/umap/umap.conf
Change the following properties: * update the [SECRET_KEY](settings.md#secret_key)
* update the ADMINS list
```
STATIC_ROOT = '/srv/umap/var/static'
MEDIA_ROOT = '/srv/umap/var/data'
```
## Create the tables ## Create the tables