This Gist shows how to set up a CentOS machine to run a functional DCM4CHEE instance.
- download the desire iso at CentOS.org
- create a boot drive
- install it
- Download centos7 x86_64 Box
- Download Vagrant a. to download Vagrant for Debian, Windows, CentOS and MacOSX go to Vagrant.com b. to install vagrant via command line:
- Debian:
apt install vagrant -y
- Windows:
choco install vagrant
- CentOs:
yum install vagrant -y
- MacOSX: Download, verify, and install VirtualBox and its extension pack:
brew install Caskroom/cask/virtualbox && brew install Caskroom/cask/virtualbox-extension-pack
Download, verify, and install Vagrant and Vagrant-Manager:
brew install Caskroom/cask/vagrant && brew install Caskroom/cask/vagrant-manager
if yout dont have the respective package manager for your system:
- Windows OS: Chocolatey package manager. To install Chocolatey on Windows use the following code on your terminal, it can be on cmd:
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
or with powershell:
Set-ExecutionPolicy AllSigned; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
- Mac OSX: Homebrew package manager. To install Homebrew on Mac use the following code on your terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Create a folder to install the CentOS 7 machine:
- bash:
mkdir ~/vagrant/centos7
- powershell:
mkdir $env:userprofile/vagrant/centos7
- cmd:
mkdir "%userprofile%"/vagrant/centos7
- Move the downloaded box into new folder and openit:
- bash:
mv centos-7.0-x86_64.box ~/vagrant/centos7/entos-7.0-x86_64.box && cd ~/vagrant/centos7
- powershell:
(move-item "$env:userprofile/Downloads/centos-7.0-x86_64.box" "$env:userprofile/vagrant/centos7/centos-7.0-x86_64.box") and (cd $env:userprofile/vagrant/centos7/)
- cdm:
move-item "$env:userprofile/Downloads/centos-7.0-x86_64.box" "$env:userprofile/vagrant/centos7/centos-7.0-x86_64.box" && cd $env:userprofile/vagrant/centos7/
- Add the centos7 box with vagrant:
- bash/powershell/cdm:
vagrant box add centos-7.0-x86_64.box --name centos7
- Start the Vagrantfile:
- bash/powerhsell/cdm:
vagrant init
- Edit Vagrantfile with any text editor:
- bash:
nano ~/vagrant/centos7/Vagrantfile
- powershell:
Get-Content "$env:userprofile"/vagrant/centos7/Vagrantfile
- cmd:
more "%userprofile%"/vagrant/centos7/Vagrantfile
at file, replace:
config.vm.box = "base"
with:
config.vm.box = "centos7"
also, uncomment:
config.vm.network = "forwarded_port", guest: 80, host: 8080
add the line:
config.vm.network = "forwarded_port", guest: 8000, host: 8000
and save it.
- Start virtual machine:
vagrant up
- login with ssh command:
vagrant ssh
- update and upgrade machine:
sudo yum update -y && sudo yum upgrade -y
- Install the postgresql-server package and the "contrib" package:
sudo yum install postgresql-server postgresql-contrib -y
- Initialize your Postgres database and start PostgreSQL:
sudo postgresql-setup initdb
- Log as postgres user:
su - postgres
- Open the HBA configuration and edit host from:
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 ident
# IPv6 local connections:
host all all ::1/128 ident
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres peer
#host replication postgres 127.0.0.1/32 ident
#host replication postgres ::1/128 ident
to:
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres peer
#host replication postgres 127.0.0.1/32 trust
#host replication postgres ::1/128 trust
- Start and enable PostgreSQL:
sudo systemctl start postgresql && sudo systemctl enable postgresql
- Configure PostgreSQL to start on boot:
sudo systemctl enable postgresql
- Change the postgres user’s Linux password:
sudo passwd postgres
- Set a password for the postgres database user:
psql -d template1 -c "ALTER USER postgres WITH PASSWORD 'newpassword';"
- Install Java SE 8:
sudo yum install java-1.8.0-openjdk -y
- Install Java Development Package:
sudo yum install java-1.8.0-openjdk-devel -y
- Create a folder to alocate files:
mkdir ~/dcm4chee && cd ~/dcm4chee
- Download binaries for dcm4chee
- 2.18:
wget https://ufpr.dl.sourceforge.net/project/dcm4che/dcm4chee/2.18.3/dcm4chee-2.18.3-psql.zip
- 5.11:
wget https://ufpr.dl.sourceforge.net/project/dcm4che/dcm4chee-arc-light5/5.11.0/dcm4chee-arc-5.11.0-psql.zip
- Unzip files
- 2.18:
unzip dcm4che-2.18.3-psql.zip
- 5.11:
unzip dcm4chee-arc-5.11.0-psql.zip
- Create a DC4CHEE database on PostgreSQL:
createdb -h localhost -U postgres dcm4chee
- Setup $DCM4CHEE_ARC variable
- 2.18:
export DCM4CHEE_ARC = ~/dcm4chee/dcm4che-2.18.3-psql
- 5.11:
export DCM4CHEE_ARC = ~/dcm4chee/dcm4chee-arc-5.11.0-psql
- Create tables and indexes for DCM$CHEE datatable on PostgreSQL
- 2.18:
psql -h localhost dcm4chee postgres < $DCM4CHEE_ARC/sql/create-psql.sql
- 5.11:
psql -h localhost dcm4chee postgres < $DCM4CHEE_ARC/sql/create-psql.sql
psql -h localhost dcm4chee postgres < $DCM4CHEE_ARC/sql/create-fk-index.sql
- Download and unzip binaries
- 2.0.29:
cd ~/dcm4chee
wget https://ufpr.dl.sourceforge.net/project/dcm4che/dcm4che2/2.0.29/dcm4che-2.0.29-bin.zip
unzip dcm4che-2.0.29-bin.zip
- 5.11:
cd ~/dcm4chee
wget https://ufpr.dl.sourceforge.net/project/dcm4che/dcm4che3/5.11.0/dcm4che-5.11.0-bin.zip
unzip dcm4che-5.11.0-bin.zip
- Official Documentation at github/dcm4chee
I am having problems with the command, export DCM4CHEE_ARC = ~ / dcm4chee / dcm4che-2.18.3-psql
the message that appears: bash: export: `/root/dcm4chee/dcm4chee-2.18.3-psql ': is not a valid identifier, what can it be?