fix incorrect indent of the installation section
License MIT
This commit is contained in:
parent
9d2d1da7c2
commit
3100023469
|
@ -6,38 +6,38 @@ Installation
|
|||
|
||||
1. Setup the repository::
|
||||
|
||||
$ wget -O - https://deb.entrouvert.org/entrouvert.gpg | apt-key add -
|
||||
$ echo deb http://deb.entrouvert.org/ buster main >> /etc/apt/sources.list
|
||||
$ apt update
|
||||
$ wget -O - https://deb.entrouvert.org/entrouvert.gpg | apt-key add -
|
||||
$ echo deb http://deb.entrouvert.org/ buster main >> /etc/apt/sources.list
|
||||
$ apt update
|
||||
|
||||
2. Create the database::
|
||||
|
||||
$ apt install apg
|
||||
$ PASSWORD=$(apg -n 1 -M NCL -m 20)
|
||||
$ apt install postgresql
|
||||
$ su - postgres -c psql <<EOF
|
||||
CREATE ROLE authentic2 WITH LOGIN SUPERUSER PASSWORD '$PASSWORD';
|
||||
ALTER ROLE authentic2 SET client_encoding TO 'utf8';
|
||||
CREATE DATABASE authentic2;
|
||||
GRANT ALL PRIVILEGES ON DATABASE authentic2 TO authentic2;
|
||||
EOF
|
||||
$ mkdir -p /etc/authentic2/settings.d
|
||||
$ cat > /etc/authentic2/settings.d/database.py <<EOF
|
||||
DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": "authentic2",
|
||||
"USER": "authentic2",
|
||||
"PASSWORD": "$PASSWORD",
|
||||
"HOST": "127.0.0.1",
|
||||
"PORT": "5432",
|
||||
}
|
||||
}
|
||||
EOF
|
||||
$ apt install apg
|
||||
$ PASSWORD=$(apg -n 1 -M NCL -m 20)
|
||||
$ apt install postgresql
|
||||
$ su - postgres -c psql
|
||||
CREATE ROLE authentic2 WITH LOGIN SUPERUSER PASSWORD '$PASSWORD';
|
||||
ALTER ROLE authentic2 SET client_encoding TO 'utf8';
|
||||
CREATE DATABASE authentic2;
|
||||
GRANT ALL PRIVILEGES ON DATABASE authentic2 TO authentic2;
|
||||
EOF
|
||||
$ mkdir -p /etc/authentic2/settings.d
|
||||
$ cat > /etc/authentic2/settings.d/database.py <<EOF
|
||||
DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": "authentic2",
|
||||
"USER": "authentic2",
|
||||
"PASSWORD": "$PASSWORD",
|
||||
"HOST": "127.0.0.1",
|
||||
"PORT": "5432",
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
3. Install::
|
||||
|
||||
$ apt install authentic2
|
||||
$ apt install authentic2
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
Reference in New Issue