Auto install Script for DCM4CHEE-ARC-LIGHT-5.10.3 MYSQL Secure UI

7,546 views
Skip to first unread message

Paolo Marcheschi

unread,
Jun 16, 2017, 9:17:17 AM6/16/17
to dcm...@googlegroups.com, alci...@gmail.com
Hi

As promised I'd like to share our (Me and Alessio Ciregia) effort in creating an Auto install script for DCM4CHEE-ARC-LIGHT-5.10.3 MYSQL Secure UI .

This is a bash script, derived from the beautiful script I got from  Marko Script and from Dockerfiles published by j4care.


It is intended for installation of Dcm4Chee on Ubuntu 16.04 Linux , it works also on Joyent Smartos Lxbrand Image, can be adapted to other distributions.

Included in the package are present also 2 scripts to  Start and Stop dcm4chee.

This is the first tentative, and the script is not polished, but it seems to work, there is a lot of space for improvement, and correction are welcome.

----Instructions---
It must be installed by root, download and decompress the attached shar file to your /root folder
You must have an internet connection, because it downloads a lot from the net.


Install shar utils
apt-get install sharutils

bash run_me.sh
x - created directory Downloads.
x - extracting Downloads/pacs_start.sh (text)
x - extracting Downloads/pacs_stop.sh (text)
x - extracting install_dcm4chee5_cli_5.10.3.sh (text)
uudecoding file install_dcm4chee5_cli_5.10.3.sh
x - removed lock directory _sh25000.

chmod +x install_dcm4chee5_cli_5.10.3.sh

./
install_dcm4chee5_cli_5.10.3.sh

Press enter when asked.


At the end there are some instruction, and hopefully ,  you will have the server (dcm4chee 5.10.3 Mysql secure ui) installed and running.

Best regards

Paolo Marcheschi

Alessio Ciregia


 
run_me.sh.xz

Семён Дунаев

unread,
Jun 22, 2017, 7:07:37 AM6/22/17
to dcm4che, alci...@gmail.com
Many thx!!!

пятница, 16 июня 2017 г., 18:17:17 UTC+5 пользователь Paolo Marcheschi написал:

Paolo Marcheschi

unread,
Jun 23, 2017, 5:35:34 AM6/23/17
to dcm4che, alci...@gmail.com
Hi
I'm happy it is useful
Thank you
Paolo

Marcel Nóbrega

