Installing Dcm4chee-arc-light-5.4.1-mysql Steps

Source: Internet
Author: User
Tags db2 ldap microsoft sql server postgresql psql redis in domain jboss


A Access URL:


Https://github.com/dcm4che/dcm4chee-arc-light/wiki/Installation


This is github above the steps, may be more difficult to understand, according to the steps to do, there may be a variety of problems, the author encountered in this list of problems, and give a solution.


Two Install the required environment:


1. JDK 1.8.0_91
2, Wildfly-10.0.0.final
3, mysql-5.7.12
4. Apache DS 2.0.0-M20
5. Apache Directory Studio 2.0.0-m9
Download of the above-mentioned tools and environment configuration is not more detailed here, if you need to know more details, please visit the corresponding official website.


Three Resource requirements


Binaries
https://sourceforge.net/projects/dcm4che/files/
I use this version of Dcm4chee-arc-5.4.1-mysql, of course, you can use other database version, if you use a different database, the second step of the database should be changed accordingly.


Four Set up a database


We select MySQL database:


1. Create a database and authorize users


> 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


2. Import the table to this database


Mysql-u <user-name>-p<user-password> <database-name> < $DCM 4chee_arc/sql/create-mysql.sql


Five Setting up an LDAP server


We chose Apache DS 2.0.0 server.


5.1 Install Apache DS 2.0.0-M20 and start service 5.2 install Apache Directory Studio 2.0.0-m9 and create an LDAP connection:


Network Parameter:
Hostname:localhost
port:10389
Authentication Parameter:
Bind DN or User:uid=admin,ou=system
Bind Password:secret


5.3 Importing LDAP schema files into Apache DS: 5.3.1 Import the LDIF file under Apacheds


$DCM 4chee_arc/ldap/apacheds/dicom.ldif
$DCM 4chee_arc/ldap/apacheds/dcm4che.ldif
$DCM 4chee_arc/ldap/apacheds/dcm4chee-archive.ldif
The import step is: Right-click this connection? import? LDIF Import, select the file to import.
Note: To strictly follow the above-mentioned files in order to import.


5.3.2 New Partition dc=dcm4che,dc=org


If you do not create this partition, follow the steps on GitHub to connect dc=dcm4che,dc=org will not find the partition problem, at this time, we should first in the Uid=admin,ou=system this connection
To create a new partition, proceed as follows:
(1) In this connection right-click Open configuration, switch to the Partitions option, add a partition with ID dcm4che,suffix to dc=dcm4che,dc=org
(2) Restart the Apacheds service before this partition appears. This time if a new connection is established to connect to this partition, Bind DN fill in dc=dcm4che,dc=org, Password: Secret, there will be a validation failure problem, because dcm4che,dc=org's password is not secret, This time we need to add the user password for this partition, add the steps:
① Find $dcm4chee_arc/ldap/init-basedn.ldif, add an attribute at the end of this file Userpassword:secret
② Import this LDIF file, there will be entry existing problems, this time need to delete dc=dcm4che,dc=org this entry, delete and then import, will succeed.
5.3.3 importing an LDIF file under LDAP
$DCM 4chee_arc/ldap/init-config.ldif
$DCM 4chee_arc/ldap/default-config.ldif
$DCM 4chee_arc/ldap/add-vendor-data.ldif
$DCM 4chee_arc/ldap/sample-config.ldif


The import method is the same as 5.3.1.


Six Import the default configuration in Dcm4chee-arc-light to the LDAP server 6.1 Create a new LDAP connection:


Network Parameter:
Hostname:localhost
port:10389
Authentication Parameter:
Bind DN or user:dc=dcm4che,dc=org
Bind Password:secret
Browser Options:
Base dn:dc=dcm4che,dc=org
Of course, the port number can also use the 389 given by GitHub, which requires you to create an LDAP server, right-click in the LDAP Servers view? New? New server, select ApacheDS 2.0.0 Click Finish, open the configuration view, select the Overview tab, change the port number to 389,306, start this server.


6.3 Importing an LDIF file under LDAP


$DCM 4chee_arc/ldap/init-config.ldif
$DCM 4chee_arc/ldap/sample-config.ldif
$DCM 4chee_arc/ldap/default-config.ldif
$DCM 4chee_arc/ldap/add-vendor-data.ldif


If the 5.3.3 has been imported, there is no need to import it here. The import method is the same as 5.3.1.


6.4 Configuration Archive AE title (s) 6.4.1 can refer to this article: change the default AE title (s) of the Archive


