|
Nov
22
2009
|
|
Installing dcm4chee an Open Source PACS under Windows 7 with MySQL Database
|

dcm4chee is an open source PACS software that can be used for storing, managing and retrieving medical images It fully implements the DICOM protocol designed for healthcare. It is written in Java programming language for versatility and performance. It can run under Windows, Mac OS, and Linux. It supports different databases such as: PostgreSQL, MySQL, Oracle, SQL Server..etc
dcm4chee can be integrated with PACS workstation software or viewers such as: OsiriX, K-PACS, ClearCanvas…etc
Since many dental professionals use Windows as their primary operating system it would be easier to install dcm4chee under Windows. In addition, compression libraries such as JPEG 2000 LS are still not available under Windows 64 bit and Mac OS. So we will use 32bit version of Windows as our server’s operating system. We will be using Windows 7 since it is going to be the main stream operating system ; however, the tutorial should also work for Windows Vista or XP.
MySQL database is an open source database and it is used by millions of users. In fact, Marcilan is powered by MySQL database. So we will use MySQL as our main database. Enough talk and take me to the tutorial! !
In this tutorial we will go in details and step by step installation of dcm4chee under Windows 7 Professional 32 bit and using MySQL database.
Note: For full more detailed information for installation dcm4chee for different operating system and databases, please refer to the link here
Minimum System Requirements:
JDK 6 or higher
512 MB RAM
200 MB hard disk space (additional to archive storage disk space)
400 MHz CPU
Download:
- Download the latest binary of dcm4chee (currently v 2.14.7) from dcm4chee Source Forge repository. Select the version that matches the database we will be using dcm4chee-mysql-2.14.7.zip
- Download the binary distribution of JBoss Application Server 4.2.3.GA from their website (Do NOT download v5 as it is incompatible!)

After clicking the download button, select jboss-4.2.3.GA-jdk6 which is compatible with Java Development Kit v6 (JDK6)
- Download the latest binary distribution for MySQL from MySQL website. The current GA (Stable) version for production use is 5.1. Click on the link. Select Windows MSI installer.

You can register if you are interested in receiving updates or you can skip the registration process.
- Download Java Development Kit 6 (JDK6) from Sun website. Download JDK 6 update 17 under Java SE Development Kit.


You can register to receive latest updates or skip the registration process.

- Download the Audit Record Repository (ARR). The ARR maintains an audit log of all transactions within the archive. This is necessary for HIPAA and IHE. (If your country does not require HIPAA, you might want to skip this step). We will need to download the version that matches our database option (mysql). Download dcm4chee-arr-mysql-3.0.8.zip.

Installation:
1. Extracting the downloaded files and setting up the directories
Create a new folder in C:\ and rename it to apps. The directory path should look like this C:\apps
Copy jboss-4.2.3.GA-jdk6.zip, dcm4chee-mysql-2.14.7.zip and dcm4chee-arr-mysql-3.0.8.zip (if you have HIPAA or want to maintain ARR see step 5 of downloads above).
Extract all of them into separate categories. Do them one by one.

After you finish extraction all of them, go into each folder, select the folder you see, right click>Cut or CTRL+X and hit Backspace or move to the previous directory and right click>paste or CTRL+V. Windows will complain that the same folder name exist. Click Yes to proceed. This will save us time navigating in the command prompt (avoid double directories). Do this for jboss-4.2.3.GA-jdk6.zip, dcm4chee-mysql-2.14.7.zip and dcm4chee-arr-mysql-3.0.8.zip (if you require HIPAA or want to maintain ARR see step 5 of downloads above).

The final folder structure should look like this

