X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1852b22218ae7b997cb1980d7b33fd1c8879163b..a1c4ece152e1e992c18f0cb368528cd2ac843b07:/doc/_includes/_install_postgres_database.liquid diff --git a/doc/_includes/_install_postgres_database.liquid b/doc/_includes/_install_postgres_database.liquid index 04fbc3370a..5373680caf 100644 --- a/doc/_includes/_install_postgres_database.liquid +++ b/doc/_includes/_install_postgres_database.liquid @@ -1,15 +1,32 @@ -# Start a shell for the postgres user: -
~$ sudo -u postgres bash
-# Generate a new database password: -
$ ruby -e 'puts rand(2**128).to_s(36)'
+{% comment %}
+Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: CC-BY-SA-3.0
+{% endcomment %}
+
+
    +
  1. Start a shell for the postgres user: +
    ~$ sudo -u postgres bash
    +
  2. +
  3. Generate a new database password: +
    $ ruby -e 'puts rand(2**128).to_s(36)'
     yourgeneratedpassword
     
    Record this. You'll need it when you set up the Rails server later. -# Create a database user with the password you generated: +
  4. +
  5. Create a database user with the password you generated:
    $ createuser --encrypted -R -S --pwprompt {{service_role}}
    -Enter password for new role: yourgeneratedpassword
    -Enter it again: yourgeneratedpassword
    -
    -# Create a database owned by the new user: + Enter password for new role: yourgeneratedpassword + Enter it again: yourgeneratedpassword
+ +
  • Create a database owned by the new user:
    $ createdb {{service_database}} -T template0 -E UTF8 -O {{service_role}}
    -# Exit the postgres user shell: +
  • +{% if use_contrib %} +
  • Enable the pg_trgm extension +
    $ psql {{service_database}} -c "CREATE EXTENSION pg_trgm"
    +
  • +{% endif %} +
  • Exit the postgres user shell:
    $ exit
    +
  • +