For a production environment, it might be better to create a .deb install file on a non-production "compiling machine" and transfer that .deb file to the target server and install the .deb file. The main item to consider is that the compiling machine and production server are running the same OS (e.g. Ubuntu Server 20.04 LTS)
Make sure you install the compilation package:
On the compiling machine, run the below command but substitute your own settings for maintainer and pkgsource. Run this right after the "make" and "make doc" commands.
It will ask you a few questions, answer however you want. I set my description to "Lightweight, RESTful DICOM server for medical imaging"
Code: Select all
checkinstall -D --install=no --maintainer="LHammonds" --pkgsource="https://hammondslegacy.com" --pkgname="orthanc-loc" --pkgversion="1.8.0" --pkgrelease="SNAPSHOT" --arch="$(dpkg --print-architecture)" --pkglicense="GPLv3" --requires="adduser,dcmtk,locales,lsb-base,libboost-filesystem1.71.0,libboost-locale1.71.0,libboost-regex1.71.0-icu66,libboost-thread1.71.0,libc6 \(\>= 2.31\),libcurl4 \(\>= 7.68.0\),libdcmtk14,libgcc-s1 \(\>= 10.2.0\),libjpeg8 \(\>= 8c\),libjsoncpp1 \(\>= 1.7.4\),liblua5.1-0,libpng16-16 \(\>= 1.6.37-2\),libpugixml1v5 \(\>= 1.10-1\),libsqlite3-0 \(\>= 3.31.1\),libssl1.1 \(\>= 1.1.1\),libstdc++6 \(\>= 10.2.0\),libuuid1 \(\>= 2.34\),zlib1g \(\>= 1:1.2.11\)" --provides="orthanc"
NOTE: I copied the requirements from what is listed for Orthanc 1.5.8 in the Official Ubuntu repository. They might not be accurate for 1.8.0 but have yet to see where to find that info so I simply set the minimum version to what I see installed on Ubuntu Server 20.04.1 LTS at the time I compiled. The command below is how it looks if you use the exact requirements for 1.5.8 in the Official Ubuntu repository:
Code: Select all
checkinstall -D --install=no --maintainer="LHammonds" --pkgsource="https://hammondslegacy.com" --pkgname="orthanc" --pkgversion="1.8.0" --pkgrelease="SNAPSHOT" --arch="$(dpkg --print-architecture)" --pkglicense="GPLv3" --requires="adduser,dcmtk,locales,lsb-base,libboost-filesystem1.71.0,libboost-locale1.71.0,libboost-regex1.71.0-icu66,libboost-thread1.71.0,libc6 \(\>= 2.28\),libcurl4 \(\>= 7.16.2\),libdcmtk14,libgcc-s1 \(\>= 3.0\),libjpeg8 \(\>= 8c\),libjsoncpp1 \(\>= 1.7.4\),liblua5.1-0,libpng16-16 \(\>= 1.6.2-1\),libpugixml1v5 \(\>= 1.6\),libsqlite3-0 \(\>= 3.7.3\),libssl1.1 \(\>= 1.1.0\),libstdc++6 \(\>= 9\),libuuid1 \(\>= 2.16\),zlib1g \(\>= 1:1.2.0\)" --provides="orthanc"
The end-result file will be something like this:
Code: Select all
-rw-r--r-- 1 root root 7092588 Oct 23 16:56 /root/Orthanc/Build/orthanc-loc_1.8.0-SNAPSHOT_amd64.deb
You can look at the package information with this command:
Code: Select all
dpkg-deb --info ~/Orthanc/Build/orthanc-loc_1.8.0-SNAPSHOT_amd64.deb
Code: Select all
new Debian package, version 2.0.
size 7093120 bytes: control archive=640 bytes.
0 bytes, 0 lines conffiles
691 bytes, 11 lines control
Package: orthanc-loc
Priority: extra
Section: checkinstall
Installed-Size: 26068
Maintainer: LHammonds
Architecture: amd64
Version: 1.8.0-SNAPSHOT
Depends: adduser,dcmtk,locales,lsb-base,libboost-filesystem1.71.0,libboost-locale1.71.0,libboost-regex1.71.0-icu66,libboost-thread1.71.0,libc6 (>= 2.31),libcurl4 (>= 7.68.0),libdcmtk14,libgcc-s1 (>= 10.2.0),libjpeg8 (>= 8c),libjsoncpp1 (>= 1.7.4),liblua5.1-0,libpng16-16 (>= 1.6.37-2),libpugixml1v5 (>= 1.10-1),libsqlite3-0 (>= 3.31.1),libssl1.1 (>= 1.1.1),libstdc++6 (>= 10.2.0),libuuid1 (>= 2.34),zlib1g (>= 1:1.2.11)
Provides: orthanc
Description: Lightweight, RESTful DICOM server for medical imaging
Transfer the generated .deb file to the new Orthanc server.
Code: Select all
scp ~/Orthanc/Build/orthanc-loc_1.8.0-SNAPSHOT_amd64.deb administrator@192.168.1.31:/tmp/.
scp ~/Orthanc/Build/orthanc-loc_1.8.0-SNAPSHOT_amd64.deb administrator@192.168.1.32:/tmp/.
scp ~/Orthanc/Build/orthanc-loc_1.8.0-SNAPSHOT_amd64.deb administrator@192.168.1.33:/tmp/.
On the Orthanc server, install from the .deb package that was copied to it.
Code: Select all
sudo dpkg -i /tmp/orthanc-loc_1.8.0-SNAPSHOT_amd64.deb
It will likely error out saying required dependencies are not installed. Example:
Code: Select all
Selecting previously unselected package orthanc.
(Reading database ... 110139 files and directories currently installed.)
Preparing to unpack .../orthanc_1.8.0-SNAPSHOT_amd64.deb ...
Unpacking orthanc (1.8.0-SNAPSHOT) ...
dpkg: dependency problems prevent configuration of orthanc:
orthanc depends on dcmtk; however:
Package dcmtk is not installed.
orthanc depends on libboost-filesystem1.71.0; however:
Package libboost-filesystem1.71.0 is not installed.
orthanc depends on libboost-locale1.71.0; however:
Package libboost-locale1.71.0 is not installed.
orthanc depends on libboost-regex1.71.0-icu66; however:
Package libboost-regex1.71.0-icu66 is not installed.
orthanc depends on libboost-thread1.71.0; however:
Package libboost-thread1.71.0 is not installed.
orthanc depends on libdcmtk14; however:
Package libdcmtk14 is not installed.
orthanc depends on libjpeg8 (>= 8c); however:
Package libjpeg8 is not installed.
orthanc depends on libjsoncpp1 (>= 1.7.4); however:
Package libjsoncpp1 is not installed.
orthanc depends on liblua5.1-0; however:
Package liblua5.1-0 is not installed.
orthanc depends on libpugixml1v5 (>= 1.10-1); however:
Package libpugixml1v5 is not installed.
dpkg: error processing package orthanc-loc (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
orthanc-loc
After trying to install the .deb package, you can now run this command which will install the required packages and then install Orthanc:
You can see the destination folder (and files) by looking at the contents inside the .deb file with this command:
Code: Select all
sudo dpkg-deb --contents /tmp/orthanc-loc_1.8.0-SNAPSHOT_amd64.deb
It is the same destination locations as if compiled on this machine:
Code: Select all
/usr/local/sbin/Orthanc
/usr/local/share/orthanc/plugins/
/usr/local/bin/OrthancRecoverCompressedFile
/usr/local/share/doc/orthanc/OrthancPlugin/
/usr/local/include/orthanc/OrthancCDatabasePlugin.h
/usr/local/include/orthanc/OrthancCPlugin.h
To remove the manually installed package (such as prior to installing a newer version):
To remove the configuration files as well: