Skip to content
vrindanayak edited this page Jul 11, 2016 · 118 revisions

Upgrade DCM4CHEE Archive light

Content

Update Database Schema

DCM4CHEE Archive 5.x binary distributions contains SQL scripts for updating the database schema from previous versions. A change in the DB schema is reflected by an incremented second component of the version number (e.g. from 5.4.0 to 5.5.0). So you do not need to update the database schema for upgrading from a version which only differs in the third component of the version number (e.g. from 5.5.0 to 5.5.1). For upgrading from an older version which second component of the version number in not the previous number, you have first to update the data base schema to the previous version - by applying update scripts for previous versions in the right order - before applying the update script for the current version.

H2

You have to start Wildfly before updating the tables using the H2 console. Access the console at http://localhost:8080/h2console, login and update the database scheme by:

    RUNSCRIPT  FROM '$DCM4CHEE_ARC/sql/update-5.5-h2.sql'

PostgreSQL

    > psql -h localhost <database-name> <user-name> < $DCM4CHEE_ARC/sql/update-5.5-psql.sql

MySQL and MariaDB

    > mysql -u <user-name> -p<user-password> <database-name> < $DCM4CHEE_ARC/sql/update-5.5-mysql.sql

Firebird

    > isql-fb
    Use CONNECT or CREATE DATABASE to specify a database
    SQL> connect 'localhost:<database-name>'
    CON> user '<user-name>' password '<user-password>';
    SQL> in DCM4CHEE_ARC/sql/update-5.4-firebird.sql;
    SQL> exit;

DB2

    > su <user-name>
    Password: <user-password>
    > db2 connect to <database-name>
    > db2 -t < $DCM4CHEE_ARC/sql/update-5.5-db2.sql
    > db2 terminate

Oracle

    $ sqlplus <user-name>/<user-password>
    SQL> @$DCM4CHEE_ARC/sql/update-5.5-oracle.sql

MS SQL Server

Not yet tested

Update LDAP Schema

OpenLDAP

OpenLDAP with slapd.conf configuration file

  1. Replace previous schema files in OpenLDAP schema configuration directory by new versions from DCM4CHEE Archive distribution:

    > cp $DCM4CHEE_ARC/ldap/schema/* /etc/openldap/schema/ [UNIX]
    > copy %DCM4CHEE_ARC%\ldap\schema\* \Program Files\OpenLDAP\schema\ [Windows]
    
  2. Restart slapd:

    > sudo service slapd restart [UNIX]
    

OpenLDAP with dynamic runtime configuration

  1. Delete previous schema files from the OpenLDAP runtime configuration:

    > sudo rm "/etc/ldap/slapd.d/cn=config/cn=schema/cn={4}dicom.ldif"
    > sudo rm "/etc/ldap/slapd.d/cn=config/cn=schema/cn={5}dcm4che.ldif"
    > sudo rm "/etc/ldap/slapd.d/cn=config/cn=schema/cn={6}dcm4chee-archive.ldif"
    
  2. Restart slapd:

    > sudo service slapd restart
    
  3. Import new 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
    

OpenDJ

  1. Replace previous schema files in OpenDJ schema configuration directory by new versions from DCM4CHEE Archive distribution:

    > cp $DCM4CHEE_ARC/ldap/opendj/* $OPENDJ_HOME/config/schema/ [UNIX]
    > copy %DCM4CHEE_ARC%\ldap\opendj\* %OPENDJ_HOME%\config\schema\ [Windows]
    
  2. Restart OpenDJ by

    > $OPENDJ_HOME/bin/stop-ds
    > $OPENDJ_HOME/bin/start-ds
    

Apache DS 2.0.0

  1. Delete the ou=objectclasses child entry from the schema entries

    ou=schema
    + cn=dcm4chee-arc
      + ou=objectclasses
    + cn=dcm4che
      + ou=objectclasses
    

    before deleting the schema entries itself, using the Delete Entry function of Apache Directory Studio LDAP Browser.

  2. Import new LDAP schema files for Apache DS:

    $DCM4CHEE_ARC/ldap/apacheds/dcm4che.ldif
    $DCM4CHEE_ARC/ldap/apacheds/dcm4chee-archive.ldif
    

    using the LDIF import function of Apache Directory Studio LDAP Browser.

Update WildFly Deployment

Latest version of DCM4CHEE Archive available is 5.5.1 Note : DCM4CHEE archive version 5.2.x onwards requires Wildfly 10.0.0.Final. So you have to setup a new Wildfly installation for upgrading from DCM4CHEE Archive 5.1.x running on Wildlfy 9.x following Setup WildFly in the Installation instructions. For secured version of archive, refer to How to Install secured version of DCM4CHEE Archive (Secure UI and Secure RESTful) - Wildfly and Keycloak

If you do not need to upgrade Wildfly for a new Archive version, it is sufficient to update the Wildfly Deployment by

  1. Undeploy old DCM4CHEE Archive 5.x using JBoss CLI, e.g.:

     > $WILDFLY_HOME/bin/jboss-cli.sh -c [UNIX]
     > %WILDFLY_HOME%\bin\jboss-cli.bat -c [Windows]
     [standalone@localhost:9999 /] undeploy dcm4chee-arc-ear-5.x.old-psql.ear
    
  2. Deploy new DCM4CHEE Archive 5.x using JBoss CLI, e.g.:

     [standalone@localhost:9999 /] deploy $DCM4CHEE_ARC/deploy/dcm4chee-arc-ear-5.x.new-psql.ear
    
Clone this wiki locally