unread,
Jun 23, 2017, 1:01:24 PM6/23/17
to dcm4che, alci...@gmail.com
Thanks!! I`ll give it a try.


Do you know the disc space of the Ubuntu OS + the script install?






Em sexta-feira, 16 de junho de 2017 10:17:17 UTC-3, Paolo Marcheschi escreveu:
Hi

.... 

HM

unread,
Jun 23, 2017, 3:26:04 PM6/23/17
to dcm4che, alci...@gmail.com
Can you please also share install script for windows based machine also..

--HM

Paolo Marcheschi

unread,
Jun 26, 2017, 4:57:28 AM6/26/17
to dcm4che, alci...@gmail.com
Hi HM
I'm sorry but we do not have such script,

we are trying to avoid Windows .

Paolo

Paolo Marcheschi

unread,
Jun 26, 2017, 5:01:50 AM6/26/17
to dcm4che, alci...@gmail.com
Hi Marcel

 I installed it in a Virtual machine with 8 GB RAM and 10 GB Hard disk, you can try also with less RAM
But you need more Hard disk space for images if you are going to do a real install.

Paolo

NKD

unread,
Jun 26, 2017, 6:26:31 AM6/26/17
to dcm...@googlegroups.com, dcm4che, alci...@gmail.com
Hello,

Can you tell us more about thing to avoid windows? Is there a security concern?

Regards,

Nana

Sent from TypeApp

Paolo Marcheschi

unread,
Jun 26, 2017, 8:10:27 AM6/26/17
to dcm4che, alci...@gmail.com
Hi Nana
I do not want to make a flame war of unix against windows.
This is more a feeling I have, to avoid a platform, on servers, that historically has had a lot of problems, and had a major problem recently.
windows is not open-source, and I have to pay for a big license in order to install a single virtual machine, with Unix I have the freedom to experiment without worries.
With the same money I can pay for extra hardware or services from IT professionals that can increment my knowledge.
On the other end I do not know the windows system very much, I was an early adopter of Linux Soft Landing System and since 1993 I use Unix for all my line of work.
Where I work we use a mix of Unix flavors  distributed uniformly.

Best regards
Paolo

NKD

unread,
Jun 26, 2017, 8:42:22 AM6/26/17
to dcm4che, dcm4che, alci...@gmail.com
Thanks Paolo..I just found out openclinic last week and through my reading found weasis and dcm4che. Is there a way to install openclinic & dcm4che in a network environment? I installed both on my desktop (windows 10) but I can't log into either from my laptop using the browser and ipaddress/openclinic of the desktop.

Anyone out here well-versed in windows to help out?

Sent from TypeApp

Marcel Nóbrega

unread,
Jun 30, 2017, 6:33:08 AM6/30/17
to dcm4che, alci...@gmail.com
Hi, Paolo.


I tried your script in a fresh ubuntu install, but ended up with a 404 error when I try to access dcm4 addresses. Wildfly and keycloak seem to be running and there is a dcm4chee realm in keycloack.

Any suggestion on how can I troubleshoot?



 

Em sexta-feira, 16 de junho de 2017 10:17:17 UTC-3, Paolo Marcheschi escreveu:

Paolo Marcheschi

unread,
Jun 30, 2017, 7:18:17 AM6/30/17
to dcm4che, alci...@gmail.com
Hi Marcel

This is one of the error I have solved , I think that the main dcm4chee-arc-light  ear package is not deployed or the name is different to the one declared in the dcm4chee-arc.xml file.
Can you check that.

Paolo

Paolo Marcheschi

unread,
Jun 30, 2017, 7:28:16 AM6/30/17
to dcm4che, alci...@gmail.com
Hi
It is strange, but now I did a fresh install with the same script and it works fine. On a new ubuntu VM.

One of the prerequisites in my domain is that the ubuntu server have a fully qualified name
after a fresh install of ubuntu
do something like this:
echo "name.yourdomain.es" > /etc/hostname
hostname -F /etc/hostname
and reboot

Paolo

Marcel Nóbrega

unread,
Jul 1, 2017, 5:34:44 PM7/1/17
to dcm4che, alci...@gmail.com

Actually, I solved the problema installing the "curl" command, that wasnt available in a clean 16.04 ubuntu install..

This may be a silly question, but when I get to the http://localhost:8080/dcm4chee-arc/ui2  

There is a keycloack DCM4CHE page asking for username and password. I cant get it to authenticate anything.

Paolo Marcheschi

unread,
Jul 2, 2017, 6:48:09 AM7/2/17
to dcm...@googlegroups.com
Here it Is :
admin/admin
Paolo

--
You received this message because you are subscribed to a topic in the Google Groups "dcm4che" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dcm4che/NNxvs0b8aTg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dcm4che+unsubscribe@googlegroups.com.
To post to this group, send email to dcm...@googlegroups.com.
Visit this group at https://groups.google.com/group/dcm4che.
For more options, visit https://groups.google.com/d/optout.

jmlore...@gmail.com

unread,
Jul 13, 2017, 3:49:34 PM7/13/17
to dcm4che, alci...@gmail.com
Hi, 

I tried it in a VM with a fresh Ubuntu 16.04.

It worked fine the time I installed it (I had the problem with the login/pass there, but it was running), but now I can't find the pacs_start.sh nor the  pacs_stop.sh files.

I tried to run the script again but it says they were already created. 

I deleted the Downloads directory and run it again, it still skips the file creation.

(I had to delete the Downloads directory before during installation because it said the Downloads directory already existed and stopped there)

I searched everywhere but still can't find them.

Help?

Marcel Nóbrega

unread,
Jul 13, 2017, 4:01:22 PM7/13/17
to dcm4che, alci...@gmail.com
Look at:

/usr/local/bin/pacs_start.sh


How did you worked out the login/pass issue??

Jéssica Lorencetti

unread,
Jul 13, 2017, 4:07:16 PM7/13/17
to dcm...@googlegroups.com
Still not there :/

I tried admin/admin and it worked?
I just looked if I could access it though, didn't try to do much more.
I remember trying to play a little with the "radiologia" login, but didn't try to do much.

--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+unsubscribe@googlegroups.com.

Asok E K

unread,
Jul 27, 2017, 1:09:37 AM7/27/17
to dcm4che, alci...@gmail.com
Hi Paolo,


Installed on fresh ubuntu 16.04.

Wildfly and keycloak is working but getting Forbidden error  on http://localhost:8080/dcm4chee-arc/ui2 .

How can i troubleshoot ?

Regards,
Asok

Shaiju Thomas

unread,
Jul 27, 2017, 2:36:25 AM7/27/17
to dcm4che, alci...@gmail.com
Hi Paulo,

How can we enable the JMX-console in this version?

Thanks,
shaiju


On Friday, June 16, 2017 at 6:47:17 PM UTC+5:30, Paolo Marcheschi wrote:

Paolo Marcheschi

unread,
Jul 27, 2017, 6:09:43 AM7/27/17
to dcm4che, alci...@gmail.com
Hi there was a change in version , and you have to correct the install script line around 120

substitute  the line
sed -i s#5\.10\.4#$DCMARCVER#  $DOWNLOADSDIR/dcm4chee-arc.xml # cambia 10.4 in dcmarcver
with
sed -i s#5\.10\.5#$DCMARCVER#  $DOWNLOADSDIR/dcm4chee-arc.xml # cambia 10.5 in dcmarcver

Paolo

Paolo Marcheschi

unread,
Jul 27, 2017, 6:10:55 AM7/27/17
to dcm4che, alci...@gmail.com
Hi
There is NO jmx-console  in this version.
you have to use the web interface or the LDAP directly.

Greetings
Paolo

Balachandran M

unread,
Jul 30, 2017, 5:26:14 PM7/30/17
to dcm4che, alci...@gmail.com
Dear Paolo,

                I've tried to change the line 120 but still it is giving the forbidden error. Please help!

Tran Tien Hung

unread,
Aug 1, 2017, 3:17:33 AM8/1/17
to dcm...@googlegroups.com, alci...@gmail.com
I had status Forbidden when login to  http://192.168.222.11:8080/dcm4chee-arc/ui2

In  dcm4chee-arc.xml  I changed    <secure-deployment name="dcm4chee-arc-ui2-5.10.5-secure.war">  to   <secure-deployment name="dcm4chee-arc-ui2-5.10.4-secure.war">

Now is ok,

Thanks


Vào 20:17:17 UTC+7 Thứ Sáu, ngày 16 tháng 6 năm 2017, Paolo Marcheschi đã viết:

Balachandran M

unread,
Aug 5, 2017, 1:32:32 PM8/5/17
to dcm4che, alci...@gmail.com
Great! Thanks!  now working for me.

Thakrar Amit

unread,
Aug 22, 2017, 6:42:25 AM8/22/17
to dcm4che, alci...@gmail.com
Hey Paolo

error occurred in this script ERROR is : run_me.sh:line762: uudecode :command not found
restore of dcm4chee_cli_5.10.3.sh failed

please help me 

On Friday, June 16, 2017 at 6:47:17 PM UTC+5:30, Paolo Marcheschi wrote:

Paolo Marcheschi

unread,
Aug 24, 2017, 11:54:35 AM8/24/17
to dcm4che, alci...@gmail.com
Hi you have to install sharutils
apt-get install sharutils
Paolo

Igor Shalbarov

unread,
Aug 25, 2017, 7:18:18 AM8/25/17
to dcm...@googlegroups.com, alci...@gmail.com

Hi Paolo,

1 issue comes up for me in the end of the script:

Starting Wildfly to import DCM4CHE REALM ...
sed: can't read /root/Downloads/dcm4che-realm.
json: No such file or directory
cp: cannot stat '/root/Downloads/dcm4che-
realm.json': No such file or directory

Server does not start up after script is over.
Any advise?

Thanks in advance,
Igor


Update:
Looks like this part is not properly runs from the script (line 314):
# install new version of  dcm4che-realm.json from github
if [ -e "dcm4che-realm.json " ]; then
    echo -e "\n $SY dcm4che-realm.json  already downloaded, skipping download... $SD"
else
    echo -e "\n $SG Downloading dcm4che-realm.json ... $SD"
    $WGET  $DCMREALM


looking at the terminal output it just skips getting the json file from GitHub:

 Downloading dcm4che-realm.json ...

 cd /opt/dcm4chee-arc-light/wildfly  ...

Any idea what is wrong?


fleetwoodfc

unread,
Aug 25, 2017, 8:14:15 AM8/25/17
to dcm4che, alci...@gmail.com
The script uses:

Igor Shalbarov

unread,
Aug 25, 2017, 11:26:19 AM8/25/17
to dcm4che, alci...@gmail.com
unfortunately - no dice.
wildfly starts and then exits immediately


Maybe someone has a working Virtual Appliance to share with the current version? Last one online is from 2011, and not really working as designed.

M Hung

unread,
Aug 26, 2017, 10:48:38 PM8/26/17
to dcm4che, alci...@gmail.com
Now DCM4CHEE Archive is 5.10.5,  Scrip deploy dcm4chee-arc-ear-5.10.5-mysql-secure-ui.ear  not successfull.

I try manually deploy, it report error below:

Cannot upload deployment: {"WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.PacsDS"],"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"dcm4chee-arc-ear-5.10.5-mysql-secure-ui.ear#dcm4chee-arc\" is missing [jboss.naming.context.java.PacsDS]","jboss.persistenceunit.\"dcm4chee-arc-ear-5.10.5-mysql-secure-ui.ear#dcm4chee-arc\".__FIRST_PHASE__ is missing [jboss.naming.context.java.PacsDS]"]}


Please help!



Vào 22:54:35 UTC+7 Thứ Năm, ngày 24 tháng 8 năm 2017, Paolo Marcheschi đã viết:

Thakrar Amit

unread,
Aug 29, 2017, 1:14:44 AM8/29/17
to dcm4che, alci...@gmail.com
hello everyone,

i have installed dcm4chee in VirtualBoxusing this script but after installation done there is some error occurred with "radiologia" user
i have attached server log snap please help me for the same

Thanks in advance

  




 

sonu ahamad

unread,
Aug 29, 2017, 10:09:53 AM8/29/17
to dcm4che, alci...@gmail.com


 Dear Sir i m installing dcm4chee in ubantu  but But is not running pls.. help me plese tell me easy process  ples... Sir

.... 

Thakrar Amit

unread,
Sep 7, 2017, 8:39:44 AM9/7/17
to dcm4che
hi


i have installed dcm4chee in Virtual Box using  this script
after installation done, Wildfly server is working fine but http://localhost:8080/dcm4chee-arc/ui2 OR http://localhost:8080/dcm4chee-arc/ui  is not working
please help me for the same.
1.png

rschiec...@gmail.com

unread,
Sep 8, 2017, 4:25:49 PM9/8/17
to dcm4che
I'm receiving the same error.

Luciano G. Vaz

unread,
Oct 10, 2017, 10:01:09 AM10/10/17
to dcm4che
Hi All, may i help to found this error

root@srvdcm:~/Downloads/Downloads# ./pacs_start.sh
PACS USER: XUMODIFYMEX
id: ‘XUMODIFYMEX’: no such user
UserID:

Starting Wildfly ...
./pacs_start.sh: line 12: XWMODIFYMEX/standalone/log/server.log: No such file or directory

Wildfly started, log is in XWMODIFYMEX/standalone/log/server.log
root@srvdcm:~/Downloads/Downloads#

Thanks a lot
,.







 

Luciano G. Vaz

unread,
Oct 10, 2017, 2:49:19 PM10/10/17
to dcm4che



  Hi

     Try to install to freash ubuntu 16.04 but....

    during install appers mensage

    Starting Wildfly to import DCM4CHE REALM ...
   sed: can't read /home/luciano/Downloads/dcm4che-realm.json: No such file or directory
   cp: cannot stat '/home/luciano/Downloads/dcm4che-realm.json': No such file or directory

   (this json file didnt existe on my folder)

    Its easy to fix problem ??

Thanks
Message has been deleted

Morten Borchorst

unread,
Nov 4, 2017, 12:04:25 PM11/4/17
to dcm4che
I have tried to install the newest version but the server doesn't start, I also think it could be sue to a missing .json file in the download directory.
Is there an easy way of handling this, or should a version 2.18 be preferred in a production setting?
Greetings
Morten

Alvaro G. [Andor]

unread,
Nov 5, 2017, 5:39:05 PM11/5/17
to dcm...@googlegroups.com
Make sure you install the package named 'sharutils', as instructed.

Nivaldo Bueno

unread,
Jan 17, 2018, 1:46:58 PM1/17/18
to dcm4che
I am trying to install by this script but I always get the message when I run the application, some suggestion


=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /opt/dcm4chee-arc-light/wildfly

  JAVA: /usr/lib/jvm/java-8-oracle/bin/java

  JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true

=========================================================================

16:21:26,699 INFO  [org.jboss.modules] (main) JBoss Modules version 1.5.2.Final
2018-01-17 16:21:26,699 INFO  [org.jboss.modules] (main) JBoss Modules version 1.5.2.Final
16:21:27,049 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
2018-01-17 16:21:27,049 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
16:21:27,204 INFO  [org.jboss.as] (MSC service thread 1-7) WFLYSRV0049: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) starting
2018-01-17 16:21:27,204 INFO  [org.jboss.as] (MSC service thread 1-7) WFLYSRV0049: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) starting
2018-01-17 16:21:27,207 DEBUG [org.jboss.as.config] (MSC service thread 1-7) Configured system properties:
        [Standalone] =
        awt.toolkit = sun.awt.X11.XToolkit
        file.encoding = UTF-8
        file.encoding.pkg = sun.io
        file.separator = /
        java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
        java.awt.headless = true
        java.awt.printerjob = sun.print.PSPrinterJob
        java.class.path = /opt/dcm4chee-arc-light/wildfly/jboss-modules.jar
        java.class.version = 52.0
        java.endorsed.dirs = /usr/lib/jvm/java-8-oracle/jre/lib/endorsed
        java.ext.dirs = /usr/lib/jvm/java-8-oracle/jre/lib/ext:/usr/java/packages/lib/ext
        java.home = /usr/lib/jvm/java-8-oracle/jre
        java.io.tmpdir = /tmp
        java.library.path = /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
        java.net.preferIPv4Stack = true
        java.runtime.name = Java(TM) SE Runtime Environment
        java.runtime.version = 1.8.0_151-b12
        java.specification.name = Java Platform API Specification
        java.specification.vendor = Oracle Corporation
        java.specification.version = 1.8
        java.util.logging.manager = org.jboss.logmanager.LogManager
        java.vendor = Oracle Corporation
        java.vendor.url = http://java.oracle.com/
        java.vendor.url.bug = http://bugreport.sun.com/bugreport/
        java.version = 1.8.0_151
        java.vm.info = mixed mode
        java.vm.name = Java HotSpot(TM) 64-Bit Server VM
        java.vm.specification.name = Java Virtual Machine Specification
        java.vm.specification.vendor = Oracle Corporation
        java.vm.specification.version = 1.8
        java.vm.vendor = Oracle Corporation
        java.vm.version = 25.151-b12
        javax.management.builder.initial = org.jboss.as.jmx.PluggableMBeanServerBuilder
        javax.xml.datatype.DatatypeFactory = __redirected.__DatatypeFactory
        javax.xml.parsers.DocumentBuilderFactory = __redirected.__DocumentBuilderFactory
        javax.xml.parsers.SAXParserFactory = __redirected.__SAXParserFactory
        javax.xml.stream.XMLEventFactory = __redirected.__XMLEventFactory
        javax.xml.stream.XMLInputFactory = __redirected.__XMLInputFactory
        javax.xml.stream.XMLOutputFactory = __redirected.__XMLOutputFactory
        javax.xml.transform.TransformerFactory = __redirected.__TransformerFactory
        javax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema = __redirected.__SchemaFactory
        javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom = __redirected.__XPathFactory
        jboss.bind.address = 0.0.0.0
        jboss.bind.address.management = 0.0.0.0
        jboss.home.dir = /opt/dcm4chee-arc-light/wildfly
        jboss.host.name = dcm5
        jboss.modules.dir = /opt/dcm4chee-arc-light/wildfly/modules
        jboss.modules.system.pkgs = org.jboss.byteman
        jboss.node.name = dcm5
        jboss.qualified.host.name = dcm5
        jboss.server.base.dir = /opt/dcm4chee-arc-light/wildfly/standalone
        jboss.server.config.dir = /opt/dcm4chee-arc-light/wildfly/standalone/configuration
        jboss.server.data.dir = /opt/dcm4chee-arc-light/wildfly/standalone/data
        jboss.server.deploy.dir = /opt/dcm4chee-arc-light/wildfly/standalone/data/content
        jboss.server.log.dir = /opt/dcm4chee-arc-light/wildfly/standalone/log
        jboss.server.name = dcm5
        jboss.server.persist.config = true
        jboss.server.temp.dir = /opt/dcm4chee-arc-light/wildfly/standalone/tmp
        line.separator =

        logging.configuration = file:/opt/dcm4chee-arc-light/wildfly/standalone/configuration/logging.properties
        module.path = /opt/dcm4chee-arc-light/wildfly/modules
        org.jboss.boot.log.file = /opt/dcm4chee-arc-light/wildfly/standalone/log/server.log
        org.jboss.resolver.warning = true
        org.xml.sax.driver = __redirected.__XMLReaderFactory
        os.arch = amd64
        os.name = Linux
        os.version = 4.9.0-4-amd64
        path.separator = :
        sun.arch.data.model = 64
        sun.boot.class.path = /usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/classes
        sun.boot.library.path = /usr/lib/jvm/java-8-oracle/jre/lib/amd64
        sun.cpu.endian = little
        sun.cpu.isalist =
        sun.io.unicode.encoding = UnicodeLittle
        sun.java.command = /opt/dcm4chee-arc-light/wildfly/jboss-modules.jar -mp /opt/dcm4chee-arc-light/wildfly/modules org.jboss.as.standalone -Djboss.home.dir=/opt/dcm4chee-arc-light/wildfly -Djboss.server.base.dir=/opt/dcm4chee-arc-light/wildfly/standalone -b=0.0.0.0 -bmanagement=0.0.0.0 -c dcm4chee-arc.xml
        sun.java.launcher = SUN_STANDARD
        sun.jnu.encoding = UTF-8
        sun.management.compiler = HotSpot 64-Bit Tiered Compilers
        sun.os.patch.level = unknown
        user.country = BR
        user.dir = /home/pacs
        user.home = /home/pacs
        user.language = pt
        user.name = pacs
        user.timezone = America/Sao_Paulo
2018-01-17 16:21:27,208 DEBUG [org.jboss.as.config] (MSC service thread 1-7) VM Arguments: -D[Standalone] -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/opt/dcm4chee-arc-light/wildfly/standalone/log/server.log -Dlogging.configuration=file:/opt/dcm4chee-arc-light/wildfly/standalone/configuration/logging.properties
16:21:27,837 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
        at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131) [wildfly-controller-2.2.0.Final.jar:2.2.0.Final]
        at org.jboss.as.server.ServerService.boot(ServerService.java:357) [wildfly-server-2.2.0.Final.jar:2.2.0.Final]
        at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:299) [wildfly-controller-2.2.0.Final.jar:2.2.0.Final]
        at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_151]
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[3,1]
Message: Unexpected element '{url:jboss:domain:5.0}server'
        at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:108) [staxmapper-1.2.0.Final.jar:1.2.0.Final]
        at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69) [staxmapper-1.2.0.Final.jar:1.2.0.Final]
        at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123) [wildfly-controller-2.2.0.Final.jar:2.2.0.Final]
        ... 3 more

2018-01-17 16:21:27,837 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
        at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131) [wildfly-controller-2.2.0.Final.jar:2.2.0.Final]
        at org.jboss.as.server.ServerService.boot(ServerService.java:357) [wildfly-server-2.2.0.Final.jar:2.2.0.Final]
        at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:299) [wildfly-controller-2.2.0.Final.jar:2.2.0.Final]
        at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_151]
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[3,1]
Message: Unexpected element '{url:jboss:domain:5.0}server'
        at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:108) [staxmapper-1.2.0.Final.jar:1.2.0.Final]
        at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69) [staxmapper-1.2.0.Final.jar:1.2.0.Final]
        at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123) [wildfly-controller-2.2.0.Final.jar:2.2.0.Final]
        ... 3 more

16:21:27,842 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
2018-01-17 16:21:27,842 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
16:21:27,872 INFO  [org.jboss.as] (MSC service thread 1-5) WFLYSRV0050: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) stopped in 17ms
2018-01-17 16:21:27,872 INFO  [org.jboss.as] (MSC service thread 1-5) WFLYSRV0050: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) stopped in 17ms

Asikur Bhuiyan

unread,
Jan 22, 2018, 1:41:35 AM1/22/18
to dcm4che
Hi Paolo,
thank you very much for share this script, last three weeks I am try to install DCM4CHEE-ARC-LIGHT but still unable to installed it . after googling I find your Auto install Script  and really happy for fund this script . Now I am try to install it in a Virtual machine with 2 GB ram  and 30 GB hard disk, but have a problem to installed  it most of line show “No such file or directory”  here I attached my Terminal log file

please help me to installed it ..

thanks
Asikur Bhuiyan
terminal log

victor.p...@alma3d.com

unread,
Jan 26, 2018, 7:13:56 AM1/26/18
to dcm4che
Hello Paolo, 

and thanks for sharing the script, is there a possibility to update this script to work with the last version of dcm4chee? And is also abailable to change the non-working URLs?


Thanks

Paolo Marcheschi

unread,
Aug 29, 2018, 9:49:06 AM8/29/18
to dcm4che
Hi
I'm sorry but there were too many changes to the original version,
and the script does not work anymore.
And it is very difficult to adapt to the new version from github.
Bye
Paolo

Renato Carvalhaes

unread,
Sep 12, 2018, 4:57:03 PM9/12/18
to dcm4che
Do you have old repository about DOWNLOADS folder for we try again?

I cant acess final aplication,  in my case http://myip:8080/dcm4chee-arc/ui, only http://myip:8080 wildfly



  Creating pacsdb database...
  Creating pacs user for pacsdb database...
  Populating pacsdb database...

  Creating LDAP database...
  Importing LDAP schema files for OpenLDAP runtime configuration
./install_dcm4chee5.sh, linha 373:  3967 Abortado                ldapadd -Q -Y EXTERNAL -H ldapi:/// -f $DCM4CHEEDIR/ldap/slapd/dcm4chee-archive.ldif >> $INSTALLOG 2>&1
  Restarting LDAP
[ ok ] Restarting slapd (via systemctl): slapd.service.

  Configuring Wildfly...

  Starting Wildfly...

  Adding datasource to Wildfly...

  Adding jms queues to Wildfly...

  Deploying dcm4chee-arc-light 5.14.0 ...

  Deploying Weasis 3.0.1 ...
modifying entry "dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org"
ldap_modify: Undefined attribute type (17)
        additional info: dcmInvokeImageDisplayPatientURL: attribute type undefined


  Deploying Weasis pacs connector ...

  Restarting wildfly

Stopping Wildfly ...
{"outcome" => "success"}

Starting Wildfly ...

Wildfly started, log is in /opt/dcm4chee-arc-light/wildfly/standalone/log/server.log


  ######### Installation complete #########

The installed instance should be already running, please test

To stop wildfly, run as radiologia with:
/usr/local/bin/pacs_stop.sh

To start wildfly, run as radiologia with:
/usr/local/bin/pacs_start.sh

To access the web interface go to:  http://:8080/dcm4chee-arc/ui

Renato Carvalhaes

unread,
Sep 12, 2018, 4:59:46 PM9/12/18
to dcm4che
I MAKE SOME CHANGES:

#!/bin/bash

# This script will help you install dcm4chee-arc-light and related software
# Please read through the script first and customize it

# ============ Customize this part ====================

MYSQLROOTPW=PASSWORD2018                     # MySQL root password
PACSUSER=radiologia                          # Desired user that will run the server
PACSUSERPASSW=PASSWORD2018                  # users UNIX password
PACSDB=pacsdb                               # MySQL database for dcm4chee-arc-light
DBUSER=pacs                                 # MySQL user 
DBPASS=pacs                                 # MySQL password
AET=PACS1                                   # dcm4chee-arc-light AET
ETHINTERFACE=eth0                         # Main ethernet interface for the server
INSTALLDIR=/opt                             # Where to create the installation directory
DCM4CHEEDIR=$INSTALLDIR/dcm4chee-arc-light  # Installation directory
INSTALLOG=/tmp/dcm4chee-install.log         # Log file for installation
DOWNLOADSDIR=./Downloads                    # Directory to store downloaded files
# Variables for LDAP install, if not changed will use the server FQDN
#SERVER=$(hostname --fqdn)   # something like: server1.example.com
#DOMAIN=${SERVER#*.}         # something like: example.com
#REALM=$(echo "${DOMAIN}" | tr '[:lower:]' '[:upper:]')   # something like: EXAMPLE.COM
#LDAPROOT=`echo $DOMAIN | sed -e 's/^/dc=/' -e 's/\./\,dc=/'`
LDAPSERVER="dicom.dcm4che.org"
LDAPDOMAIN="dcm4che.org
LDAPREALM="DCM4CHE.ORG
LDAPROOT="dc=dcm4che,dc=org"
LDAPADMINPW=PASSWORD2018

# ============ End of Configuration part ==============

# Colors
SR="\e[31m"
SY="\e[33m"
SG="\e[32m"
SD="\e[39m"

STARTDIR=`pwd`
WILDFLYDIR=$DCM4CHEEDIR/wildfly
APTINSTALL="apt-get --assume-yes -qq install"
WGET="wget -q --show-progress"

# Verify we are runing as root
if [ "$EUID" -ne 0 ]
  then echo -e "\n $SY Please run as root or with sudo $SD \n"
  exit
fi

# Verify MySQL root password
if [ -e "/usr/bin/mysql" ]
then
    if ! mysql -uroot -p"$MYSQLROOTPW" -e ";" 2> /dev/null
    then
        echo -e "\n $SY Warning! The MySQL root password is not working, please check the config $SD"
        exit
    fi
fi

# Create a directory for downloading files
if [ -e "./$DOWNLOADSDIR" ]
then
    echo -e "\n $SY Directory $DOWNLOADSDIR already exists, skipping creation $SD"
else
    mkdir $DOWNLOADSDIR
fi

# Create the dcm4chee user
if getent passwd $PACSUSER > /dev/null 2>&1; then
    echo -e "\n $SY The user $PACSUSER already exists, skipping creation .. $SD"
else
    echo -e "\n $SG Creating user $PACSUSER $SD"
    groupadd $PACSUSER
    useradd -p $(echo "$PACSUSERPASSW" | openssl passwd -1 -stdin) -d /home/"$PACSUSER" -m -g "$PACSUSER" -s /bin/bash "$PACSUSER"
fi

# Get the IP address of the interface it's going to be used for the server
ETHFOUND=`grep "$ETHINTERFACE" /proc/net/dev`
if [ -n "$ETHFOUND" ]
then
    IPADDR=`ifconfig $ETHINTERFACE | awk '/inet addr/{print substr($2,6)}'`
else
    echo -e "\n $SY Could not find network interface $ETHINTERFACE, please add correct interface in the Configuration part of this script\n $SD"
    exit
fi

# LDAP requires the ROOTDN to match the server FQDN
FQDN=`hostname --fqdn`
if [ "$FQDN" != "$LDAPSERVER" ]
then
    echo -e "\n $SY Warning! Please edit /etc/hosts to reflect the server FQDN name $LDAPSERVER or change the LDAPSERVER config variable $SD"
    echo "      FQDN = $FQDN"
    echo "LDAPSERVER = $FQDN"
    exit
fi


#### Delete old instance of dcm4chee ####

echo -e "\n $SR Warning!! Warning!! This script will now remove all previous install dirs, drop database in MySQL and LDAP"
echo -e " $SR Warning!! Press Enter to continue or Ctrl-C to abort $SD "
read dummy
echo -e "    Warning!! Shutting down running instance"
$WILDFLYDIR/bin/jboss-cli.sh --connect command=:shutdown  2>&1 > $INSTALLOG
sleep 5
for p in `ps -ef | grep wildfly | awk '{print $2}' | tr '\n' ' '`
do
    kill -9 $p >> $INSTALLOG 2>&1
done

echo -e "    Warning!! Dropping $PACSDB database"
mysqladmin -p"$MYSQLROOTPW" -f drop $PACSDB >> $INSTALLOG 2>&1
echo -e "    Warning!! Removing install dirs"
rm $DCM4CHEEDIR
rm -rf $INSTALLDIR/dcm4chee* >> $INSTALLOG 2>&1
echo -e "    Warning!! Removing LDAP"
/etc/init.d/slapd stop
apt-get --assume-yes -qq purge slapd ldap-utils >> $INSTALLOG 2>&1
rm -rf /var/lib/ldap/ >> $INSTALLOG 2>&1
rm -rf /etc/ldap >> $INSTALLOG 2>&1


#### Install OS software dependencies ####

echo -e "\n $SG Installing OS software dependencies... $SD"
if [ -e "/usr/bin/unzip" ]; then
    echo -e " $SY Zip utilities already installed, skipping... $SD"
else 
    echo -e " $SG Zip utilities not installed, installing... $SD"
    $APTINSTALL zip > /dev/null
fi


if [ -e "/usr/bin/java" ]; then
    JAVAVERSION=`java -version 2>&1 | head -1 | sed -e 's/^.* \"//' -e 's/\./____/2' -e 's/____.*//'`
    if [[ "$JAVAVERSION" > "1.7" ]]
    then
        echo -e " $SY Java already installed, skipping... $SD"
    else
        echo -e " $SR Java is version $JAVAVERSION. Please install java 8, exiting $SD"
        exit 1
    fi
else 
    echo -e " $SG Java not installed, installing... $SD"
    $APTINSTALL --no-install-recommends default-jre > /dev/null
fi 

if [ -e "/usr/bin/lynx" ]; then
    echo -e " $SY Lynx already installed, skipping... $SD"
else
    echo -e " $SG Lynx not installed, installing... $SD"
    $APTINSTALL lynx > /dev/null
fi

if [ -e "/usr/bin/mysql" ]; then
    echo -e " $SY MySQL already installed, skipping... $SD"
else
    echo -e " $SG MySQL not installed, installing... $SD"
    DEBIAN_FRONTEND=noninteractive $APTINSTALL mysql-server > /dev/null
    #$APTINSTALL mysql-server > /dev/null
    mysqladmin -u root password "$MYSQLROOTPW"
fi

if [ -e "/usr/share/java/mysql-connector-java.jar" ]; then
    echo -e " $SY MySQL JAVA connector already installed, skipping... $SD"
else
    echo -e " $SG MySQL JAVA connector not installed, installing... $SD"
    $APTINSTALL libmysql-java > /dev/null
fi

#echo -e "\n $SG LDAP will be installed with the following parameters $SD"
#echo -e "\nLDAPSERVER:   $SERVER \nLDAPDOMAIN:   $DOMAIN \nLDAPREALM:    $REALM \nLDAPROOT: $LDAPROOT \n"

if [ -e "/usr/sbin/slapd" ]; then
    echo -e " $SY OpenLDAP already installed, skipping... $SD"
else
    echo -e " $SG OpenLDAP not installed, installing... $SD"
    DEBIAN_FRONTEND=noninteractive $APTINSTALL slapd ldap-utils > /dev/null
fi


#### Download dcm4chee-arc-light and related software ####

cd $DOWNLOADSDIR
# Find latest version available of dcm4chee arc light #
echo -ne "\n $SG Looking for latest version of dcm4chee arc light... $SD"
DCMARCVER=`lynx -dump https://sourceforge.net/projects/dcm4che/files/dcm4chee-arc-light5/ | grep files | grep -v timeline | grep 5. | sed -e 's/^.*dcm4chee-arc-light5\///' -e 's/\/.*//' | head -1`
DCMARCVER="5.14.0"
echo -e "(Found dcm4chee-arc-light $DCMARCVER)"
DCMARCURL=`lynx -dump https://sourceforge.net/projects/dcm4che/files/dcm4chee-arc-light5/$DCMARCVER/ | grep mysql.zip | grep download | sed -e 's/^.*https/https/'`

