Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Download the binary distribution of dcm4chee for the database of your choice from the Files page of the dcm4che project page on SourceForge (http://sourceforge.net/projects/dcm4che/). If you do not see a distribution for your database, you will have to Building dcm4chee from Source\ from the source code.
  2. Once downloaded, extract the distribution package into your desired destination directory. Avoid using a directory path that contains spaces though, as that may cause problems when running the application from the command line.
  3. Install the database software of your choice (keeping in mind the supported database systems) if you have not already done so. Keep in mind that the database software that you install (or have installed) must match the version of dcm4chee that you downloaded. For example, if you want to use PostgreSQL with dcm4chee then you should download the dcm4chee-standalone-psql-2.8.2.zip file from SourceForge.
  4. If using a database other than MySQL or PostgreSQL you will need to copy an apropriate JDBC Driver for the database to DCM4CHEE_DIST/server/default/lib/. This is not necessary for MySQL or PostgreSQL because the binary distribution of dcm4chee already contains the correct JDBC drivers for these database systems.
  5. Verify that your database installation has TCP/IP socket access available.

    For example, with PostgreSQL you can check the pg_hba.conf file for your database:

    No Format
    $PGDATA/pg_hba.conf:
    # IPv4 local connections:
    host    all         all         127.0.0.1/32          trust
    

    With Oracle, you can verify that the TNS Listener is enabled:

    No Format
    C:\>netstat -b -p TCP
    Active Connections
      TCP    localhost:1284               host.domain.com:1521     ESTABLISHED     1788
      [ORACLE.EXE]
    
      TCP    localhost:1521               host.domain.com:1284     ESTABLISHED     1816
      [TNSLSNR.exe]
    
  6. Initiate the archive database instance (named pacsdb) using the create DDL script located in DCM4CHEE_DIST/sql/create.xxx.

    For example, with PostgreSQL on a Unix-based system:

    No Format
    > export PGUSER=postgres
    > createdb pacsdb
    > psql pacsdb \-f DCM4CHEE_DIST/sql/create.psql
    

    To initialize a MySQL database on a Unix-based system:

    No Format
    > mysql \-uroot
    mysql> create database pacsdb;
    mysql> grant all on pacsdb.\* to 'pacs'@'localhost' identified by 'pacs';
    mysql> \q
    > mysql \-upacs \-ppacs < DCM4CHEE_DIST/sql/create.mysql
    
    Tip
    titleDDL Tuning

    If you wish to take advantage of specific features of your RDBMS such as tablespaces, partitioning, etc. you will need to implement them on your own. This can sometimes be done with the tools that come with the database, or by modifying the DDL script before running it. If you make changes to the DDL script that you think might be useful to the wider audience, please submit them to the dcm4che-users listserv.

  7. Adjust the dcm4chee database connection pool settings in DCM4CHEE_DIST/server/default/deploy/xxxx-ds.xml to suit your environment. This includes the user name and password that the application should use when obtaining connections. In addition, JBoss allows for the configuration of other aspects of the connection pool. Although the default settings are fine for basic deployment scenarios, the following may be added to the XML file in order to tune the connection pool:
    Code Block
    <\!\--example of how to specify class that determines if exception means connection should be destroyed-\->
    <\!\--exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyExceptionSorter</exception-sorter-class-name-\->
    
    <\!-\- this will be run before a managed connection is removed from the pool for use by a client-->
    <\!--<check-valid-connection-sql>select * from something</check-valid-connection-sql> \-->
    
    <\!-\- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use \-->
    <min-pool-size>5</min-pool-size>
    
    <\!-\- The maximum connections in a pool/sub-pool \-->
    <max-pool-size>20</max-pool-size>
    
    <\!-\- The time before an unused connection is destroyed \-->
    <\!-\- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use \-->
    <idle-timeout-minutes>0</idle-timeout-minutes>
    
    <\!-\- sql to call when connection is created
    <new-connection-sql>some arbitrary sql</new-connection-sql>
     \-->
    
    <\!-\- sql to call on an existing pooled connection when it is obtained from pool
    <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
    \-->
    
    <\!-\- example of how to specify a class that determines a connection is valid before it is handed out from the pool
    <valid-connection-checker-class-name>fully qualified name of class to use</valid-connection-checker-class-name>
    \-->
    
    <\!-\- Whether to check all statements are closed when the connection is returned to the pool,
     this is a debugging feature that should be turned off in production
    <track-statements/>
    \-->
    
  8. Set the JAVA_HOME environment variable to your JDK installation directory.
  9. Adjust the Java heap settings for the application

    Windows: DCM4CHEE_DIST/bin/run.bat:

    No Format
    rem Sun JVM memory allocation pool parameters. Modify as appropriate.
    set JAVA_OPTS=%JAVA_OPTS% \-Xms128m \-Xmx512m
    

    Linux/Unix: DCM4CHEE_DIST/bin/run.conf

    No Format
    # Specify options to pass to the Java VM.
    JAVA_OPTS="-server \-Xms64m \-Xmx200m \-Djava.awt.headless=true ..
    

    Keep in mind the available RAM and memory requirements of other processes running on the hardware. For example, iif only 512 MB RAM is available on the machine, you should decrease the default value from -Xmx512m (on Windows to) -Xmx300.

  10. Optional: Upon installation, all DICOM services are pre-configured with DCM4CHEE as the Application Entity Title (AE Title, or AET). Although it is possible to modify this default configuration at a later date through the Web-based administrative console, it is more efficient to replace DCM4CHEE with YOUR_AET in DCM4CHEE_DIST/server/default/conf/xmdesc/*.xml using utilities provided by your platform.

    For example, on GNU Linux:

    No Format
    > find DCM4CHEE_DIST/server/default/conf/xmdesc \-exec \ sed \-i s/DCM4CHEE_DIST/YOUR_AET/g '{}' ';'}}
    
  11. Optional: You can configure numer of DICOM attributes stored in the database by modifying the DCM4CHEE_DIST/server/default/conf/dcm4chee-attribute-filter.xml.
  12. You're all done and ready to verify the installation (see below). After verifying that the application is installed and running correctly, you may want to install it as a Windows service or Unix daemon.
    1. Stop the application (type ctrl-c in the console window).
    2. Windows: install dcm4chee as a Windows service executing DCM4CHEE_DIST/bin/install_service.bat.
    3. Redhat Linux:
        ###copy
        • Copy the init script DCM4CHEE_DIST/bin/dcm4chee_init_redhat.sh to /etc/init.d/ and adjust it according to the dcm4chee installation location, the JDK installation location, and which user the dcm4chee should run under. For convenience you can rename it to dcm4chee.
        ###Add
      • Add it to services by issuing chkconfig --add dcm4chee. now you can start and stop the server by service dcm4chee start and service dcm4chee stop (note that service dcm4chee restart will not work, because the starting will occur before the stopping is finished and thus there will be conflicts on ports etc.)
      ###If
      • If you want dcm4chee to be started automatically on system startup, add it to appropriate runlevels (345) by chkconfig --level 345 dcm4chee on.

Verify the Installation

Navigate to the DCM4CHEE_DIST/bin directory, and execute the run.bat or run.sh script, as appropriate for your operating system. Your output should look like the following and contain no error or exception messages:

...