annotate Sphinx/source/faq/debian-daemon.rst @ 544:d7ec7ea133b8

note about nginx to emulate dicom tls
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 12 Nov 2020 09:26:24 +0100
parents 76db4223f495
children ac493614ba2e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
284
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
1 Starting Orthanc as a GNU/Linux daemon
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
2 ======================================
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
3
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
4 .. contents::
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
5
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 .. highlight:: bash
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7
284
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
8 "init" flavor
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
9 -------------
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10
284
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
11 To install Orthanc as a GNU/Linux `init daemon
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
12 <https://en.wikipedia.org/wiki/Init>`__ on a Debian/Ubuntu system, you
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
13 can:
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 1. Download this `service script
262
3391edf37359 note for packagers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
16 <https://salsa.debian.org/med-team/orthanc/raw/master/debian/orthanc.init>`_
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 (this file is part of the `official Debian package
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 <https://tracker.debian.org/pkg/orthanc>`_ of Orthanc),
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 2. Adapt some of its variables to reflect the configuration of your
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 system,
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 3. Copy it in ``/etc/init.d`` as root (the filename cannot contain
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 dot, otherwise it is not executed), make it belong to root, and tag
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 it as executable::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 $ sudo mv orthanc.init /etc/init.d/orthanc
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 $ sudo chown root:root /etc/init.d/orthanc
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 $ sudo chmod 755 /etc/init.d/orthanc
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 4. If you wish the daemon to be automatically launched at boot time and stopped at shutdown::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 $ sudo update-rc.d orthanc defaults
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 5. If you wish to remove the automatic launching at boot time later on::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 $ sudo update-rc.d -f orthanc remove
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 *Note*: You can use ``rcconf`` to easily monitor the services that are
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 run at startup::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 $ sudo apt-get install rcconf
284
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
41
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
42
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
43 "systemd" flavor
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
44 ----------------
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
45
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
46 A sample `systemd daemon <https://en.wikipedia.org/wiki/Systemd>`__
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
47 for Orthanc can be found in the official `Fedora package
482
76db4223f495 fix link to systemd because of Fedora package being orphaned
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 284
diff changeset
48 <https://src.fedoraproject.org/rpms/orthanc>`__ (now orphaned - please
76db4223f495 fix link to systemd because of Fedora package being orphaned
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 284
diff changeset
49 consider :ref:`contributing by adopting this package <contributing>`):
284
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
50
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
51 1. Download the `systemd script
482
76db4223f495 fix link to systemd because of Fedora package being orphaned
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 284
diff changeset
52 <https://src.fedoraproject.org/rpms/orthanc/blob/f32/f/orthanc.service>`__,
284
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
53 2. Adapt some of its variables to reflect the configuration of your
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
54 system,
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
55 3. Copy it as ``/etc/systemd/system/orthanc.service``,
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
56 4. Start the daemon as follows::
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
57
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
58 $ sudo systemctl daemon-reload
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
59 $ sudo systemctl start orthanc.service
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
60
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
61 5. To make this change permanent after a reboot, you can create a
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
62 symbolic link as follows::
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
63
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
64 $ sudo ln -s /etc/systemd/system/orthanc.service /etc/systemd/system/default.target.wants/
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
65
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
66
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
67 Other GNU/Linux distributions
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
68 -----------------------------
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
69
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
70 The instructions above have been tested on Debian/Ubuntu/Fedora
bcbe4a9ae8aa systemd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 262
diff changeset
71 systems, but should work similarly on other GNU/Linux distributions.