# Install dcm4chee-arc-light
if [ -e "dcm4chee-arc-$DCMARCVER-mysql.zip" ]; then
    echo -e " $SY dcm4chee already downloaded, skipping download... $SD"
    echo -e "  Unpacking dcm4chee dcm4chee-arc-light $DCMARCVER ..."
    unzip -q dcm4chee-arc-$DCMARCVER-mysql.zip
    mv dcm4chee-arc-$DCMARCVER-mysql $INSTALLDIR/
    ln -s $INSTALLDIR/dcm4chee-arc-$DCMARCVER-mysql $INSTALLDIR/dcm4chee-arc-light
else
    echo -e " $SG Downloading dcm4chee-arc-light $DCMARCVER ... $SD"
    $WGET $DCMARCURL
    mv download dcm4chee-arc-$DCMARCVER-mysql.zip
    echo -e "  Unpacking dcm4chee dcm4chee-arc-light $DCMARCVER ..."
    unzip -q dcm4chee-arc-$DCMARCVER-mysql.zip
    mv dcm4chee-arc-$DCMARCVER-mysql $INSTALLDIR/
    ln -s $INSTALLDIR/dcm4chee-arc-$DCMARCVER-mysql $INSTALLDIR/dcm4chee-arc-light
fi

# If you wish to install ApacheDirectoryStudio, uncomment below
#if [ -e "ApacheDirectoryStudio-2.0.0.v20161101-M12-linux.gtk.x86_64.tar.gz" ]; then
#    echo -e "\n $SY ADS already downloaded, skipping download... $SD"
#    echo -e "Unpacking ADS..."
#    tar -xzf ApacheDirectoryStudio-2.0.0.v20161101-M12-linux.gtk.x86_64.tar.gz
#    mv ApacheDirectoryStudio $DCM4CHEEDIR/
#else
#    echo -e "\n $SG Downloading Apache Directory Studio... $SD"
#    echo -e "Unpacking ADS..."
#    tar -xzf ApacheDirectoryStudio-2.0.0.v20161101-M12-linux.gtk.x86_64.tar.gz
#    mv ApacheDirectoryStudio $DCM4CHEEDIR/
#fi

