X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/03ab4eb9958846104db35b6da50749ff9212655a..41fd5332b48e4256fed1a9d22141ca6ad9b482b4:/doc/_includes/_install_postgres_database.liquid diff --git a/doc/_includes/_install_postgres_database.liquid b/doc/_includes/_install_postgres_database.liquid index 681ebb3ac4..e93457f188 100644 --- a/doc/_includes/_install_postgres_database.liquid +++ b/doc/_includes/_install_postgres_database.liquid @@ -6,27 +6,27 @@ SPDX-License-Identifier: CC-BY-SA-3.0
  1. Start a shell for the postgres user: -
    ~$ sudo -u postgres bash
    +
    # su postgres
  2. Generate a new database password: -
    $ tr -dc 0-9a-zA-Z </dev/urandom | head -c25; echo
    +
    postgres$ tr -dc 0-9a-zA-Z </dev/urandom | head -c25; echo
     yourgeneratedpassword
     
    Record this. You'll need it when you set up the Rails server later.
  3. Create a database user with the password you generated: -
    $ createuser --encrypted -R -S --pwprompt {{service_role}}
    +  
    postgres$ createuser --encrypted --no-createrole --no-superuser --pwprompt {{service_role}}
       Enter password for new role: yourgeneratedpassword
       Enter it again: yourgeneratedpassword
  4. Create a database owned by the new user: -
    $ createdb {{service_database}} -T template0 -E UTF8 -O {{service_role}}
    +
    postgres$ createdb {{service_database}} -T template0 -E UTF8 -O {{service_role}}
  5. {% if use_contrib %}
  6. Enable the pg_trgm extension -
    $ psql {{service_database}} -c "CREATE EXTENSION IF NOT EXISTS pg_trgm"
    +
    postgres$ psql {{service_database}} -c "CREATE EXTENSION IF NOT EXISTS pg_trgm"
  7. {% endif %}
  8. Exit the postgres user shell: -
    $ exit
    +
    postgres$ exit