

{"id":1325,"date":"2014-12-18T19:26:27","date_gmt":"2014-12-18T18:26:27","guid":{"rendered":"http:\/\/www.fabionline.net\/aaaaaaa\/?p=1325"},"modified":"2025-03-31T20:44:14","modified_gmt":"2025-03-31T18:44:14","slug":"installazione-di-systemd-su-debian-wheezy","status":"publish","type":"post","link":"https:\/\/www.fabionline.net\/blog\/linux\/installazione-di-systemd-su-debian-wheezy\/","title":{"rendered":"Systemd Installation on Debian Wheezy"},"content":{"rendered":"<p>I wanted to try the &#8220;infamous&#8221; systemd on my Debian Wheezy: Let&#8217;s start with a refresh (being root)<br>\n<span style=\"color: #0000ff;\">apt-get\u00a0update &amp;&amp; apt-get upgrade<\/span><\/p>\n<p>After that we can install systemd\u00a0 &#8211; initially I&#8217;ve used version present in repository Wheezy\/stable (44-11 + deb7u4)<br>\n<span style=\"color: #0000ff;\">apt-get install\u00a0systemd\u00a0systemd-sysv<br>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-1287\" src=\"https:\/\/www.fabionline.net\/blog\/wp-content\/uploads\/systemd-warning.png\" alt=\"systemd-warning\" width=\"650\" height=\"117\" srcset=\"https:\/\/www.fabionline.net\/blog\/wp-content\/uploads\/systemd-warning.png 873w, https:\/\/www.fabionline.net\/blog\/wp-content\/uploads\/systemd-warning-768x138.png 768w\" sizes=\"(max-width: 650px) 100vw, 650px\"><\/span>After writing the funny sentence,\u00a0 installation is completed.<\/p>\n<p>Now, we have to edit the grub to make sure that systemd will start without any problems:<br>\n<span style=\"color: #0000ff;\">nano\u00a0\/etc\/default\/grub<br>\n<\/span>At the last row I added, (under the GRUB_CMDLINE_LINUX_DEFAULT section):<br>\n<span style=\"color: #339966;\">init=\/bin\/systemd<\/span><\/p>\n<p>Then i have updated grub:<br>\n<span style=\"color: #0000ff;\">sudo update-grub2<br>\n<\/span>After reboot, Systemd is perfectly working.<\/p>\n<p>At that point I wanted to try also the latest systemd version present in backports repository (204-14 ~ bpo70 +1); so i&#8217;ve enabled backports repository<br>\n<span style=\"color: #0000ff;\">nano \/etc\/apt\/sources.list<br>\n<\/span>adding wheezy-backports repository in sources.list:<br>\n<span style=\"color: #008000;\">deb http:\/\/ftp.debian.org\/debian\/ wheezy-backports main contrib non-free<\/span><\/p>\n<p><span style=\"color: #333333;\">After saving, type:<br>\n<\/span><span style=\"color: #0000ff;\">apt-get update<br>\n<\/span>finally we can install\u00a0 systemd backports repository version(204-14~bpo70+1):<br>\n<span style=\"color: #0000ff;\">apt-get install -t wheezy-backports\u00a0systemd\u00a0systemd-sysv<\/span><\/p>\n<p>After reboot will have systemd working; considerations: the system reboot seems to be, in my case, slightly faster.<\/p>\n<p>Below some useful commands operating in Systemd:<\/p>\n<p><span style=\"color: #3366ff;\"><span style=\"color: #0000ff;\">systemctl<\/span><br>\n<\/span>Show all active services<\/p>\n<p><span style=\"color: #3366ff;\"><span style=\"color: #0000ff;\">systemd-analyze<\/span><br>\n<\/span>Prints the time spent in the kernel before userspace has been reached, the time spent in the initial RAM disk (initrd) before normal system userspace has been reached, and the time normal system userspace took to initialize. Note that these measurements simply measure the time passed up to the point where all system services have been spawned, but not necessarily until they fully finished initialization.<br>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-1288 size-full\" src=\"https:\/\/www.fabionline.net\/blog\/wp-content\/uploads\/systemdanalyze.png\" alt=\"systemdanalyze\" width=\"613\" height=\"40\" \/><span style=\"color: #0000ff;\">systemd-analyze blame<\/span><br>\na list of all units running, sorted according to the time you have used the services. This information can be used to optimize startup times, for example we can disable startup of a service (systemctl disable foo service) that maybe we don&#8217;t need and that takes a long time to start.<br>\nNote that the result could be misleading; for example, the start time of a service might be slow simply because it waits for initialization of another service is complete.<br>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-1289\" src=\"https:\/\/www.fabionline.net\/blog\/wp-content\/uploads\/systemdanalyzeblame.png\" alt=\"systemdanalyzeblame\" width=\"321\" height=\"85\" \/><br>\n<span style=\"color: #0000ff;\">systemctl start foo.service<br>\n<\/span>activate a service immediately (replace\u00a0<em>foo service<\/em>\u00a0with a real service)<\/p>\n<p><span style=\"color: #3366ff;\"><span style=\"color: #0000ff;\">systemctl stop foo.service<\/span><br>\n<\/span>Disable a service immediately<\/p>\n<p><span style=\"color: #3366ff;\"><span style=\"color: #0000ff;\">systemctl restart foo.service<\/span><br>\n<\/span>Restart a service<\/p>\n<p><span style=\"color: #3366ff;\"><span style=\"color: #0000ff;\">systemctl status foo.service<\/span><br>\n<\/span>Check status of a service<\/p>\n<p><span style=\"color: #3366ff;\"><span style=\"color: #0000ff;\">systemctl enable foo.service<\/span><br>\n<\/span>Enable a service to startup on boot<\/p>\n<p><span style=\"color: #3366ff;\"><span style=\"color: #0000ff;\">systemctl disable foo.service<\/span><br>\n<\/span>Disable a service at boot<\/p>\n<p><span style=\"color: #3366ff;\"><span style=\"color: #0000ff;\">systemctl is-enabled foo.service; echo $?<\/span><br>\n<\/span>Check whether a particular service or less at startup<\/p>","protected":false},"excerpt":{"rendered":"<p>I wanted to try the &#8220;infamous&#8221; systemd on my Debian Wheezy: Let&#8217;s start with a refresh (being root) apt-get\u00a0update &amp;&amp; apt-get upgrade After that we can install systemd\u00a0 &#8211; initially I&#8217;ve used version present in repository Wheezy\/stable (44-11 + deb7u4) &hellip; <a href=\"https:\/\/www.fabionline.net\/blog\/linux\/installazione-di-systemd-su-debian-wheezy\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_links_to":"","_links_to_target":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/posts\/1325"}],"collection":[{"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/comments?post=1325"}],"version-history":[{"count":1,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/posts\/1325\/revisions"}],"predecessor-version":[{"id":2618,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/posts\/1325\/revisions\/2618"}],"wp:attachment":[{"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/media?parent=1325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/categories?post=1325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/tags?post=1325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}