[Pkg-owncloud-commits] [owncloud-doc] 24/36: PostgreSQL with the peer authentication method.

David Prévot taffit at moszumanska.debian.org
Thu Aug 21 16:43:02 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud-doc.

commit 08ac0c635cbade3fccc332ce9142dc1f2cfc7655
Author: daniel <git at danger-it.de>
Date:   Fri Aug 15 22:01:11 2014 +0200

    PostgreSQL with the peer authentication method.
    
    Added information how to get owncloud to use PostgreSQL which is
    configured to use the peer authentication method. This is the default
    setting in Ubuntu 14.04 (and probably other distros).
    
    Information was adopted from
    https://gitlab.com/gitlab-org/gitlab-ce/blob/7-1-stable/doc/install/installation.md#4-database
    and tested this with ownCloud 7.0.1 (stable).
---
 .../configuration/configuration_database.rst       | 36 ++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/admin_manual/configuration/configuration_database.rst b/admin_manual/configuration/configuration_database.rst
index 577f3c3..fc54225 100644
--- a/admin_manual/configuration/configuration_database.rst
+++ b/admin_manual/configuration/configuration_database.rst
@@ -149,6 +149,42 @@ like this:
   pgsql.ignore_notice = 0
   pgsql.log_notice = 0
 
+The default configuration for PostgreSQL (at least in Ubuntu 14.04) is to use the peer authentication method. Check :file:`/etc/postgresql/9.3/main/pg_hba.conf` to find out which authentication method is used in your setup.
+To start the postgres command line mode use::
+
+  sudo -u postgres psql -d template1
+
+Then a **template1=#** prompt will appear. Now enter the following lines and confirm them with the enter key:
+
+.. code-block:: sql
+
+  CREATE USER username CREATEDB;
+  CREATE DATABASE owncloud OWNER username;
+
+You can quit the prompt by entering::
+
+  \q
+
+An ownCloud instance configured with PostgreSQL would contain the hostname on
+which the database is running, a valid username and password to access it, and
+the name of the database. The :file:`config/config.php` as created by the
+:doc:`../installation/installation_wizard` would therefore contain entries like
+this:
+
+.. code-block:: php
+
+  <?php
+
+    "dbtype"        => "pgsql",
+    "dbname"        => "owncloud",
+    "dbuser"        => "username",
+    "dbpassword"    => "",
+    "dbhost"        => "/var/run/postgresql",
+    "dbtableprefix" => "oc_",
+
+IMPORTANT: The host actually points to the socket that is used to connect to the database. Using localhost here will not work if postgreSQL is configured to use peer authentication. Also note, that no password is specified, because this authentication method doesn't use a password.
+
+If you use another authentication method (not peer), you'll need to use the following steps to get the database setup:
 Now you need to create a database user and the database itself by using the
 PostgreSQL command line interface. The database tables will be created by
 ownCloud when you login for the first time.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-doc.git



More information about the Pkg-owncloud-commits mailing list