# Install Wildfly 10.1.0
if [ -e "wildfly-10.1.0.Final.tar.gz" ]; then
    echo -e "\n $SY Wildfly already downloaded, skipping download... $SD"
    echo -e "  Unpacking Wildfly..."
    tar -xzf wildfly-10.1.0.Final.tar.gz
    mv wildfly-10.1.0.Final $DCM4CHEEDIR/
    ln -s $DCM4CHEEDIR/wildfly-10.1.0.Final $DCM4CHEEDIR/wildfly
else
    echo -e "\n $SG Downloading WildFly 10.1.0... $SD"
    echo -e "  Unpacking Wildfly..."
    tar -xzf wildfly-10.1.0.Final.tar.gz
    mv wildfly-10.1.0.Final $DCM4CHEEDIR/
    ln -s $DCM4CHEEDIR/wildfly-10.1.0.Final $DCM4CHEEDIR/wildfly
fi

# Find latest version available for weasis #
echo -ne "\n $SG Looking for latest version of Weasis download... $SD"
WEASISVER=`lynx -dump https://sourceforge.net/projects/dcm4che/files/Weasis/ | grep files | grep -v timeline | grep Weasis | grep -v connector |  grep -v web | sed -e 's/^.*Weasis\///' -e 's/\/.*//' |head -1`
WEASISVER="3.0.1"
echo -e "(Found Weasis $WEASISVER)"