Here we choose the first method:
Create an LDIF file named Aetitle.ldif with the following file contents:
Version:1
# LDIF for modifying the AE Title of the Archive
# Adjust Base DN (dc=dc=dcm4che,dc=org), Device name (DCM4CHEE-ARC), previous AE Title (Dcm4chee),
# New AE Title (my_ae) before import it into the LDAP server
Dn:dicomaetitle=dcm4chee,dicomdevicename=dcm4chee-arc,cn=devices,cn=dicom configuration,dc=dcm4che,dc=org
Changetype:moddn
Newrdn:dicomaetitle=my_ae
Deleteoldrdn:1
Newsuperior:dicomdevicename=dcm4chee-arc,cn=devices,cn=dicom configuration,dc=dcm4che,dc=org
Import this file with the same import method as 5.3.1.


6.5 Changing the default storage path 6.5.1 can refer to this article: Change the defaults Storage Directory:


We choose the second method:
Create an LDIF file named Storage-directory.ldif with the following file contents:
Version:1
Dn:dcmstorageid=fs1,dicomdevicename=dcm4chee-arc,cn=devices,cn=dicom configuration,dc=dcm4che,dc=org
Changetype:modify
Replace:dcmuri
dcmuri:file:///d:/dcm4chee-arc/fs1/
The author chooses d, if you want to use a different disk can be changed to the corresponding drive letter, of course, the path can also be customized.


6.6 Configure the External dicom application AE title (s) to determine which Archive is allowed to be connected 6.6.1 can refer to this article: Configure AE title (s) of external DICOM applications

The tuning $dcm4chee_arc/ldap/sample-device.ldif file can be configured. The contents of this file are:
Version:1
# LDIF for adding a Device providing one application Entity available on one Network connection
# Adjust Base DN (dc=dcm4che,dc=org), Device name (sample_device), AE Title (Sample_aet),
# Hostname (sample.host.name) and Port number before import it into the LDAP server


# Unique AE Title
# (would fail if there is already a object for the same AE Title)
Dn:dicomaetitle=sample_aet,cn=unique AE Titles registry,cn=dicom configuration,dc=dcm4che,dc=org
Objectclass:dicomuniqueaetitle
Dicomaetitle:sample_aet


# Device
Dn:dicomdevicename=sample_device,cn=devices,cn=dicom configuration,dc=dcm4che,dc=org
Objectclass:dicomdevice
Dicomdevicename:sample_device
Dicominstalled:true


# Network Connection
Dn:cn=dicom,dicomdevicename=sample_device,cn=devices,cn=dicom configuration,dc=dcm4che,dc=org
Objectclass:dicomnetworkconnection
Cn:dicom
DicomHostname:sample.host.name
dicomport:12345


# Network Connection (Secure)
# dn:cn=dicom-tls,dicomdevicename=sample_device,cn=devices,cn=dicom Configuration,dc=dcm4che,dc=org
# CN:DICOM-TLS
# objectclass:dicomnetworkconnection
# DicomHostname:sample.host.name
# dicomport:23456
# Dicomtlsciphersuite:tls_rsa_with_aes_128_cbc_sha
# Dicomtlsciphersuite:ssl_rsa_with_3des_ede_cbc_sha


# Network Application Entity
Dn:dicomaetitle=sample_aet,dicomdevicename=sample_device,cn=devices,cn=dicom Configuration,dc=dcm4che,dc=org
Objectclass:dicomnetworkae
Dicomaetitle:sample_aet
Dicomnetworkconnectionreference:cn=dicom,dicomdevicename=sample_device,cn=devices,cn=dicom Configuration,dc= dcm4che,dc=org
# dicomnetworkconnectionreference:cn=dicom-tls,dicomdevicename=sample_device,cn=devices,cn=dicom Configuration, dc=dcm4che,dc=org
Dicomassociationinitiator:true
Dicomassociationacceptor:true

Seven Set Wildfly Server 7.1 to copy the configuration file to the Wildfly installation path:


> Cp-r $DCM 4chee_arc/configuration/dcm4chee-arc $WILDFLY _home/standalone/configuration [UNIX]
> xcopy%dcm4chee_arc%\configuration\dcm4chee-arc%wildfly_home%\standalone\configuration [Windows]


This time you need to modify the Ldap.properties file
Change java.naming.security.principal=cn=admin,dc=dcm4che,dc=org to:
java.naming.security.principal=dc=dcm4che,dc=org
If the connection port number you established above is 10389, you need to change the port number of the Java.naming.provider.url to 10389


7.2 Adding a Dcm4chee-arc configuration file


> CD $WILDFLY _home/standalone/configuration/
> CP standalone-full.xml Dcm4chee-arc.xml
can be copied manually


7.3 Installing the Dcm4chee-arc-light Library as a JBOSS component


