[med-svn] r19609 - trunk/packages/orthanc-postgresql/trunk/debian

Andreas Tille tille at moszumanska.debian.org
Tue Jul 14 05:51:37 UTC 2015


Author: tille
Date: 2015-07-14 05:51:36 +0000 (Tue, 14 Jul 2015)
New Revision: 19609

Modified:
   trunk/packages/orthanc-postgresql/trunk/debian/README.Debian
Log:
README.Debian suggestion by Karsten Hilbert


Modified: trunk/packages/orthanc-postgresql/trunk/debian/README.Debian
===================================================================
--- trunk/packages/orthanc-postgresql/trunk/debian/README.Debian	2015-07-13 21:34:04 UTC (rev 19608)
+++ trunk/packages/orthanc-postgresql/trunk/debian/README.Debian	2015-07-14 05:51:36 UTC (rev 19609)
@@ -6,7 +6,7 @@
 override the default SQLite engine of Orthanc with a PostgreSQL
 back-end. They bring scalability to Orthanc, making it
 enterprise-ready.
-    
+
 Homepage: https://code.google.com/p/orthanc-postgresql/
 
 
@@ -17,7 +17,7 @@
 PostgreSQL database by adapting the configuration file
 "/etc/orthanc/postgresql.json". Then, restart the Orthanc service:
 
-# sudo /etc/init.d/orthanc restart
+	$> sudo systemctl restart orthanc.service
 
 
 Step-by-step tutorial
@@ -25,37 +25,80 @@
 
 (1) Install the database server:
 
-# sudo apt-get install postgresql
-  
+	$> sudo apt-get install postgresql
 
-(2) Create an user (whose name is "orthanc_user" with password
-    "my_password") and a database (whose name is "orthanc_db") to
-    store the content of Orthanc:
 
-# sudo -u postgres psql postgres
+(2) Create a database account a database to store the
+    content of Orthanc:
 
-postgres=# CREATE USER orthanc_user;
-postgres=# ALTER USER orthanc_user WITH ENCRYPTED PASSWORD 'my_password';
-postgres=# CREATE DATABASE orthanc_db OWNER orthanc_user;
+	$> sudo -u postgres createuser -e orthanc
+	$> sudo -u postgres createdb -e -E utf8 -O orthanc orthanc_db
 
-Hit <Ctrl-D> to exit the PostgreSQL prompt.
 
+(3) Restrict access to the Orthanc database:
 
-(3) Edit the configuration file "/etc/orthanc/postgresql.json" and use the
-    following entry:
+	Edit /etc/postgresql/VERSION/main/pg_hba.conf to contain
 
-  "PostgreSQL" : {
-    "EnableIndex" : true,
-    "EnableStorage": true,
-    "ConnectionUri" : "postgresql://orthanc_user:my_password@localhost:5432/orthanc_db"
-  }
+		local   orthanc_db     orthanc                                  ident
 
+	somewhere AFTER the lines
 
+		# Database administrative login by Unix domain socket
+		local   all             postgres                                ident
+
+	Reload PostgreSQL configuration
+
+		$> systemctl reload postgresql.service
+
+
+(3) Edit the configuration file "/etc/orthanc/postgresql.json"
+    to make Orthanc connect to PostgreSQL:
+
+	"PostgreSQL" : {
+		"EnableIndex" : true,
+		"EnableStorage": true,
+		"ConnectionUri" : "postgresql:///orthanc_db?user=orthanc",
+	}
+
+	Make sure to comment out all individual authentication
+	parameters such as Host, Port, ...
+
+
 (4) Restart the Orthanc service and check the logs:
 
-# sudo /etc/init.d/orthanc restart
-# cat /var/log/orthanc/Orthanc.WARNING
+	$> sudo apt-get install postgresql
+	$> less /var/log/orthanc/Orthanc.WARNING
+	$> less /var/log/postgresql/postgresl-VERSION-main.log
 
 
-PS: Note that one can use any name for user and database, as long as
-reality and configuration match.
+Further notes
+=============
+
+Setup
+
+One can use any name for the database, as long as reality and
+configuration match.
+
+The database account should be "orthanc" in order to enable intuitive use
+of PEER authentication because Orthanc is running as the "orthanc" system
+user. If you need to use another database account adjust pg_hba.conf
+accordingly or use a user name mapping (see PostgreSQL documentation).
+
+
+Data integrity
+
+If you intend to set "StoreMD5ForAttachments" to "true" in orthanc.json
+you should strongly consider making sure the PostgreSQL cluster is set to
+provide on-disk data page checksumming. Check with the following SQL query:
+
+	psql> select * from pg_settings where name = 'data_checksums';
+
+
+Data compression
+
+Also, strongly consider to NOT set "StorageCompression" to "true" when
+using PostgreSQL because the database will already compress data (TOAST,
+EXTENDED storage, pg_largeobject)
+
+
+Data migration




More information about the debian-med-commit mailing list