# Install Weasis
if [ -e "weasis.war" ]; then
    echo -e "$SY  Weasis already downloaded, skipping download... $SD"
    echo -e "  Installing Weasis $WEASISVER"
    #cp weasis.war $WILDFLYDIR/standalone/deployments/
    cp weasis.war $DCM4CHEEDIR/deploy/
    echo -e "$SG  Downloading latest version of weasis.ldif $SD"
    rm weasis.ldif
else
    echo -e "$SG  Downloading Weasis $WEASISVER ... $SD"
    mv download weasis.war
    echo -e "  Installing Weasis $WEASISVER"
    #cp weasis.war $WILDFLYDIR/standalone/deployments/
    cp weasis.war $DCM4CHEEDIR/deploy/
    echo -e "$SG Downloading latest version of weasis.ldif $SG"
    rm weasis.ldif
fi

# If you wish to install dcm4che2 utils, uncomment below
#if [ -e "dcm4che-2.0.29-bin.zip" ]; then
#    echo -e "\n $SY dcm4che2 tools already  downloaded, skipping download... $SD"
#    echo -e "  Installing dcm4che 2 tools"
#    unzip -q dcm4che-2.0.29-bin.zip
#    mv dcm4che-2.0.29 $DCM4CHEEDIR/
#else
#    echo -e "$SG Downloading dcm4che2 tools... $SD"
#    mv download dcm4che-2.0.29-bin.zip
#    echo -e "  Installing dcm4che 2 tools"
#    unzip -q dcm4che-2.0.29-bin.zip
#    mv dcm4che-2.0.29 $DCM4CHEEDIR/
#fi