> CD $WILDFLY _home
> Unzip $DCM 4chee_arc/jboss-module/dcm4che-jboss-modules-5.x-dcm4chee-arc-light.zip
Unzip the $dcm4chee_arc/jboss-module/dcm4che-jboss-modules-5.x-dcm4chee-arc-light.zip to the Wildfly root directory.


can also be extracted first, the modules/org below the Dcm4che copy to%wildfly_home%\modules\org below


7.4 Installing the Jai Image IO 1.2 library as a JBoss component


> CD $WILDFLY _home
> Unzip $DCM 4chee_arc/jboss-module/jai_imageio-jboss-modules-1.2-pre-dr-b04.zip
You can also manually unzip and copy to the appropriate path.


7.5 Installing the QUERYDSL 3.2.3 Library as a JBoss component


> CD $WILDFLY _home
> Unzip $DCM 4chee_arc/jboss-module/querydsl-jboss-modules-4.0.3-noguava.zip
You can also manually unzip the copy to the appropriate path


7.6 Installing the Jclouds 1.8.1 Library as a JBoss component


> CD $WILDFLY _home
> Unzip $DCM 4chee_arc/jboss-module/jclouds-jboss-modules-1.9.1-noguava.zip
You can also manually unzip the copy to the appropriate path


7.7 Download the appropriate JDBC driver 7.7.1 to select the appropriate driver based on the database of your choice


The author uses the Module.xml configuration file under Mysql,jdbc-jboss-modules-1.0.0-mysql.zip to use the 5.1.36 version, the author uses the 5.1.39, in http://dev.mysql.com/ downloads/connector/j/Download the Mysql-connector-java-5.1.39-bin.jar file. You can also download other versions, open the URL: https://downloads.mysql.com/archives/c-j/Select a different version. There may be version incompatibility issues, please make appropriate adjustments according to the actual situation.


7.7.2 Installing the JDBC Driver


There are two ways to install: deployment and core components.
See this two-way installation step, which we chose here as the core component of this way.


7.7.2.1 Create a directory structure under Jboss_home/modules


(1) The directory structure is Jboss_home/modules/com/mysql/main
(2) in the main directory, create a new Module.xml file:
<?xml version= "1.0" encoding= "UTF-8"?>
<module xmlns= "urn:jboss:module:1.1" name= "Com.mysql" >
<resources>
<resource-root path= "Mysql-connector-java-5.1.39-bin.jar"/>
<!--<resource-root path= "Mysql-license.jar"/>--
</resources>


<dependencies>
<module name= "Javax.api"/>
<module name= "Javax.transaction.api"/>
</dependencies>
</module>


Of course, you can also copy the $dcm4che-arc\jboss-modules\jdbc-jboss-modules-1.0.0-mysql.zip extracted module.xml files to this path
(3) To download the JDBC driver
Mysql-connector-java-5.1.39-bin.jar Copy to Jboss_home/modules/com/mysql/main below


(4) Verify that the JDBC driver file name and path (s) in the Module.xml are consistent and consistent.
The Resource-root property can have more than one.


7.8 start WildFly in standalone mode with the appropriate 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_91\bin\java"


Java_opts: "-dprogram.name=standalone.bat-xms64m-xmx512m-xx:metaspacesize=96m-xx:maxmetaspacesize=256m-djava.ne t.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.Fin AL) starting
:
09:22:54,094 INFO [org.jboss.as] (Controller Boot Thread) wflysrv0025:wildfly full 10.0.0.Final (WildFly Core 2.0.10.Fin AL) started in 28397ms-started 1839 of 2270 Services (683 services is lazy, passive or on-demand)


JBoss running in domain mode should work correctly, but not yet tested.

7.9 Open a new console window and use the JBoss CLI to add the JDBC driver to the server configuration


> $WILDFLY _home/bin/jboss-cli.sh-c [UNIX]
>%wildfly_home%\bin\jboss-cli.bat-c [Windows]
[Email protected]:9999/]/subsystem=datasources/jdbc-driver=<driver-name>:add (driver-name=<driver-name >,driver-module-name=<module-name>)


For the JDBC driver name,<driver-name> can be arbitrary,<module-name> must be consistent with the name defined in the definition file module.xml of the JDBC driver, we define "Com.mysql" so:


[Email protected]:9999/]/subsystem=datasources/jdbc-driver=mysql:add (driver-name=mysql,driver-module-name= Com.mysql)


7.10 using the JBoss CLI to create a new data source bound to Java:/pacsds JNDI

