Sun Solaris Installation with SMF

Installation DCM4CHEE 2.14.2 with Jboss 4.2.3.GA onto Sun´s Opensolaris based Unix SXCE snv_104.


Author: Armin Pipp (armin@pipp.at) - Version: 1.0a (03/2009).
All Rights Reserved.

Used Software:

  • Jboss 4.2.3 GA
  • dcm4chee V2.14.2 (mysql)
  • dcm4che2 V2.0.18
  • dcm4che-arr V3.0.7

OS: Sun Solaris Express Community Edition SXCE SVN_104 based on Opensolaris
uname -a
SunOS pacssrv 5.11 snv_104 i86pc i386 i86pc Solaris

Installation:


Create Storage:

ZFS filesystem is used for datastorage. The RaidZ zfs pool is named storage1 and some sharing options are set. Everything is made as the root user.

# bash
# zfs create -o casesensitivity=mixed -o nbmand=on -o compression=off storage1/pacs
# zfs set mountpoint=/pacs storage1/pacs
# zfs set sharenfs=rw,root=@192.168 storage1/pacs
# zfs set sharesmb=name=pacs storage1/pacs
# zfs set aclinherit=discard storage1/pacs
# zfs set aclmode=discard storage1/pacs

Autosnapshots are enabled and configured:

# svcadm enable auto-snapshot:daily
# svcadm enable auto-snapshot:weekly
# svcadm enable auto-snapshot:monthly
# zfs set com.sun:auto-snapshot:daily=false storage1
# zfs set com.sun:auto-snapshot:weekly=false storage1
# zfs set com.sun:auto-snapshot:monthly=false storage1
# zfs set com.sun:auto-snapshot:daily=true storage1/pacs
# zfs set com.sun:auto-snapshot:weekly=true storage1/pacs
# zfs set com.sun:auto-snapshot:monthly=true storage1/pacs
# zfs list -t snapshot



Download and extract DCM Packages

Jboss: http://www.jboss.org/jbossas/downloads/

Dcm: http://sourceforge.net/project/showfiles.php?group_id=37982

All dcm packages are downloaded, extracted under /pacs and a directory named "storage" needs to be created for a dicom datastorage then rename the directory dcm4chee-mysql-2.14.2 to dcm4chee-mysql.

ls listing in directory /pacs

# ls -l
drwxr-xr-x 7 root root        7 2009-02-28 23:00 dcm4che-2.0.18
drwxr-xr-x 5 root root        6 2009-02-28 23:00 dcm4chee-arr-mysql-3.0.7
drwxr-xr-x 8 root root        8 2009-02-28 23:03 dcm4chee-mysql
drwxr-xr-x 3 root root        3 2009-03-03 20:42 install
drwxr-xr-x 7 root root       12 2009-02-28 23:05 jboss-4.2.3.GA
drwxrwxrwx 4 root root        4 2009-03-03 20:39 storage

Installation of Dcm4chee into Jboss
The install_jboss.sh and the install_arr.sh have to be modified because the standard solaris cp command did not have the -v switch.
So change all lines with cp -v -R to cp -R.
Another option is using the /usr/gnu/bin/cp instead of /sbin/cp, which is the first found cp command from the standard root shell.

After the modification install dcm4chee and dcm4chee_arr into jboss.

# cd /dcm4chee-mysql/bin
# ./install_jboss.sh /pacs/jboss-4.2.3.GA
mkdir: cannot create directory `./../server/default/lib': Datei vorhanden
cp: cannot stat `/pacs/jboss-4.2.3.GA/server/default/deploy/management/console-mgr.sar/web-console.war/*.xml':
Datei oder Verzeichnis nicht gefunden
# ./install_arr.sh /pacs/dcm4chee-arr-mysql-3.0.7
 

Setting up the Mysql Database Server
Enable the mysql 5.0 database server. The standard root password of the mysql server is empty.

# svcadm enable -r  svc:/application/database/mysql
# svcs -a  | grep mysql

The database server should now be online.
It´s time to create the databases. The arrdb database structure is automaticaly created at the first start.

# /usr/mysql/bin/mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.67 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database pacsdb;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on pacsdb.* to 'pacs'@'localhost' identified by 'pacs';
Query OK, 0 rows affected (0.00 sec)

mysql> \q
Bye

# /usr/mysql/bin/mysql -upacs  -ppacs pacsdb </pacs/dcm4chee-mysql/sql/create.mysql

# /usr/mysql/bin/mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.67 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer

mysql>  create database arrdb;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on arrdb.* to 'arr'@'localhost' identified by 'arr';
Query OK, 0 rows affected (0.00 sec)

mysql> \q
Bye

Starting the Jboss-Dcm4chee Pacs System
Now it´s time to fire up the pacs system the first time with the run.sh command.
But before a small change in the first line of the run.sh file has to be made because the script did not work with the standard shell.
The bash should be used instead. The first line of the /pacs/dcm4chee-mysql/bin/run.sh file must look like this.

#!/usr/bin/bash

It´s also a good idea using bash for all of the commands above. Simple type bash into the putty terminal.
The Dcm4chee Pacs System should now be online and be available at following Urls with user admin and password admin.
http://ipaddressServer:8080/dcm4chee-web/
http://ipaddressServer:8080/jmx-console/
http://ipaddressServer:8080/web-console/

Starting the Jboss-Dcm4chee Pacs System with Solaris System Management Facility (SMF)
Bringing Jboss and Dcm4chee under control of the SMF System is the perfect way running the server stable.
Several steps are required. Starting Jboss in background is the key.
Infos about this feature is at http://www.jboss.org/community/docs/DOC-12306

  • Create a SMF XML Import file
  • Create a custom start/stop script
  • Alter the run.sh and save it under adifferent name
  • Import the XML file into smf and enable the service

Important points are the path and the df command which is used by the jboss system. Therefore the GNU-df command located in /usr/gnu/bin must be used.
Adjust all environment variables in runboss.sh and check if the JAVA_OPTS memory settings fits the system.

Copy files to the destinations.

  • jboss4.xml -> /var/svc/manifest/application
  • runjboss.sh -> /pacs/dcm4chee-mysql/bin
  • runjboss-solaris.sh -> /pacs/dcm4chee-mysql/binImport the XML file into SMF
    # svccfg import /var/svc/manifest/application/jboss4.xml
    
    Check the import
    # svcs -a | grep jboss
    disabled       14:33:28 svc:/application/jboss-dcm4chee:default
    
    Enable and start the Jboss Dcm4chee Pacs with SMF
    # svcadm enable jboss-dcm4chee
    
    Check the console Logs
    # tail  -f  /var/svc/log/application-jboss-dcm4chee\:default.log
    

Login with the web browser and do the pacs configuration and make some perfomance modifications ie. disable console logs.

http://forums.dcm4che.org/jiveforums/thread.jspa?messageID=4787

 

Downloads:
Shell Scripts
This Document in PDF