summaryrefslogtreecommitdiffstats
path: root/nextcloud-postgresql.txt
diff options
context:
space:
mode:
authorJames Hogarth <james.hogarth@gmail.com>2017-02-21 14:30:00 +0000
committerJames Hogarth <james.hogarth@gmail.com>2017-02-21 14:30:00 +0000
commit260614d225ad68cf4bb1bc31c2480b2ccd169d56 (patch)
tree50e35459d24d7c7972e5491dd03a19bd3197ce21 /nextcloud-postgresql.txt
parent3545d203eaf0f4c0bff942e50004f8785f1cd7b3 (diff)
import of srpm from review
Diffstat (limited to 'nextcloud-postgresql.txt')
-rw-r--r--nextcloud-postgresql.txt43
1 files changed, 43 insertions, 0 deletions
diff --git a/nextcloud-postgresql.txt b/nextcloud-postgresql.txt
new file mode 100644
index 0000000..15e7ad9
--- /dev/null
+++ b/nextcloud-postgresql.txt
@@ -0,0 +1,43 @@
+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". For more details on initial configuration of PostgreSQL
+ in Fedora, see https://fedoraproject.org/wiki/PostgreSQL
+
+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.
+
+4. You also need to allow the web server to communicate with the database by
+ TCP/IP: SELinux disallows this by default. Run:
+ # setsebool -P httpd_can_network_connect_db on
+
+Now you can launch the ownCloud setup screen, select PostgreSQL in the advanced
+settings and fill in your credentials.
+
+References
+==========
+
+https://fedoraproject.org/wiki/PostgreSQL
+http://www.postgresql.org/docs
+http://doc.nextcloud.org/server/7.0/admin_manual/configuration/configuration_database.html