Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates-src > by-pkgid > dc5feca39412fbab1eebceada9450c1e > files > 9

nextcloud-12.0.6-3.mga6.src.rpm

Configure PostgreSQL for ownCloud
=================================

To use PostgreSQL as database backend, you need to do the following:

1. Make sure that your PostgreSQL service is configured and running properly.
   If this is a fresh install, you will need to run "postgresql-setup initdb"
   as root, then "systemctl enable postgresql.service; systemctl start
   postgresql.service".

2. Log in to PostgreSQL as system user to create the database and a dedicated
   user account for ownCloud:
   # su - -c "psql" postgres
     CREATE USER username WITH PASSWORD 'password';
     CREATE DATABASE nextcloud TEMPLATE template0 ENCODING 'UNICODE';
     ALTER DATABASE nextcloud OWNER TO username;
     GRANT ALL PRIVILEGES ON DATABASE nextcloud TO username;
   Choose identifier and password accordingly.
   
3. ownCloud talks to PostgreSQL via TCP/IP, so you need to configure an
   appropriate authentication mechanism in /var/lib/pgsql/data/pg_hba.conf.
   For a simple configuration with ownCloud and PostgreSQL on the same host,
   set the METHOD for the lines that apply to localhost TCP/IP connections
   to "password". ownCloud does *not* use a socket to communicate with the
   database, so the 'local' line in pg_hba.conf does *not* apply to it.
   Note that this will result in the password being sent unencrypted from
   ownCloud to the PostgreSQL server. For more details, see
   http://www.postgresql.org/docs/9.3/static/auth-pg-hba-conf.html.
   
Now you can launch the ownCloud setup screen, select PostgreSQL in the advanced
settings and fill in your credentials.

References
==========

http://www.postgresql.org/docs
http://doc.nextcloud.org/server/7.0/admin_manual/configuration/configuration_database.html