2. Copy files from JBoss to DCM4CHEE
Copy files from JBoss to dcm4chee. Dcm4chee consists of components that run within the JBoss application server platform. This step will copy the JBoss runtime files to the dcm4chee directory. Make sure that the JBoss folder name in ‘C:\apps’ is ‘jboss-4.2.3.GA’ before you continue.
Navigate to: ‘C:\apps\dcm4chee-mysql-2.14.7\bin’
Type:
install_jboss.bat c:\apps\jboss-4.2.3.GA
3. Installing MySQL database and creating dcm4chee database
Install MySQL database and create dcm4chee database (Follow the screenshots)





You can select Standard Configuration or Detailed Configuration. For easier setup follow the Standard or select Detailed if you know what you are doing.

Check Install As Windows Service. This will allow MySQL to start automatically when Windows starts. Check also Include Bin Directory in Windows Path.

Put your root (administrator) password. Save this in a secure place! If you check Enable root access from remote machines, it will allow your IT admin or PACS admin to access the database remotely.


If you decide to go for Detailed Configuration. You will get the following screens. (Skip if you followed the Standard Configuration)
Since we will be running JBoss server and MySQL, we select: Server Machine



Select the option based on your concurrent number of users


If you are going to use non-latin characters like: Japanese, Chinese, Farsi…etc, select Best support for multilingualism otherwise select Standard Character set.

The rest is the same as in Standard installation.
Now we need to create a database for dcm4chee. To do so we initiate the pacsdb database instance using dcm4chee-mysql-2.14.7/sql/create.mysql
Go to command prompt and type:
mysql -uroot -p
Input your MySQL root password. Now you will get: mysql>

Type the following line by line including the ; at the end and press Enter key at the end of each line.
create database pacsdb; grant all on pacsdb.* to 'pacs'@'localhost' identified by 'pacs'; \q Then type: mysql -upacs -ppacs pacsdb < c:/apps/dcm4chee-mysql-2.14.7/sql/create.mysql

For more information, refer to dcm4chee MySQL database setup here
4. Deploy the Audit Record Repository (ARR)
Execute the command install_arr.bat in the command prompt in the bin directory of dcm4chee and include the path to dcm4chee-arr-3.0.8 as seen in the screenshot.
5. Installing Java Development Kit and Setting up the environment variable for JAVA_HOME to JDK location

To set up the environment variable to JDK location, right click on my computer>Properties>Advanced System Settings> Environment Variables




Here we are referring to the installed version of JDK 6 update 17. If you are using a different version go and check your program files under Java.

Click Ok. Now Reboot your Windows for changes (Environment variables) to take effect.
6. Launching DCM4CHEE
We are ready to test all the work we did previously. Go to command prompt again and navigate to dcm4chee-mysql-2.14.7/bin then execute run.bat
![]()
Allow access for Java through Windows Firewall

In the command prompt you will notice lines moving up quickly. (It might take a minute or two to finish loading). You shouldn’t see any errors like access denied or couldn’t create connection. Otherwise, something has gone wrong from the previous steps.

If everything is right you will see a window similar to this:

Check the last line. Started!!
7. Login into the web interface
Now keep the command prompt open. Open your web browser and go to http://localhost:8080/dcm4chee-web/
You should get dcm4chee web interface

Now for the username type: admin
and the password is also: admin
Click Log in.
Cross your fingers!

Congratulations! you just managed to install a web server, setup a database, and deploy a fully functional free PACS that can be used to interface with your Cone Beam CT (CBCT) machine, CT, MRI, ..etc and your viewing software in your imaging center or dental school for all your imaging needs.
In part 2 of the tutorial we will see how to make dcm4chee starts automatically with Windows to avoid the console window all together.
Print This Post
Email This Post
PDF Version
18 Comments :CBCT, cone beam ct, dcm4chee, DICOM, imaging center, jboss, open source, PACS


