Lennart Poettering | d657c51 | 2012-01-25 02:20:38 +0100 | [diff] [blame] | 1 | systemd System and Service Manager |
Lennart Poettering | 31cee6f | 2010-05-13 03:30:21 +0200 | [diff] [blame] | 2 | |
| 3 | DETAILS: |
| 4 | http://0pointer.de/blog/projects/systemd.html |
| 5 | |
| 6 | WEB SITE: |
| 7 | http://www.freedesktop.org/wiki/Software/systemd |
| 8 | |
| 9 | GIT: |
Kay Sievers | 9fa2f41 | 2012-01-22 18:40:13 +0100 | [diff] [blame] | 10 | git://anongit.freedesktop.org/systemd/systemd |
| 11 | ssh://git.freedesktop.org/git/systemd/systemd |
Lennart Poettering | 31cee6f | 2010-05-13 03:30:21 +0200 | [diff] [blame] | 12 | |
| 13 | GITWEB: |
Kay Sievers | 9fa2f41 | 2012-01-22 18:40:13 +0100 | [diff] [blame] | 14 | http://cgit.freedesktop.org/systemd/systemd |
Lennart Poettering | 31cee6f | 2010-05-13 03:30:21 +0200 | [diff] [blame] | 15 | |
| 16 | MAILING LIST: |
| 17 | http://lists.freedesktop.org/mailman/listinfo/systemd-devel |
| 18 | http://lists.freedesktop.org/mailman/listinfo/systemd-commits |
| 19 | |
| 20 | IRC: |
| 21 | #systemd on irc.freenode.org |
| 22 | |
| 23 | BUG REPORTS: |
| 24 | https://bugs.freedesktop.org/enter_bug.cgi?product=systemd |
| 25 | |
| 26 | AUTHOR: |
Lennart Poettering | 5430f7f | 2012-04-12 00:20:58 +0200 | [diff] [blame] | 27 | Lennart Poettering |
| 28 | Kay Sievers |
| 29 | ...and many others |
Lennart Poettering | 31cee6f | 2010-05-13 03:30:21 +0200 | [diff] [blame] | 30 | |
Lennart Poettering | 673eab9 | 2011-07-14 23:53:53 +0200 | [diff] [blame] | 31 | LICENSE: |
Lennart Poettering | 5430f7f | 2012-04-12 00:20:58 +0200 | [diff] [blame] | 32 | LGPLv2.1+ for all code |
Kay Sievers | 952d153 | 2014-02-19 18:21:19 +0100 | [diff] [blame] | 33 | - except sd-readahead.[ch] which is MIT |
Lennart Poettering | b67f541 | 2013-12-22 23:26:07 +0100 | [diff] [blame] | 34 | - except src/shared/MurmurHash2.c which is Public Domain |
| 35 | - except src/shared/siphash24.c which is CC0 Public Domain |
Kay Sievers | 8542472 | 2013-08-14 22:58:21 +0200 | [diff] [blame] | 36 | - except src/journal/lookup3.c which is Public Domain |
| 37 | - except src/udev/* which is (currently still) GPLv2, GPLv2+ |
Lennart Poettering | 673eab9 | 2011-07-14 23:53:53 +0200 | [diff] [blame] | 38 | |
Lennart Poettering | 31cee6f | 2010-05-13 03:30:21 +0200 | [diff] [blame] | 39 | REQUIREMENTS: |
Jesper Larsen | e946948 | 2013-07-23 15:50:09 +0200 | [diff] [blame] | 40 | Linux kernel >= 3.0 |
Kay Sievers | 23aedd0 | 2014-03-22 18:27:35 +0100 | [diff] [blame] | 41 | Linux kernel >= 3.3 for loop device partition support features with nspawn |
| 42 | Linux kernel >= 3.8 for Smack support |
| 43 | |
| 44 | Kernel Config Options: |
Kay Sievers | 713bc0c | 2013-03-06 19:36:39 +0100 | [diff] [blame] | 45 | CONFIG_DEVTMPFS |
Jan Engelhardt | d28315e | 2014-05-03 19:15:23 +0200 | [diff] [blame] | 46 | CONFIG_CGROUPS (it is OK to disable all controllers) |
Kay Sievers | 713bc0c | 2013-03-06 19:36:39 +0100 | [diff] [blame] | 47 | CONFIG_INOTIFY_USER |
| 48 | CONFIG_SIGNALFD |
| 49 | CONFIG_TIMERFD |
| 50 | CONFIG_EPOLL |
Kay Sievers | 4193869 | 2013-03-06 19:51:52 +0100 | [diff] [blame] | 51 | CONFIG_NET |
Kay Sievers | 713bc0c | 2013-03-06 19:36:39 +0100 | [diff] [blame] | 52 | CONFIG_SYSFS |
Shawn Landden | 06d461e | 2013-12-09 07:04:06 -0800 | [diff] [blame] | 53 | CONFIG_PROC_FS |
Kay Sievers | 5d31974 | 2014-02-15 17:21:49 +0100 | [diff] [blame] | 54 | CONFIG_FHANDLE (libudev, mount and bind mount handling) |
Kay Sievers | 713bc0c | 2013-03-06 19:36:39 +0100 | [diff] [blame] | 55 | |
| 56 | Udev will fail to work with the legacy layout: |
Kay Sievers | f28cbd0 | 2013-03-06 20:01:45 +0100 | [diff] [blame] | 57 | CONFIG_SYSFS_DEPRECATED=n |
Kay Sievers | 713bc0c | 2013-03-06 19:36:39 +0100 | [diff] [blame] | 58 | |
| 59 | Legacy hotplug slows down the system and confuses udev: |
| 60 | CONFIG_UEVENT_HELPER_PATH="" |
| 61 | |
| 62 | Userspace firmware loading is deprecated, will go away, and |
| 63 | sometimes causes problems: |
| 64 | CONFIG_FW_LOADER_USER_HELPER=n |
| 65 | |
| 66 | Some udev rules and virtualization detection relies on it: |
| 67 | CONFIG_DMIID |
| 68 | |
Kay Sievers | a5c724b | 2013-09-15 07:29:25 +0200 | [diff] [blame] | 69 | Support for some SCSI devices serial number retrieval, to |
| 70 | create additional symlinks in /dev/disk/ and /dev/tape: |
| 71 | CONFIG_BLK_DEV_BSG |
| 72 | |
Mike Gilbert | 1346882 | 2014-03-31 14:28:23 -0400 | [diff] [blame] | 73 | Required for PrivateNetwork in service units: |
| 74 | CONFIG_NET_NS |
| 75 | |
Kay Sievers | 713bc0c | 2013-03-06 19:36:39 +0100 | [diff] [blame] | 76 | Optional but strongly recommended: |
| 77 | CONFIG_IPV6 |
| 78 | CONFIG_AUTOFS4_FS |
| 79 | CONFIG_TMPFS_POSIX_ACL |
| 80 | CONFIG_TMPFS_XATTR |
Kay Sievers | f28cbd0 | 2013-03-06 20:01:45 +0100 | [diff] [blame] | 81 | CONFIG_SECCOMP |
Kay Sievers | 713bc0c | 2013-03-06 19:36:39 +0100 | [diff] [blame] | 82 | |
Shawn Landden | 06d461e | 2013-12-09 07:04:06 -0800 | [diff] [blame] | 83 | For systemd-bootchart, several proc debug interfaces are required: |
Kay Sievers | 713bc0c | 2013-03-06 19:36:39 +0100 | [diff] [blame] | 84 | CONFIG_SCHEDSTATS |
| 85 | CONFIG_SCHED_DEBUG |
| 86 | |
Kay Sievers | f28cbd0 | 2013-03-06 20:01:45 +0100 | [diff] [blame] | 87 | For UEFI systems: |
Thomas Bächler | f33016f | 2014-03-22 01:41:12 +0100 | [diff] [blame] | 88 | CONFIG_EFIVAR_FS |
Kay Sievers | f28cbd0 | 2013-03-06 20:01:45 +0100 | [diff] [blame] | 89 | CONFIG_EFI_PARTITION |
| 90 | |
Lennart Poettering | 77b6e19 | 2013-05-10 00:14:12 +0200 | [diff] [blame] | 91 | Note that kernel auditing is broken when used with systemd's |
| 92 | container code. When using systemd in conjunction with |
Jan Engelhardt | 19aadac | 2013-10-22 01:50:48 +0200 | [diff] [blame] | 93 | containers, please make sure to either turn off auditing at |
Lennart Poettering | 77b6e19 | 2013-05-10 00:14:12 +0200 | [diff] [blame] | 94 | runtime using the kernel command line option "audit=0", or |
| 95 | turn it off at kernel compile time using: |
| 96 | CONFIG_AUDIT=n |
Lennart Poettering | a7b1c39 | 2014-03-11 05:40:36 +0100 | [diff] [blame] | 97 | If systemd is compiled with libseccomp support on |
| 98 | architectures which do not use socketcall() and where seccomp |
| 99 | is supported (this effectively means x86-64 and ARM, but |
Jan Engelhardt | 70a44af | 2014-05-03 19:15:24 +0200 | [diff] [blame] | 100 | excludes 32-bit x86!), then nspawn will now install a |
Lennart Poettering | a7b1c39 | 2014-03-11 05:40:36 +0100 | [diff] [blame] | 101 | work-around seccomp filter that makes containers boot even |
| 102 | with audit being enabled. This works correctly only on kernels |
| 103 | 3.14 and newer though. TL;DR: turn audit off, still. |
Lennart Poettering | 77b6e19 | 2013-05-10 00:14:12 +0200 | [diff] [blame] | 104 | |
Kay Sievers | ff70c61 | 2013-11-27 13:15:10 +0100 | [diff] [blame] | 105 | glibc >= 2.14 |
Lennart Poettering | 3ede835 | 2011-02-16 19:09:11 +0100 | [diff] [blame] | 106 | libcap |
Ronny Chevalier | c0467cf | 2014-02-12 01:29:54 +0100 | [diff] [blame] | 107 | libseccomp >= 1.0.0 (optional) |
Tom Gundersen | e304316 | 2012-11-20 01:24:32 +0100 | [diff] [blame] | 108 | libblkid >= 2.20 (from util-linux) (optional) |
Tom Gundersen | a18535d | 2013-10-17 19:49:19 +0200 | [diff] [blame] | 109 | libkmod >= 15 (optional) |
Lennart Poettering | 3ede835 | 2011-02-16 19:09:11 +0100 | [diff] [blame] | 110 | PAM >= 1.1.2 (optional) |
| 111 | libcryptsetup (optional) |
| 112 | libaudit (optional) |
Zbigniew Jędrzejewski-Szmek | 19d5d4c | 2011-07-12 13:57:48 +0200 | [diff] [blame] | 113 | libacl (optional) |
Lennart Poettering | fb0951b | 2012-10-16 22:58:07 +0200 | [diff] [blame] | 114 | libattr (optional) |
Lennart Poettering | 3ede835 | 2011-02-16 19:09:11 +0100 | [diff] [blame] | 115 | libselinux (optional) |
Zbigniew Jędrzejewski-Szmek | 19d5d4c | 2011-07-12 13:57:48 +0200 | [diff] [blame] | 116 | liblzma (optional) |
Lennart Poettering | 7b17a7d | 2012-09-28 00:46:32 +0200 | [diff] [blame] | 117 | libgcrypt (optional) |
| 118 | libqrencode (optional) |
| 119 | libmicrohttpd (optional) |
Zbigniew Jędrzejewski-Szmek | 2cc86f0 | 2012-11-22 15:30:50 +0100 | [diff] [blame] | 120 | libpython (optional) |
| 121 | make, gcc, and similar tools |
Lennart Poettering | 3ede835 | 2011-02-16 19:09:11 +0100 | [diff] [blame] | 122 | |
Jan Engelhardt | 19aadac | 2013-10-22 01:50:48 +0200 | [diff] [blame] | 123 | During runtime, you need the following additional |
| 124 | dependencies: |
Zbigniew Jędrzejewski-Szmek | 2cc86f0 | 2012-11-22 15:30:50 +0100 | [diff] [blame] | 125 | |
Zbigniew Jędrzejewski-Szmek | 8be1284 | 2013-12-10 20:27:14 -0500 | [diff] [blame] | 126 | util-linux >= v2.19 (requires fsck -l, agetty -s), |
| 127 | v2.21 required for tests in test/ |
Tom Gundersen | df41776 | 2013-11-27 16:50:53 +0100 | [diff] [blame] | 128 | dbus >= 1.4.0 (strictly speaking optional, but recommended) |
Zbigniew Jędrzejewski-Szmek | 8be1284 | 2013-12-10 20:27:14 -0500 | [diff] [blame] | 129 | sulogin (from util-linux >= 2.22 or sysvinit-tools, optional but recommended, |
| 130 | required for tests in test/) |
Zbigniew Jędrzejewski-Szmek | 2cc86f0 | 2012-11-22 15:30:50 +0100 | [diff] [blame] | 131 | dracut (optional) |
Lennart Poettering | 46ba8aa | 2013-02-13 22:56:43 +0100 | [diff] [blame] | 132 | PolicyKit (optional) |
Zbigniew Jędrzejewski-Szmek | 2cc86f0 | 2012-11-22 15:30:50 +0100 | [diff] [blame] | 133 | |
Jan Engelhardt | 19aadac | 2013-10-22 01:50:48 +0200 | [diff] [blame] | 134 | When building from git, you need the following additional |
| 135 | dependencies: |
Lennart Poettering | 3ede835 | 2011-02-16 19:09:11 +0100 | [diff] [blame] | 136 | |
Lennart Poettering | 3ede835 | 2011-02-16 19:09:11 +0100 | [diff] [blame] | 137 | docbook-xsl |
| 138 | xsltproc |
| 139 | automake |
| 140 | autoconf |
| 141 | libtool |
Zbigniew Jędrzejewski-Szmek | 19d5d4c | 2011-07-12 13:57:48 +0200 | [diff] [blame] | 142 | intltool |
Michael Biebl | b62cfce | 2011-08-03 17:09:55 +0200 | [diff] [blame] | 143 | gperf |
Zbigniew Jędrzejewski-Szmek | 19d5d4c | 2011-07-12 13:57:48 +0200 | [diff] [blame] | 144 | gtkdocize (optional) |
| 145 | python (optional) |
Zbigniew Jędrzejewski-Szmek | 32dcef3 | 2014-02-12 02:58:41 -0500 | [diff] [blame] | 146 | python-lxml (optional, but required to build the indices) |
Zbigniew Jędrzejewski-Szmek | 9015fa6 | 2013-02-09 15:37:35 -0500 | [diff] [blame] | 147 | sphinx (optional) |
Lennart Poettering | 21bc923 | 2011-02-23 01:12:07 +0100 | [diff] [blame] | 148 | |
Jan Engelhardt | 19aadac | 2013-10-22 01:50:48 +0200 | [diff] [blame] | 149 | When systemd-hostnamed is used, it is strongly recommended to |
| 150 | install nss-myhostname to ensure that, in a world of |
| 151 | dynamically changing hostnames, the hostname stays resolvable |
Lennart Poettering | fff2e5b | 2011-05-17 19:35:56 +0200 | [diff] [blame] | 152 | under all circumstances. In fact, systemd-hostnamed will warn |
Kay Sievers | bf9e477 | 2013-01-24 10:31:34 +0100 | [diff] [blame] | 153 | if nss-myhostname is not installed. |
Lennart Poettering | fff2e5b | 2011-05-17 19:35:56 +0200 | [diff] [blame] | 154 | |
Zbigniew Jędrzejewski-Szmek | 9015fa6 | 2013-02-09 15:37:35 -0500 | [diff] [blame] | 155 | To build HTML documentation for python-systemd using sphinx, |
| 156 | please first install systemd (using 'make install'), and then |
| 157 | invoke sphinx-build with 'make sphinx-<target>', with <target> |
| 158 | being 'html' or 'latexpdf'. If using DESTDIR for installation, |
| 159 | pass the same DESTDIR to 'make sphinx-html' invocation. |
| 160 | |
Lennart Poettering | a24c64f | 2013-03-05 18:53:21 +0100 | [diff] [blame] | 161 | USERS AND GROUPS: |
Lennart Poettering | 37495ee | 2013-03-05 19:15:31 +0100 | [diff] [blame] | 162 | Default udev rules use the following standard system group |
| 163 | names, which need to be resolvable by getgrnam() at any time, |
| 164 | even in the very early boot stages, where no other databases |
| 165 | and network are available: |
| 166 | |
| 167 | tty, dialout, kmem, video, audio, lp, floppy, cdrom, tape, disk |
Kay Sievers | 37c0e8f | 2013-03-05 19:04:48 +0100 | [diff] [blame] | 168 | |
Jan Engelhardt | 19aadac | 2013-10-22 01:50:48 +0200 | [diff] [blame] | 169 | During runtime, the journal daemon requires the |
Michael Biebl | 1a9ce3f | 2013-03-05 19:19:26 +0100 | [diff] [blame] | 170 | "systemd-journal" system group to exist. New journal files will |
Jan Engelhardt | 19aadac | 2013-10-22 01:50:48 +0200 | [diff] [blame] | 171 | be readable by this group (but not writable), which may be used |
Lennart Poettering | a24c64f | 2013-03-05 18:53:21 +0100 | [diff] [blame] | 172 | to grant specific users read access. |
| 173 | |
| 174 | It is also recommended to grant read access to all journal |
| 175 | files to the system groups "wheel" and "adm" with a command |
| 176 | like the following in the post installation script of the |
| 177 | package: |
| 178 | |
| 179 | # setfacl -nm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx /var/log/journal/ |
| 180 | |
Lennart Poettering | 37495ee | 2013-03-05 19:15:31 +0100 | [diff] [blame] | 181 | The journal gateway daemon requires the |
Michael Biebl | 1a9ce3f | 2013-03-05 19:19:26 +0100 | [diff] [blame] | 182 | "systemd-journal-gateway" system user and group to |
Lennart Poettering | 37495ee | 2013-03-05 19:15:31 +0100 | [diff] [blame] | 183 | exist. During execution this network facing service will drop |
| 184 | privileges and assume this uid/gid for security reasons. |
| 185 | |
Lennart Poettering | a349eb1 | 2014-05-17 20:33:47 +0200 | [diff] [blame] | 186 | The NTP daemon requires the "systemd-timesync" system user and |
| 187 | group to exist. During execution this network facing service |
Nis Martensen | f172162 | 2014-05-18 15:43:18 +0200 | [diff] [blame] | 188 | will drop privileges (with the exception of CAP_SYS_TIME) and |
Lennart Poettering | a349eb1 | 2014-05-17 20:33:47 +0200 | [diff] [blame] | 189 | assume this uid/gid for security reasons. |
| 190 | |
Lennart Poettering | e15007b | 2014-06-01 09:35:19 +0200 | [diff] [blame^] | 191 | The network management daemon requires the "systemd-network" |
| 192 | system user and group to exist. During execution this network |
| 193 | facing service will drop privileges (with the exception of |
| 194 | CAP_NET_*) and assumed this uid/gid for security reasons. |
| 195 | |
Lennart Poettering | 21bc923 | 2011-02-23 01:12:07 +0100 | [diff] [blame] | 196 | WARNINGS: |
| 197 | systemd will warn you during boot if /etc/mtab is not a |
| 198 | symlink to /proc/mounts. Please ensure that /etc/mtab is a |
| 199 | proper symlink. |
| 200 | |
| 201 | systemd will warn you during boot if /usr is on a different |
| 202 | file system than /. While in systemd itself very little will |
Jan Engelhardt | 19aadac | 2013-10-22 01:50:48 +0200 | [diff] [blame] | 203 | break if /usr is on a separate partition, many of its |
Lennart Poettering | 21bc923 | 2011-02-23 01:12:07 +0100 | [diff] [blame] | 204 | dependencies very likely will break sooner or later in one |
Jan Engelhardt | 19aadac | 2013-10-22 01:50:48 +0200 | [diff] [blame] | 205 | form or another. For example, udev rules tend to refer to |
Lennart Poettering | 21bc923 | 2011-02-23 01:12:07 +0100 | [diff] [blame] | 206 | binaries in /usr, binaries that link to libraries in /usr or |
| 207 | binaries that refer to data files in /usr. Since these |
Jan Engelhardt | 19aadac | 2013-10-22 01:50:48 +0200 | [diff] [blame] | 208 | breakages are not always directly visible, systemd will warn |
Lennart Poettering | 21bc923 | 2011-02-23 01:12:07 +0100 | [diff] [blame] | 209 | about this, since this kind of file system setup is not really |
| 210 | supported anymore by the basic set of Linux OS components. |
Lennart Poettering | fc7a744 | 2011-03-01 23:44:26 +0100 | [diff] [blame] | 211 | |
Lennart Poettering | 47bc23c | 2014-02-26 02:54:37 +0100 | [diff] [blame] | 212 | systemd requires that the /run mount point exists. systemd also |
Jan Engelhardt | b8bde11 | 2014-05-08 01:28:45 +0200 | [diff] [blame] | 213 | requires that /var/run is a a symlink to /run. |
Lennart Poettering | 47bc23c | 2014-02-26 02:54:37 +0100 | [diff] [blame] | 214 | |
Lennart Poettering | aa16713 | 2011-03-04 05:07:01 +0100 | [diff] [blame] | 215 | For more information on this issue consult |
| 216 | http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken |
| 217 | |
Zbigniew Jędrzejewski-Szmek | 1b4bb4f | 2012-10-12 12:56:19 +0000 | [diff] [blame] | 218 | To run systemd under valgrind, compile with VALGRIND defined |
| 219 | (e.g. ./configure CPPFLAGS='... -DVALGRIND=1'). Otherwise, |
| 220 | false positives will be triggered by code which violates |
| 221 | some rules but is actually safe. |