Setting up Geodjango on Arch Linux

Setting up postgres with PostGIS for geodjango on Arch.

Installing Postgres

sudo pacman -S postgresql

Setting up data directory within my /home partition:

mkdir -p /home/myuser/postgresdb_data/data
sudo chown -R postgres:postgres /home/myuser/postgresdb_data

Initializing data:

sudo -iu postgres
initdb -D /home/myuser/postgresdb_data/data

Edit the systemd service file:

sudo systemctl edit postgresql

Add the following:

[Service]
Environment=PGROOT=/home/myuser/postgresdb_data
PIDFile=/home/myuser/postgresdb_data/data/postmaster.pid
ProtectHome=false

Edit /home/myuser/postgresdb_data/data/postgresql.conf to listen exclusively through UNIX sockets and we'll also set password encryption to scram-sha-256:

...
listen_addresses = ''
...
password_encryption = scram-sha-256
...

Edit /home/myuser/postgresdb_data/data/pg_hba.conf to …

Fixing RabbitMQ Sources Repository

Updating a repo that is no longer signed.

The Error

Err:10 https://dl.bintray.com/rabbitmq-erlang/debian bionic InRelease                                                                                                                                 
  403  Forbidden [IP: 34.217.158.44 443]                                                                   
E: Failed to fetch https://dl.bintray.com/rabbitmq-erlang/debian/dists/bionic/InRelease  403  Forbidden [IP: 34.217.158.44 443]
E: The repository 'https://dl.bintray.com/rabbitmq-erlang/debian bionic InRelease' is no longer signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

The Fix

Seems to be related to the shutdown of Bintray sometime around April. So the first …