Reader comments (18)
Excellent job Wissam!!This is the first time a novice can install flawlessly dcm4chee !!An example to all of us
Hi!!! http://www.marcilan.com is one of the most excellent innovative websites of its kind. I enjoy reading it every day. http://www.marcilan.com rocks!
Gracias por los pdf estoy estudiando dcm4chee y son de utilidad.
Agradeazco sugerencias para entrar en el tema.
Well, I asked Wisam if it was possible to do this installatin steps in a windows 7 64 bit based system. He told me he hadn’t tried it, but if I like to do it to post my results here. Here they are:
I installed dcm4chee following these intructions but using 64 bit versions of mysql in a 64bit windows 7 computer. I used JDK 6 32 bit version, crossing my fingers that WOW (Windows on Windows) would work, in order to get JPEG2000 compression. The result: PERFECT! I have dcm4chee in a windows 7 64bit system working flaweslly, with compression of the images, which is just great. Hope this is useful information for any of you guys.
Thanks Wisam for this great guide!
Thanks Ben for sharing this. It will help other people who are running 64bit version of Windows. I’m glad it worked.
thanks for yours guide bat i have ani problem for installation,
(Now we need to create a database for dcm4chee. Per fare ciò si avvia l’istanza pacsdb database utilizzando dcm4chee-mysql-2.14.7/sql/create.mysql To do so we initiate the pacsdb database instance using dcm4chee-mysql-2.14.7/sql/create.mysql)
wrong command
What can I do?
Hi Salvo, you need to login to MySQL in order to use that command. You can’t do it directly from the command prompt. Start from here:
Go to command prompt and type:
mysql -uroot -p
Input your MySQL root password. Then enter the following commands:
create database pacsdb;
grant all on pacsdb.* to ‘pacs’@'localhost’ identified by ‘pacs’;
\q
Then type:
mysql -upacs -ppacs pacsdb < c:/apps/dcm4chee-mysql-2.14.7/sql/create.mysql
Good luck!
I have tried installing DCM4CHEE and now I am unable to login ( URL: http://localhost:8080/dcm4chee-web ).
In installation document on DCM4CHEE website, the username and password is mentioned ?admin? and ?admin?; which however is not working in my scenario.
I think, there is something wrong with configuration which I might have changed unintentionally.I have already checked the file login-config.xml at C:\apps\dcm4chee-mysql-2.14.7\server\default\conf .
This happened to me too when I first tried to install dcm4chee. The issue was the database for dcm4chee was not setup properly. If you check the console window (DOS or Command window) you will see error messages that can explain to you what went wrong. However, in my case, when I did the database steps it worked and the console window stopped showing error messages. So far many people managed to install dcm4chee successfully following the tutorial on this page.
dear Mr Wisam Al-Rawi
actually i m not seeing any kind of error in DOS or COMMAND prompt
however, i m seeing this page without any error ( URL: http://localhost:8080/dcm4chee-web ).
but the username and password is not accepting.
please guide
Hi, I know, this is exactly what happened to me. The page will load but when you put the default username and password they wont be accepted. The main reason for that is that the data base for dcm4chee is not setup properly so it doesn’t have the default username and password in the database. Please try to do the database setup again and test.
Read below:
Now we need to create a database for dcm4chee. To do so we initiate the pacsdb database instance using dcm4chee-mysql-2.14.7/sql/create.mysql
Go to command prompt and type:
mysql -uroot -p
Input your MySQL root password. Now you will get: mysql>
Type the following line by line including the ; at the end and press Enter key at the end of each line.
create database pacsdb;
grant all on pacsdb.* to ‘pacs’@'localhost’ identified by ‘pacs’;
\q
Then type:
mysql -upacs -ppacs pacsdb < c:/apps/dcm4chee-mysql-2.14.7/sql/create.mysql
Just make sure that in the line above you are referring to the correct path if you are using version other than 2.14.7 !
@Wisam Al-Rawi
i have done this step accurately and also check the database .
but after this step
mysql -upacs -ppacs pacsdb < c:/apps/dcm4chee-mysql-2.14.7/sql/create.mysql
i m seeing this error (although the path is valid).
The system cannot find the path specified.
please guide
Ok that’s good! Now we know what’s the problem and again it has to do with the database creation. The error message you’re getting tells you that the path is not correct. It is easy to find the path. Just go to Computer (or My computer in Windows XP) and navigate to C drive> then apps folder> then dcm4chee-mysql-2.14.7>then sql> now you should see a file called create.mysql. Since the path is not correct then one of those folders will have a different name. Once you get to creat.mysql file, copy the path from the top of the window by clicking on the empty space in the address bar to reveal the full path, then paste the path in the command window by right clicking and selecting Paste. Good luck.
This Tutorial is perfect! Thank you!
hi, i am having trobles to install dcm4chee.
when i type: grant all on pacsdb.* to ‘pacs’@’localhost’ identified by ‘pacs’;
i have gotten a error:
>[Error] Script lines: 1-1 ————————–
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘‘pacs’@’localhost’ identified by ‘pacs’’ at line 1
Warnings: —>
W (1): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘�pacs�@’localhost� identified by �pacs�’ at line 1
<—
[Executed: 23/06/10 9h23min22s BRT ] [Execution: 0/ms]
can anybody help me?
thanks .
You will need to check your previous steps, probably something that has to do with the creation of the database rather than the syntax.
Here are some instructions from Damien Evans (gunterze@gmail.com)
Changes (1)
…
h3. Adjust DB configuration if necessary
The database configuration information is contained within {{dcm4chee-mysql-2.13.6/server/default/deploy/pacs-mysql-ds.xml}}. {{dcm4chee-mysql-2.14.8/server/default/deploy/pacs-mysql-ds.xml}}. If you’re using a different database name, user name, etc., you’ll need to update this file.
Full Content
JDBC Driver
The MySQL JDBC driver is one of the ones included with the dcm4chee distributions. Feel free to update it if you need/want to.
Create the database
Initiate the pacsdb database instance using the DDL in dcm4chee-mysql-2.14.8/sql/create.mysql.
> mysql -uroot
mysql> create database pacsdb;
mysql> grant all on pacsdb.* to ‘pacs’@'localhost’ identified by ‘pacs’;
mysql> \q
> mysql -upacs -ppacs pacsdb < dcm4chee-mysql-2.14.8/sql/create.mysql
Adjust DB configuration if necessary
The database configuration information is contained within dcm4chee-mysql-2.14.8/server/default/deploy/pacs-mysql-ds.xml. If you’re using a different database name, user name, etc., you’ll need to update this file.
or Changes (2)
…
h3. Create the database
Initiate the {{pacsdb}} database instance using the DDL in {{dcm4chee-mysql-2.13.6/sql/create.mysql}}. {{dcm4chee-mysql-2.14.8/sql/create.mysql}}.
{noformat}
…
mysql> grant all on pacsdb.* to ‘pacs’@'localhost’ identified by ‘pacs’;
mysql> \q
> mysql -upacs -ppacs pacsdb < dcm4chee-mysql-2.13.6/sql/create.mysql dcm4chee-mysql-2.14.8/sql/create.mysql
{noformat}
...
Full Content
JDBC Driver
The MySQL JDBC driver is one of the ones included with the dcm4chee distributions. Feel free to update it if you need/want to.
Create the database
Initiate the pacsdb database instance using the DDL in dcm4chee-mysql-2.14.8/sql/create.mysql.
> mysql -uroot
mysql> create database pacsdb;
mysql> grant all on pacsdb.* to ‘pacs’@'localhost’ identified by ‘pacs’;
mysql> \q
> mysql -upacs -ppacs pacsdb < dcm4chee-mysql-2.14.8/sql/create.mysql
Adjust DB configuration if necessary
The database configuration information is contained within dcm4chee-mysql-2.13.6/server/default/deploy/pacs-mysql-ds.xml. If you’re using a different database name, user name, etc., you’ll need to update this file.
What do you think?