-
Notifications
You must be signed in to change notification settings - Fork 241
Installation
Content
- Requirements
- Download and extract binary distribution package
- Initialize Database
- Setup LDAP Server
- Import default configuration into LDAP Server
- Setup WildFly
- Java SE 8 or later - tested with OpenJDK and Oracle JDK
- Wildfly 10.0.x
- Supported SQL Database:
- H2 embedded in Wildfly (Not for production use!)
- PostgreSQL 9.4
- MariaDB 10.0
- MySQL 5.7.9
- Firebird 2.5.4
- Oracle 11g
- DB2 10.5
- MS SQL Server (not yet tested!)
- Supported LDAP Servers:
- LDAP Browser: Apache Directory Studio 2.0.0-M9
DCM4CHEE Archive 5.x binary distributions for different databases can be obtained from Sourceforge. Extract (unzip) your chosen download to the directory of your choice.
Note: DCM4CHEE Archive 5.x does not (yet) provide SQL scripts and utilities to migrate DCM4CHEE Archive 2.x data base schema to DCM4CHEE Archive 5.x.
There is no need to initialize the database before starting Wildfly. But you will need to create tables and indexes using H2 Console before deploying the archive.
-
Create user with permission to create databases:
> sudo -u postgres createuser -U postgres -P -d <user-name> Enter password for new role: <user-password> Enter it again: <user-password>
-
Create database:
> createdb -h localhost -U <user-name> <database-name>
-
Create tables and indexes:
> psql -h localhost <database-name> <user-name> < $DCM4CHEE_ARC/sql/create-psql.sql > psql -h localhost <database-name> <user-name> < $DCM4CHEE_ARC/sql/create-fk-index.sql
-
Create database and grant access to user::
> mysql -u root -p<root-password> mysql> create database <database-name>; mysql> grant all on <database-name>.* to '<user-name>' identified by '<user-password>'; mysql> quit
-
Create tables and indexes::
> mysql -u <user-name> -p<user-password> <database-name> < $DCM4CHEE_ARC/sql/create-mysql.sql
-
Create user
> gsec -user sysdba -password <sysdba-password> GSEC> add <user-name> -pw <user-password> GSEC> quit
-
Define database name in configuration file
aliases.conf
:<database-name> = <database-file-path>
-
Create database, tables and indexes
> isql-fb Use CONNECT or CREATE DATABASE to specify a database SQL> create database 'localhost:<database-name>' pagesize 16384 CON> user '<user-name>' password '<user-password>'; SQL> in DCM4CHEE_ARC/sql/create-firebird.sql; SQL> exit;
-
Create database and grant authority to create tables to user (must match existing OS user)
> sudo su db2inst1 > db2 db2 => create database <database-name> pagesize 16 K db2 => connect to <database-name> db2 => grant createtab on database to user <user-name> db2 => terminate
-
Create tables and indexes
> su <user-name> Password: <user-password> > db2 connect to <database-name> > db2 -t < $DCM4CHEE_ARC/sql/create-db2.sql > db2 -t < $DCM4CHEE_ARC/sql/create-fk-index.sql > db2 terminate
-
Connect to Oracle and create a new tablespace
$ sqlplus / as sysdba SQL> create bigfile tablespace <tablespace-name> datafile '<data-file-location>' size <size>; Tablespace created.
-
Create a new user with privileges for the new tablespace
$ sqlplus / as sysdba SQL> create user <user-name> 2 identified by <user-password> 3 default tabelspace <tablespace-name> 4 quota unlimited on <tablespace-name> 5 quota 50M on system; User created. SQL> grant create session to <user-name>; SQL> grant create table to <user-name>; SQL> grant create any index to <user-name>; SQL> grant create sequence to <user-name>; SQL> exit
-
Create tables and indexes
$ sqlplus <user-name>/<user-password> SQL> @$DCM4CHEE_ARC/sql/create-oracle.sql SQL> @$DCM4CHEE_ARC/sql/create-fk-index.sql
Not yet tested
OpenLDAP binary distributions are available for most Linux distributions and for Windows.
OpenLDAP can be alternatively configured by
See also Converting old style slapd.conf file to cn=config format
-
Copy LDAP schema files for OpenLDAP from DCM4CHEE Archive distribution to OpenLDAP schema configuration directory:
> cp $DCM4CHEE_ARC/ldap/schema/* /etc/openldap/schema/ [UNIX] > copy %DCM4CHEE_ARC%\ldap\schema\* \Program Files\OpenLDAP\schema\ [Windows]
-
Add references to schema files in
slapd.conf
, e.g.:include /etc/openldap/schema/core.schema include /etc/openldap/schema/dicom.schema include /etc/openldap/schema/dcm4che.schema include /etc/openldap/schema/dcm4chee-archive.schema
-
Directory Base DN and Root User DN are specified in
slapd.conf
bysuffix "dc=nodomain" rootdn "cn=admin,dc=nodomain" rootpw secret
and may be modfied to
suffix "dc=dcm4che,dc=org" rootdn "cn=admin,dc=dcm4che,dc=org" rootpw secret
-
Import LDAP schema files for OpenLDAP runtime configuration, using OpenLDAP CL utility ldapadd, e.g.:
> sudo ldapadd -Y EXTERNAL -H ldapi:/// -f $DCM4CHEE_ARC/ldap/slapd/dicom.ldif > sudo ldapadd -Y EXTERNAL -H ldapi:/// -f $DCM4CHEE_ARC/ldap/slapd/dcm4che.ldif > sudo ldapadd -Y EXTERNAL -H ldapi:/// -f $DCM4CHEE_ARC/ldap/slapd/dcm4chee-archive.ldif
-
Directory Base DN and Root User DN can be modified by changing the values of attributes
olcSuffix: dc=nodomain olcRootDN: cn=admin,dc=nodomain
of object
olcDatabase={1}hdb,cn=config
by specifing the new values in a LDIF file (e.g.modify-baseDN.ldif
)dn: olcDatabase={1}hdb,cn=config changetype: modify replace: olcSuffix olcSuffix: dc=dcm4che,dc=org - replace: olcRootDN olcRootDN: cn=admin,dc=dcm4che,dc=org -
and applying it using OpenLDAP CL utility ldapmodify, e.g.:
> sudo ldapmodify -Y EXTERNAL -H ldapi:/// -f modify-baseDN.ldif
-
Copy LDAP schema files for OpenDJ from DCM4CHEE Archive distribution to OpenDJ schema configuration directory:
> cp $DCM4CHEE_ARC/ldap/opendj/* $OPENDJ_HOME/config/schema/ [UNIX] > copy %DCM4CHEE_ARC%\ldap\opendj\* %OPENDJ_HOME%\config\schema\ [Windows]
-
Run OpenDJ GUI based setup utility
> $OPENDJ_HOME/setup
Log the values choosen for
- LDAP Listener port (1389)
- Root User DN (cn=Directory Manager)
- Root User Password (secret)
- Directory Base DN (dc=dcm4che,dc=org)
needed for the LDAP connection configuration of DCM4CHEE Archive.
-
After initial setup, you may start and stop OpenDJ by
> $OPENDJ_HOME/bin/start-ds > $OPENDJ_HOME/bin/stopt-ds
-
Install Apache DS 2.0.0-M20 on your system and start Apache DS.
-
Install Apache Directory Studio 2.0.0-M9 and create a new LDAP Connection with:
Network Parameter: Hostname: localhost Port: 10389 Authentication Parameter: Bind DN or user: uid=admin,ou=system Bind password: secret
-
Import LDAP schema files for Apache DS:
$DCM4CHEE_ARC/ldap/apacheds/dicom.ldif $DCM4CHEE_ARC/ldap/apacheds/dcm4che.ldif $DCM4CHEE_ARC/ldap/apacheds/dcm4chee-archive.ldif
using the LDIF import function of Apache Directory Studio LDAP Browser.
-
You may modify the default Directory Base DN
dc=example,dc=com
by changing the value of attributeads-partitionsuffix: dc=dcm4che,dc=org`
of object
ou=config + ads-directoryServiceId=default + ou=partitions ads-partitionId=example
using Apache Directory Studio LDAP Browser.
-
If not already done, install Apache Directory Studio 2.0.0-M9 and create a new LDAP Connection corresponding to your LDAP Server configuration, e.g:
Network Parameter: Hostname: localhost Port: 389 Authentication Parameter: Bind DN or user: cn=admin,dc=dcm4che,dc=org Bind password: secret Browser Options: Base DN: dc=dcm4che,dc=org
-
If you configured a different Directory Base DN than
dc=dcm4che,dc=org
, you have to replace all occurrences ofdc=dcm4che,dc=org
in LDIF files$DCM4CHEE_ARC/ldap/init-baseDN.ldif $DCM4CHEE_ARC/ldap/init-config.ldif $DCM4CHEE_ARC/ldap/default-config.ldif $DCM4CHEE_ARC/ldap/add-vendor-data.ldif
by your Directory Base DN, e.g.:
> cd $DCM4CHEE_ARC/ldap > sed -i s/dc=dcm4che,dc=org/dc=my-domain,dc=com/ init-baseDN.ldif > sed -i s/dc=dcm4che,dc=org/dc=my-domain,dc=com/ init-config.ldif > sed -i s/dc=dcm4che,dc=org/dc=my-domain,dc=com/ default-config.ldif > sed -i s/dc=dcm4che,dc=org/dc=my-domain,dc=com/ add-vendor-data.ldif
-
If there is not already a base entry in the directory data base, import
$DCM4CHEE_ARC/ldap/init-baseDN.ldif
using the LDIF import function of Apache Directory Studio LDAP Browser. -
If there are not already DICOM configuration root entries in the directory data base, import
$DCM4CHEE_ARC/ldap/init-config.ldif
using the LDIF import function of Apache Directory Studio LDAP Browser. -
Import
$DCM4CHEE_ARC/ldap/sample-config.ldif
using the LDIF import function of Apache Directory Studio LDAP Browser. -
On dcm4chee-arc device level, you may add new attribute dicomVendorData using the New Attribute function (or Ctrl+Shift++) of Apache Directory Studio and in its value you can load the data -
$DCM4CHEE_ARC/ldap/add-vendor-data.ldif
which imports$DCM4CHEE_ARC/ldap/dcm4chee-arc-conf-data-<version>.zip
. This zip file contains XSLT stylesheets specifing attribute coercion in incoming or outgoing DICOM messages and mapping of HL7 fields in incoming HL7 messages. -
You may change the default AE Title(s) of the Archive:
DCM4CHEE
,DCM4CHEE_ADMIN
,DCM4CHEE_TRASH
. -
You may change the default Storage Directory:
/var/local/dcm4chee-arc/fs1
. -
You may configure AE Title(s) of external DICOM Applications to which the Archive shall be able to connect.
-
Copy configuration files into the WildFly installation:
> cp -r $DCM4CHEE_ARC/configuration/dcm4chee-arc $WILDFLY_HOME/standalone/configuration [UNIX] > xcopy %DCM4CHEE_ARC%\configuration\dcm4chee-arc %WILDFLY_HOME%\standalone\configuration [Windows]
Note: Beside LDAP Connection configuration
dcm4chee-arc/ldap.properties
, the private keydcm4chee-arc/key.jks
used in TLS connections are not stored in LDAP. -
The Java EE 7 Full Profile configuration can be used as base configuration. To preserve the original WildFly configuration you may copy the original configuration file for JavaEE 7 Full Profile:
> cd $WILDFLY_HOME/standalone/configuration/ > cp standalone-full.xml dcm4chee-arc.xml
-
Install DCM4CHE dcm4chee-arc-light libraries as JBoss modules:
> cd $WILDFLY_HOME > unzip $DCM4CHEE_ARC/jboss-module/dcm4che-jboss-modules-5.x-dcm4chee-arc-light.zip
-
Install JAI Image IO 1.2 libraries as JBoss module (needed for compression/decompression, does not work on Windows 64 bit and Mac OS X caused by missing native components for these platforms):
> cd $WILDFLY_HOME > unzip $DCM4CHEE_ARC/jboss-module/jai_imageio-jboss-modules-1.2-pre-dr-b04.zip
-
Install QueryDSL 3.2.3 libraries as JBoss module:
> cd $WILDFLY_HOME > unzip $DCM4CHEE_ARC/jboss-module/querydsl-jboss-modules-4.0.3-noguava.zip
-
Install jclouds 1.8.1 libraries as JBoss modules:
> cd $WILDFLY_HOME > unzip $DCM4CHEE_ARC/jboss-module/jclouds-jboss-modules-1.9.1-noguava.zip
-
Except for H2, you have to install the JDBC Driver for the database. DCM4CHEE Archive light 5.x binary distributions do not include a JDBC driver for the database for license issues. You may download it from:
- MySQL
- PostgreSQL
- Firebird
- DB2, also included in DB2 Express-C
- Oracle, also included in Oracle 11g XE)
- Microsoft SQL Server
The JDBC driver can be installed either as a deployment or as a core module. See
Installation as deployment is limited to JDBC 4-compliant driver consisting of one JAR.
For installation as a core module,
$DCM4CHEE_ARC/jboss-module/jdbc-jboss-modules-1.0.0-<database>.zip
already provides a module definition filemodule.xml
. You just need to extract the ZIP file into $WILDFLY_HOME and copy the JDBC Driver file(s) into the sub-directory, e.g.:> cd $WILDFLY_HOME > unzip $DCM4CHEE_ARC/jboss-module/jdbc-jboss-modules-1.0.0-db2.zip > cd $DB2_HOME/java > cp db2jcc4.jar db2jcc_license_cu.jar $WILDFLY_HOME/modules/com/ibm/db2/main/
Verify, that the actual JDBC Driver file(s) name matches the path(s) in the provided
module.xml
, e.g.:<?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.1" name="com.ibm.db2"> <resources> <resource-root path="db2jcc4.jar"/> <resource-root path="db2jcc_license_cu.jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
-
Start WildFly in standalone mode with the correct configuration file:
> $WILDFLY_HOME/bin/standalone.sh -c dcm4chee-arc.xml [UNIX] > %WILDFLY_HOME%\bin\standalone.bat -c dcm4chee-arc.xml [Windows]
Verify, that JBoss started successfully, e.g.:
========================================================================= JBoss Bootstrap Environment JBOSS_HOME: "C:\wildfly-10.0.0.Final" JAVA: "C:\Program Files\Java\jdk1.8.0_65\bin\java" JAVA_OPTS: "-Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m - Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n" ========================================================================= 09:22:51,531 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.1.Final 09:22:51,704 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final 09:22:51,767 INFO [org.jboss.as] (MSC service thread 1-6) WFLYSRV0049: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) starting : 09:22:54,094 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) started in 28397ms - Started 1839 of 2270 services (683 services are lazy, passive or on-demand)
Running JBoss in domain mode should work, but was not yet tested.
-
Add JDBC Driver into the server configuration using JBoss CLI in a new console window:
> $WILDFLY_HOME/bin/jboss-cli.sh -c [UNIX] > %WILDFLY_HOME%\bin\jboss-cli.bat -c [Windows] [standalone@localhost:9999 /] /subsystem=datasources/jdbc-driver=<driver-name>:add(driver-name=<driver-name>,driver-module-name=<module-name>)
You may choose any
<driver-name>
for the JDBC Driver,<module-name>
must match the name defined in the module definition filemodule.xml
of the JDBC driver, e.g.:[standalone@localhost:9999 /] /subsystem=datasources/jdbc-driver=db2:add(driver-name=db2,driver-module-name=com.ibm.db2)
-
Create and enable a new Data Source bound to JNDI name
java:/PacsDS
using JBoss CLI:[standalone@localhost:9999 /] data-source add --name=PacsDS \ > --driver-name=<driver-name> \ > --connection-url=<jdbc-url> \ > --jndi-name=java:/PacsDS \ > --user-name=<user-name> \ > --password=<user-password> [standalone@localhost:9999 /] data-source enable --name=PacsDS
The format of
<jdbc-url>
is JDBC Driver specific, e.g.:- H2:
jdbc:h2:<directory-path>/<database-name>
- MySQL:
jdbc:mysql://<host>:3306/<database-name>
- PostgreSQL:
jdbc:postgresql://<host>:5432/<database-name>
- Firebird:
jdbc:firebirdsql:<host>/3050:<database-name>
- DB2:
jdbc:db2://<host>:50000/<database-name>
- Oracle:
jdbc:oracle:thin:@<host>:1521:<database-name>
- Microsoft SQL Server:
jdbc:sqlserver://<host>:1433;databaseName=<database-name>
There is also a CLI script
$DCM4CHEE_ARC/cli/add-data-source-<db>.cli
provided, which just applies the two commands to add the JDBC driver and creating the Data Source. You have to replace<host>
,<database-name>
,<user-name>
and<user-password>
by their actual values before executing it:> $WILDFLY_HOME/bin/jboss-cli.sh -c -f $DCM4CHEE_ARC/cli/add-data-source-<db>.cli
- H2:
-
If you are using H2 as database, you have now to create tables and indexes using the H2 Console:
-
Download the H2 Console WAR file from https://github.com/sgilda/wildfly-quickstart/tree/master/h2-console
-
Deploy it using JBoss CLI, e.g.:
[standalone@localhost:9999 /] deploy ~/Downloads/h2-console.war
-
Access the console at http://localhost:8080/h2console and login with
JDBC URL
,User name
undPassword
matching the values passed to abovedata-source add --name=PacsDS
. -
Create tables and indexes:
RUNSCRIPT FROM '$DCM4CHEE_ARC/sql/create-h2.sql'
-
-
Create JMS Queues using JBoss CLI:
[standalone@localhost:9990 /] jms-queue add --queue-address=StgCmtSCP --entries=java:/jms/queue/StgCmtSCP [standalone@localhost:9990 /] jms-queue add --queue-address=MPPSSCU --entries=java:/jms/queue/MPPSSCU [standalone@localhost:9990 /] jms-queue add --queue-address=IANSCU --entries=java:/jms/queue/IANSCU [standalone@localhost:9990 /] jms-queue add --queue-address=Export1 --entries=java:/jms/queue/Export1 [standalone@localhost:9990 /] jms-queue add --queue-address=Export2 --entries=java:/jms/queue/Export2 [standalone@localhost:9990 /] jms-queue add --queue-address=Export3 --entries=java:/jms/queue/Export3
There is also a CLI script
$DCM4CHEE_ARC/cli/add-jms-queues.cli
provided, containing that commands, which you may just execute:> $WILDFLY_HOME/bin/jboss-cli.sh -c -f $DCM4CHEE_ARC/cli/add-jms-queues.cli
-
One of the differences between the default configurations of Wildfly 9 and 10 is in the managed-executor-services of the ee subsystem (core-threads and max-threads attributes are missing) which causes thread-pool related issues in the latter, typically when there are long running tasks on archive or multiple association requests at the same time. Hence to make Wildfly 10 behave like default in Wildfly 9, we need to adjust the managed-executor-services configuration using JBoss CLI as given below:
[standalone@localhost:9990 /] /subsystem=ee/managed-executor-service=default:undefine-attribute(name=hung-task-threshold) [standalone@localhost:9990 /] /subsystem=ee/managed-executor-service=default:write-attribute(name=long-running-tasks,value=true) [standalone@localhost:9990 /] /subsystem=ee/managed-executor-service=default:write-attribute(name=core-threads,value=2) [standalone@localhost:9990 /] /subsystem=ee/managed-executor-service=default:write-attribute(name=max-threads,value=100) [standalone@localhost:9990 /] /subsystem=ee/managed-executor-service=default:write-attribute(name=queue-length,value=0)
-
At default, DCM4CHEE Archive 5.x will assume
dcm4chee-arc
as its Device Name, used to find its configuration in the LDAP Server. You may specify a different Device Name by system propertydcm4chee-arc.DeviceName
using JBoss CLI:[standalone@localhost:9999 /] /system-property=dcm4chee-arc.DeviceName:add(value=<device-name>)
-
Deploy DCM4CHEE Archive 5.x using JBoss CLI, e.g.:
[standalone@localhost:9999 /] deploy $DCM4CHEE_ARC/deploy/dcm4chee-arc-ear-5.x-psql.ear
Verify that DCM4CHEE Archive was deployed and started successfully, e.g.:
11:00:38,511 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0027: Starting deployment of "dcm4chee-arc-ear-5.x-psql.ear" (runtime-name: "dcm4chee-arc-ear-5.x-psql.ear") : 11:00:42,742 INFO [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-1) Start TCP Listener on /0.0.0.0:11112 11:00:42,811 INFO [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-2) Start TCP Listener on /0.0.0.0:2762 11:00:42,811 INFO [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-3) Start TCP Listener on /0.0.0.0:2575 11:00:42,813 INFO [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-4) Start TCP Listener on /0.0.0.0:12575 11:00:43,095 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 20) WFLYUT0021: Registered web context: /dcm4chee-arc 11:00:43,095 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 23) WFLYUT0021: Registered web context: /dcm4chee-arc/ui 11:00:43,157 INFO [org.jboss.as.server] (management-handler-thread - 3) WFLYSRV0010: Deployed "dcm4chee-arc-ear-5.x-SNAPSHOT-psql.ear" (runtime-name : "dcm4chee-arc-ear-5.x-SNAPSHOT-psql.ear")
Verify that the Web UI is accessable at http://localhost:8080/dcm4chee-arc/ui.
You may undeploy DCM4CHEE Archive at any time using JBoss CLI, e.g.:
[standalone@localhost:9999 /] undeploy dcm4chee-arc-ear-5.x-psql.ear 11:05:23,905 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 75) WFLYUT0022: Unregistered web context: /dcm4chee-arc 11:05:23,906 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 80) WFLYUT0022: Unregistered web context: /dcm4chee-arc/ui 11:05:23,912 INFO [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-1) Stop TCP Listener on /0.0.0.0:11112 11:05:23,912 INFO [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-2) Stop TCP Listener on /0.0.0.0:2762 11:05:23,915 INFO [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-4) Stop TCP Listener on /0.0.0.0:12575 11:05:23,915 INFO [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-3) Stop TCP Listener on /0.0.0.0:2575 : 11:05:24,023 INFO [org.jboss.as.server] (management-handler-thread - 8) WFLYSRV0009: Undeployed "dcm4chee-arc-ear-5.x-psql.ear" (runtime-name: "dcm4chee-arc-ear-5.x-psql.ear")
DCM4CHEE 5 Documentation