[[Email protected]:9999/] Data-source add--NAME=PACSDS \
>--driver-name=<driver-name> \
>--connection-url= jdbc:mysql://>--jndi-name=java:/pacsds \
>--user-name=pacsdb \
>--password=pacsdb
[[Email protected]: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://? Postgresql:jdbc:postgresql://? Firebird:jdbc:firebirdsql:? Db2:jdbc:db2://? Oracle:jdbc:oracle:thin:@ ? Microsoft SQL server:jdbc:sqlserver:// You can also use CLI script $dcm4chee_arc/cli/add-data-source-<db>.cli, which has two commands, one that adds a JDBC driver, and one that creates a data source. We have to replace the actual value (the database created by step four) before execution
> $WILDFLY _home/bin/jboss-cli.sh-c-F $DCM 4chee_arc/cli/add-data-source-<db>.cli

7.11 Create a JMS queue using the JBoss CLI:


[[Email protected]:9990/] Jms-queue add--QUEUE-ADDRESS=STGCMTSCP--ENTRIES=JAVA:/JMS/QUEUE/STGCMTSCP
[[Email protected]:9990/] Jms-queue add--queue-address=mppsscu--entries=java:/jms/queue/mppsscu
[[Email protected]:9990/] Jms-queue add--queue-address=ianscu--entries=java:/jms/queue/ianscu
[[Email protected]:9990/] Jms-queue add--queue-address=export1--entries=java:/jms/queue/export1
[[Email protected]:9990/] Jms-queue add--queue-address=export2--entries=java:/jms/queue/export2
[[Email protected]:9990/] Jms-queue add--queue-address=export3--entries=java:/jms/queue/export3


This also has the CLI script $DCM 4chee_arc/cli/add-jms-queues.cli, which contains the command line,
We just need to do:
> $WILDFLY _home/bin/jboss-cli.sh-c-F DCM4CHEE_ARC/CLI/ADD-JMS-QUEUES.CLI


7.12 Tuning the Managed-executor-services configuration using the JBoss CLI


[Email protected]:9990/]/subsystem=ee/managed-executor-service=default:undefine-attribute (name= Hung-task-threshold)
[Email protected]:9990/]/subsystem=ee/managed-executor-service=default:write-attribute (name=long-running-tasks , value=true)
[Email protected]:9990/]/subsystem=ee/managed-executor-service=default:write-attribute (name=core-threads,value =2)
[Email protected]:9990/]/subsystem=ee/managed-executor-service=default:write-attribute (name=max-threads,value= 100)
[Email protected]:9990/]/subsystem=ee/managed-executor-service=default:write-attribute (name=queue-length,value =0)


7.13 using the JBoss CLI to specify a different Device Name through the system property


Dcm4chee Archive 5.x The default device name is Dcm4chee-arc, which is configured in the LDAP server to specify a different device name through the system property (this step can also not be performed)
[Email protected]:9999/]/system-property=dcm4chee-arc. Devicename:add (value=<device-name>)


7.14 Deploying Dcm4chee Archive 5.x7.14.1 Deployment using the JBoss CLI

[[Email protected]:9999/] Deploy $DCM 4chee_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--) wflyut0021:registered Web context: /dcm4chee-arc
11:00:43,095 INFO [Org.wildfly.extension.undertow] (Serverservice Thread Pool--) 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 ")


7.14.2 Verify that the Web UI was accessible at


Http://localhost:8080/dcm4chee-arc/ui.


7.14.3 Undeploy Dcm4chee Archive at any time using the JBoss CLI, e.g.:



[Email protected]:9999/] Undeploy dcm4chee-arc-ear-5.x-psql.ear


11:05:23,905 INFO [Org.wildfly.extension.undertow] (Serverservice Thread Pool--) wflyut0022:unregistered web context :/dcm4chee-arc
11:05:23,906 INFO [Org.wildfly.extension.undertow] (Serverservice Thread Pool--) 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 ")




Here dcm4chee-arc-light-5.4.1 installation is complete!


Installing Dcm4chee-arc-light-5.4.1-mysql Steps


Alibaba Cloud Hot Products

Elastic Compute Service (ECS) Dedicated Host (DDH) ApsaraDB RDS for MySQL (RDS) ApsaraDB for PolarDB(PolarDB) AnalyticDB for PostgreSQL (ADB for PG)
AnalyticDB for MySQL(ADB for MySQL) Data Transmission Service (DTS) Server Load Balancer (SLB) Global Accelerator (GA) Cloud Enterprise Network (CEN)
Object Storage Service (OSS) Content Delivery Network (CDN) Short Message Service (SMS) Container Service for Kubernetes (ACK) Data Lake Analytics (DLA)

ApsaraDB for Redis (Redis)

ApsaraDB for MongoDB (MongoDB) NAT Gateway VPN Gateway Cloud Firewall
Anti-DDoS Web Application Firewall (WAF) Log Service DataWorks MaxCompute
Elastic MapReduce (EMR) Elasticsearch

Alibaba Cloud Free Trail

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.