# Find latest version available for weasis-pacs-connector #
echo -ne "\n $SG Looking for latest version of weasis-pacs-connector ... $SD"
PACSCONVER=`lynx -dump https://sourceforge.net/projects/dcm4che/files/Weasis/weasis-pacs-connector/ | grep weasis-pacs-connector | grep files | grep Weasis | sed -e 's/^.*weasis-pacs-connector\///' -e 's/\/.*//' |head -1`
echo -e "(Found weasis-pacs-connector $PACSCONVER)"

# Install weasis-pacs-connector
if [ -e "weasis-pacs-connector.war" ]; then
    echo -e " $SY Weasis pacs connector already downloaded, skipping download... $SD"
    #echo "Installing Weasis pacs connector $PACSCONVER"
    #echo -e "  Copying weasis-pacs-connector.war to $DCM4CHEEDIR/deploy/"
    #cp weasis-pacs-connector.war $WILDFLYDIR/standalone/deployments/
    cp weasis-pacs-connector.war $DCM4CHEEDIR/deploy/
else
    echo -e "$SG Downloading Weasis pacs connector $PACSCONVER ... $SD"
    mv download weasis-pacs-connector.war
    #echo "Installing Weasis pacs connector $PACSCONVER"
    #echo -e "Copying weasis-pacs-connector.war to $DCM4CHEEDIR/deploy/"
    #cp weasis-pacs-connector.war $WILDFLYDIR/standalone/deployments/
    cp weasis-pacs-connector.war $DCM4CHEEDIR/deploy/
