13 апр. 2016 г.

Install dcm4chee-cdw on raspberry pi 2 (or raspberry pi model b)

1. Download minimal Raspberry Pi image from https://downloads.raspberrypi.org/raspbian_lite_latest,
write it on SD-card,
on any Linux  - apply gparted to /dev/sdb, resize partition up to flash size.

2. Load system on Raspberry. Connect by ssh.

3. Install supplementary packets.

apt-get update

Utility -
apt-get install lynx
apt-get install mc
apt-get install usbmount

CD tools -
apt-get install wodim
apt-get install genisoimage
apt-get install dvd+rw-tools

User interface tools -
apt-get install wiringpi
apt-get install python-rpi
apt-get install ledmon
JAVA -
apt-get install oracle-java8-jdk
(openjdk also works)

4. Get dcm4chee-cdw

cd /srv
wget https://sourceforge.net/projects/jboss/files/JBoss/JBoss-4.2.3.GA/jboss-4.2.3.GA.zip/download
unzip -x download
rm download
wget https://sourceforge.net/projects/dcm4che/files/dcm4chee-cdw/2.17.0/dcm4chee-cdw-2.17.0.zip/download
unzip -x download
rm download
mv dcm4chee-cdw-2.17.0 dcm4chee-cdw

5. Install dcm4chee-cdw
cd dcm4chee-cdw/bin/
install_jboss.sh /srv/jboss-4.2.3.GA

6. Add lines to ~./.bashrc

export JAVA_HOME=:/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt
export PATH=$JAVA_HOME/bin:$PATH
export JBOSS_HOME=/srv/dcm4chee-cdw
export PATH=$JBOSS_HOME/bin:$PATH

7. Add the line to /etc/rc.local before "exit 0"

/srv/dcm4chee-cdw-2.17.0/bin/run.sh -b 0.0.0.0 &


8. Ajust memory size in /srv/dcm4chee-cdw/bin/run.conf - as in INSTALL.TXT
- change 256 to 512 if you have 1G RAM or leave it as is if you have 0.5G

9. Link genisoimage to mkisofs and wodim to cdrecord
ln -s /usr/bin/genisoimage /usr/bin/mkisofs
ln -s /usr/bin/wodim /usr/bin/cdrecord

10. Make other settings on http://localhost:8080/jmx-console - as usual.

11. Profit!