X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6617a2ba4323d2f47566c89961763625fce2e1ca..2f66d4cc05e9442a9bb69969744d0750a02a1ed4:/doc/install/install-postgresql.html.textile.liquid diff --git a/doc/install/install-postgresql.html.textile.liquid b/doc/install/install-postgresql.html.textile.liquid index f611df8a07..b25194a9ee 100644 --- a/doc/install/install-postgresql.html.textile.liquid +++ b/doc/install/install-postgresql.html.textile.liquid @@ -1,62 +1,40 @@ --- layout: default navsection: installguide -title: Set up PostgreSQL databases +title: Install PostgreSQL 9.4+ ... +{% comment %} +Copyright (C) The Arvados Authors. All rights reserved. -Two Arvados Rails servers store data in a PostgreSQL database: the SSO server, and the API server. The API server requires at least version 9.1 of PostgreSQL. Beyond that, you have the flexibility to deploy PostgreSQL any way that the Rails servers will be able to connect to it. Our recommended deployment strategy is: +SPDX-License-Identifier: CC-BY-SA-3.0 +{% endcomment %} -* Install PostgreSQL on the the same host as the SSO server, and dedicate that install to hosting the SSO database. This provides the best security for the SSO server, because the database does not have to accept any client connections over the network. Typical load on the SSO server is light enough that deploying both it and its database on the same host does not compromise performance. -* If you want to provide the most scalability for your Arvados cluster, install PostgreSQL for the API server on a dedicated host. This gives you the most flexibility to avoid resource contention, and tune performance separately for the API server and its database. If performance is less of a concern for your installation, you can install PostgreSQL on the API server host directly, as with the SSO server. +Arvados requires at least version *9.4* of PostgreSQL. -Find the section for your distribution below, and follow it to install PostgreSQL on each host where you will deploy it. Then follow the steps in the later section(s) to set up PostgreSQL for the Arvados service(s) that need it. +* "CentOS 7":#centos7 +* "Debian or Ubuntu":#debian -h2(#centos6). Install PostgreSQL on CentOS 6 +h3(#centos7). CentOS 7 +{% assign rh_version = "7" %} +{% include 'note_python_sc' %} -# Install Software Collections: -
~$ sudo yum install centos-release-scl scl-utils
-# Install PostgreSQL: -
~$ sudo yum install rh-postgresql94-postgresql-server
-# Initialize the database: -
~$ sudo scl enable rh-postgresql94 "postgresql-setup initdb"
-# Configure the database to accept password connections: -
~$ sudo sed -ri -e 's/^(host +all +all +(127\.0\.0\.1\/32|::1\/128) +)ident$/\1md5/' /var/opt/rh/rh-postgresql94/lib/pgsql/data/pg_hba.conf
-# Configure the database to launch at boot: -
~$ sudo chkconfig rh-postgresql94-postgresql on
-# Start the database: -
~$ sudo service rh-postgresql94-postgresql start
-# "Set up Arvados credentials and databases":#rails_setup for the services that will use this PostgreSQL install. +# Install PostgreSQL +
# yum install rh-postgresql95 rh-postgresql95-postgresql-contrib
+~$ scl enable rh-postgresql95 bash
+# Initialize the database +
# postgresql-setup initdb
+# Configure the database to accept password connections +
# sed -ri -e 's/^(host +all +all +(127\.0\.0\.1\/32|::1\/128) +)ident$/\1md5/' /var/lib/pgsql/data/pg_hba.conf
+# Configure the database to launch at boot and start now +
# systemctl enable --now rh-postgresql95-postgresql
-h2(#centos7). Install PostgreSQL on CentOS 7 +h3(#debian). Debian or Ubuntu -# Install PostgreSQL: -
~$ sudo yum install postgresql-server
-# Initialize the database: -
~$ sudo postgresql-setup initdb
-# Configure the database to accept password connections: -
~$ sudo sed -ri -e 's/^(host +all +all +(127\.0\.0\.1\/32|::1\/128) +)ident$/\1md5/' /var/lib/pgsql/data/pg_hba.conf
-# Configure the database to launch at boot: -
~$ sudo systemctl enable postgresql
-# Start the database: -
~$ sudo systemctl start postgresql
-# "Set up Arvados credentials and databases":#rails_setup for the services that will use this PostgreSQL install. +Debian 8 (Jessie) and Ubuntu 16.04 (Xenial) and later versions include a sufficiently recent version of Postgres. -h2(#debian). Install PostgreSQL on Debian or Ubuntu +Ubuntu 14.04 (Trusty) requires an updated PostgreSQL version, see "the PostgreSQL ubuntu repository":https://www.postgresql.org/download/linux/ubuntu/ -# Install PostgreSQL: -
~$ sudo apt-get install postgresql
-# "Set up Arvados credentials and databases":#rails_setup for the services that will use this PostgreSQL install. - - - -h2(#sso). Set up SSO server credentials and database - -{% assign service_role = "arvados_sso" %} -{% assign service_database = "arvados_sso_production" %} -{% include 'install_postgres_database' %} - -h2(#api). Set up API server credentials and database - -{% assign service_role = "arvados" %} -{% assign service_database = "arvados_production" %} -{% include 'install_postgres_database' %} +# Install PostgreSQL +
# apt-get --no-install-recommends install postgresql postgresql-contrib
+# Configure the database to launch at boot and start now +
# systemctl enable --now postgresql