fi


### Install and configure ###


echo -e "\n $SG Configuring Weasis pacs connector $PACSCONVER $SD"
rm dicom-dcm4chee.properties
cat dicom-dcm4chee.properties | sed -e 's/arc.wado.url=${server.base.url}\/wado/arc.wado.url=${server.base.url}\/dcm4chee-arc\/aets\/DCM4CHEE\/wado/' -e 's/arc.host=localhost/arc.host='$IPADDR'/' -e 's/DCM4CHEE/'$AET'/g' > $WILDFLYDIR/standalone/configuration/dicom-dcm4chee.properties
mv weasis-connector-default.properties weasis-pacs-connector.properties
cp weasis-pacs-connector.properties $WILDFLYDIR/standalone/configuration/


#echo -e "\nConverting DCM4CHEE instance to $AET instance.."
#find $DCM4CHEEDIR/ -type f -exec sed -i "s/DCM4CHEE/$AET/g" {} +

echo -e "\n $SG Creating pacsdb database... $SD"
mysqladmin -uroot -p"$MYSQLROOTPW" create $PACSDB >> $INSTALLOG 2>&1

echo "GRANT ALL PRIVILEGES ON \`$PACSDB\` . * TO '$DBUSER'@'localhost' IDENTIFIED BY '$DBPASS' WITH GRANT OPTION ;" > /tmp/dcm4chee_mysql_user
echo -e "  Creating pacs user for pacsdb database..."
mysql -uroot -p"$MYSQLROOTPW" $PACSDB < /tmp/dcm4chee_mysql_user >> $INSTALLOG 2>&1

echo -e "  Populating pacsdb database..."
mysql -u $DBUSER -p"$DBPASS" -h localhost $PACSDB < $DCM4CHEEDIR/sql/create-mysql.sql >> $INSTALLOG 2>&1

# Configure LDAP
echo -e "\n $SG Creating LDAP database... $SD"
cat <<EOF >/etc/ldap/ldap.conf
BASE    ${LDAPROOT}
URI     ldapi://
EOF

echo -n "$LDAPADMINPW" >ldap-admin-pw.txt
chmod 600 ldap-admin-pw.txt
LDAP_ADMIN_HASH=$(slappasswd -h '{SHA}' -T ldap-admin-pw.txt)
cat <<EOF >./newpassword.ldif
dn: olcDatabase={1}mdb,cn=config
changetype: modify
replace: olcRootPW
olcRootPW: "$LDAP_ADMIN_HASH"
EOF
ldapmodify -H ldapi:// -Y EXTERNAL -f ./newpassword.ldif >> $INSTALLOG 2>&1
rm ./newpassword.ldif
rm ldap-admin-pw.txt

echo -e "  Importing LDAP schema files for OpenLDAP runtime configuration"
cd $DCM4CHEEDIR/ldap/
cat <<EOF >modify-baseDN.ldif
dn: olcDatabase={1}mdb,cn=config
changetype: modify
replace: olcSuffix
olcSuffix: ${LDAPROOT}
-
replace: olcRootDN
olcRootDN: cn=admin,${LDAPROOT}
-
EOF
ldapmodify -Y EXTERNAL -H ldapi:/// -f ./modify-baseDN.ldif >> $INSTALLOG 2>&1
#cp init-baseDN.ldif init-baseDN.ldif.orig
cp init-config.ldif init-config.ldif.orig
cp default-config.ldif default-config.ldif.orig
cp add-vendor-data.ldif add-vendor-data.ldif.orig
#sed -i s/dc=dcm4che,dc=org/$LDAPROOT/ init-baseDN.ldif
sed -i s/dc=dcm4che,dc=org/$LDAPROOT/ init-config.ldif
sed -i s/dc=dcm4che,dc=org/$LDAPROOT/ default-config.ldif
sed -i s/dc=dcm4che,dc=org/$LDAPROOT/ add-vendor-data.ldif
ldapadd -Q -Y EXTERNAL -H ldapi:/// -f $DCM4CHEEDIR/ldap/slapd/dicom.ldif >> $INSTALLOG 2>&1
ldapadd -Q -Y EXTERNAL -H ldapi:/// -f $DCM4CHEEDIR/ldap/slapd/dcm4che.ldif >> $INSTALLOG 2>&1
ldapadd -Q -Y EXTERNAL -H ldapi:/// -f $DCM4CHEEDIR/ldap/slapd/dcm4chee-archive.ldif >> $INSTALLOG 2>&1
#ldapadd -x -D cn=admin,$LDAPROOT -w $LDAPADMINPW -f $DCM4CHEEDIR/ldap/init-baseDN.ldif >> $INSTALLOG
ldapadd -x -D cn=admin,$LDAPROOT -w $LDAPADMINPW -f $DCM4CHEEDIR/ldap/init-config.ldif >> $INSTALLOG 2>&1
cp default-config.ldif default-config.ldif.tmp
cat default-config.ldif.tmp | sed -e 's/DCM4CHEE_ADMIN/'$AET'_ADMIN/g' -e 's/DCM4CHEE_TRASH/'$AET'_TRASH/g' -e 's/DCM4CHEE/'$AET'/g' > default-config.ldif
rm default-config.ldif.tmp
ldapadd -x -D cn=admin,$LDAPROOT -w $LDAPADMINPW -f $DCM4CHEEDIR/ldap/default-config.ldif >> $INSTALLOG 2>&1
ldapadd -x -D cn=admin,$LDAPROOT -w $LDAPADMINPW -f $DCM4CHEEDIR/ldap/add-vendor-data.ldif >> $INSTALLOG 2>&1
# Restart LDAP-server
echo -e "  Restarting LDAP"
/etc/init.d/slapd restart

# Configure Wildfly
echo -e "\n $SG Configuring Wildfly... $SD"
cp -r $DCM4CHEEDIR/configuration/dcm4chee-arc $WILDFLYDIR/standalone/configuration
cd $WILDFLYDIR/standalone/configuration
cp standalone-full.xml dcm4chee-arc.xml
cd $WILDFLYDIR
for f in `find $DCM4CHEEDIR/jboss-modules -name *.zip`; do unzip -q $f; done
cp modules/com/mysql/main/module.xml modules/com/mysql/main/module.xml.orig
cat modules/com/mysql/main/module.xml.orig | sed -e 's/<resource-root path=".*/<resource-root path="\/usr\/share\/java\/mysql-connector-java.jar"\/>/' > modules/com/mysql/main/module.xml
cat <<EOF >$DCM4CHEEDIR/cli/add-data-source-mysql.cli
/subsystem=datasources/jdbc-driver=mysql:add(driver-module-name=com.mysql,driver-name=mysql)
data-source add --name=pacsds --driver-name=mysql --jndi-name=java:/PacsDS \
--connection-url=jdbc:mysql://localhost:3306/pacsdb \
--user-name=pacs --password=pacs
EOF
cat <<EOF >$WILDFLYDIR/standalone/configuration/dcm4chee-arc/ldap.properties
java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
java.naming.ldap.attributes.binary=dicomVendorData
java.naming.provider.url=ldap://localhost:389/$LDAPROOT
java.naming.security.principal=cn=admin,$LDAPROOT
java.naming.security.credentials=$LDAPADMINPW
EOF

# Creating start stop scripts
cat <<EOF >/usr/local/bin/pacs_start.sh
#!/bin/bash
USERID=`id -u $PACSUSER`
if [ "\$EUID" -ne "\$USERID" ]
    then echo -e "\n $SY Please run as user $PACSUSER $SD \n"
    exit
else
    echo -e "\nStarting Wildfly ..."
    $WILDFLYDIR/bin/standalone.sh -b=0.0.0.0 -bmanagement=0.0.0.0 -c dcm4chee-arc.xml >> $WILDFLYDIR/standalone/log/server.log 2>&1 &
    disown
    sleep 10
    echo -e "\nWildfly started, log is in $WILDFLYDIR/standalone/log/server.log"
fi
EOF
chmod +x /usr/local/bin/pacs_start.sh
cat <<EOF >/usr/local/bin/pacs_stop.sh
#!/bin/bash
USERID=`id -u $PACSUSER`
if [ "\$EUID" -ne "\$USERID" ]
    then echo -e "\n $SY Please run as user $PACSUSER $SD \n"
    exit
else
    echo -e "\nStopping Wildfly ..."
    $WILDFLYDIR/bin/jboss-cli.sh --connect command=:shutdown
    sleep 10
    for p in `ps -ef | grep wildfly | awk '{print $2}' | tr '\n' ' '`
    do
        kill -9 $p
    done

fi
EOF
chmod +x /usr/local/bin/pacs_stop.sh

#echo -e "\n $SG Setting permissions on files... $SD"
chown -R $PACSUSER:$PACSUSER $DCM4CHEEDIR/

echo -e "\n $SG Starting Wildfly... $SD"
su - $PACSUSER -c "$WILDFLYDIR/bin/standalone.sh -b=0.0.0.0 -bmanagement=0.0.0.0 -c dcm4chee-arc.xml" >> $INSTALLOG &
sleep 15
echo -e "\n $SG Adding datasource to Wildfly... $SD"
su - $PACSUSER -c "$WILDFLYDIR/bin/jboss-cli.sh -c --file=$DCM4CHEEDIR/cli/add-data-source-mysql.cli" >> $INSTALLOG &
sleep 5
echo -e "\n $SG Adding jms queues to Wildfly... $SD"
su - $PACSUSER -c "$WILDFLYDIR/bin/jboss-cli.sh -c --file=$DCM4CHEEDIR/cli/add-jms-queues.cli" >> $INSTALLOG &
sleep 5
echo -e "\n $SG Deploying dcm4chee-arc-light $DCMARCVER ... $SD"
su - $PACSUSER -c "cp $DCM4CHEEDIR/deploy/dcm4chee-arc-ear-* $WILDFLYDIR/standalone/deployments/" >> $INSTALLOG &
sleep 15
echo -e "\n $SG Deploying Weasis $WEASISVER ... $SD"
sed -i s/dc=dcm4che,dc=org/$LDAPROOT/ $STARTDIR/$DOWNLOADSDIR/weasis.ldif
ldapadd -x -D cn=admin,$LDAPROOT -w $LDAPADMINPW -f $STARTDIR/$DOWNLOADSDIR/weasis.ldif
su - $PACSUSER -c "cp $DCM4CHEEDIR/deploy/weasis.war $WILDFLYDIR/standalone/deployments/" >> $INSTALLOG &
sleep 5
echo -e "\n $SG Deploying Weasis pacs connector ... $SD"
su - $PACSUSER -c "cp $DCM4CHEEDIR/deploy/weasis-pacs-connector.war $WILDFLYDIR/standalone/deployments/" >> $INSTALLOG &
sleep 5
echo -e "\n $SG Restarting wildfly $SD"
su - $PACSUSER -c "/usr/local/bin/pacs_stop.sh" 2> /dev/null
su - $PACSUSER -c "/usr/local/bin/pacs_start.sh" 2> /dev/null


echo -e "\n\n $SG ######### Installation complete ######### $SD"

echo -e "\nThe installed instance should be already running, please test"
echo -e "\nTo stop wildfly, run as $PACSUSER with:"
echo -e "/usr/local/bin/pacs_stop.sh"

echo -e "\nTo start wildfly, run as $PACSUSER with:"
echo "/usr/local/bin/pacs_start.sh"

echo -e "\nTo access the web interface go to:  http://$IPADDR:8080/dcm4chee-arc/ui"

 

gabriel perez caldo

unread,
Oct 1, 2018, 9:47:09 PM10/1/18
to dcm4che
Hi. It gives me the same error. Only load wildfly. Any solution?

Washington Olmos

unread,
Jul 11, 2019, 9:47:28 AM7/11/19
to dcm4che
Hola, se que es un tema muy viejo pero tengo problemas cuando ejecuto install_dcm4chee5_cli_5.10.3.sh. Al ejecutarlo me dice que la carpeta Downloads ya esta creada y no hace nada. Entonces lo que hice fue creagar "#" delante del "mkdir Downloads" este paso se saltea pero no hace mas nada. Lo he dejado correr un tiempo para ver si es porque debe hacer descargas y en realidad no hace nada. Podria ud ayudarme? Lo estoy corriendo como root en un ubuntu 18

Paolo Marcheschi

unread,
Jul 15, 2019, 4:46:02 AM7/15/19
to dcm...@googlegroups.com
Hola, desafortunadamente este script es muy antiguo y ya no es compatible con la nueva versión de dcm4chee. Le sugiero que use la instalación que usa Docker:
https://github.com/dcm4che/dcm4chee-arc-light/wiki/Running-on-Docker

Paolo

--
You received this message because you are subscribed to a topic in the Google Groups "dcm4che" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dcm4che/NNxvs0b8aTg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dcm4che+u...@googlegroups.com.
To post to this group, send email to dcm...@googlegroups.com.
Visit this group at https://groups.google.com/group/dcm4che.
To view this discussion on the web visit https://groups.google.com/d/msgid/dcm4che/01b27565-a365-435b-82a8-3b98928f6edb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-

marci...@gmail.com

unread,
Feb 16, 2021, 12:06:09 PM2/16/21
to dcm4che
Olá Paolo.
Será que esse script funciona no ubuntu 20?
estou a procura de um instalador e encontrei esse grupo.

o...@stanstrup.dk

unread,
Apr 6, 2021, 7:18:46 AM4/6/21
to dcm4che
Hi,

Du you have an updated script or is it hosted somewhere where it can be downloaded?

Reply all
Reply to author
Forward
0 new messages