Sunteți pe pagina 1din 22

Taste of Training Webinar Series

Administration in the world of


systemd
George Hacker
RHEL Curriculum Manager

Copyright 2014 Red Hat, Inc.

What is systemd?

Copyright 2014 Red Hat, Inc.

Types of systemd units


service
socket
path
target

Copyright 2014 Red Hat, Inc.

Identify the status of systemd units


systemctl status UNIT
systemctl is-active UNIT
systemctl is-enabled UNIT
systemctl list-units
systemctl list-unit-files
systemctl --failed

Copyright 2014 Red Hat, Inc.

Insert Screenshare Here

Using systemctl to manage services


systemctl start UNIT
systemctl stop UNIT
systemctl restart UNIT
systemctl reload UNIT

Copyright 2014 Red Hat, Inc.

Controlling service activation at boot


systemctl enable UNIT
systemctl disable UNIT
systemctl mask UNIT
systemctl unmask UNIT

Copyright 2014 Red Hat, Inc.

Insert Screenshare Here

What is systemd-journald?

Copyright 2014 Red Hat, Inc.

Finding events with journalctl


journalctl
journalctl -n [NUMBER]
journalctl -p PRIORITY
journalctl -f

Copyright 2014 Red Hat, Inc.

Finding events with journalctl


journalctl --since STIME --until ETIME
(time = YYYY-MM-DD hh:mm:ss, today, yesterday)
journalctl _SYSTEMD_UNIT=UNIT _PID=PID
(others include _COMM, _EXE, _UID)

Copyright 2014 Red Hat, Inc.

Insert Screenshare Here

Using systemd to resolve boot issues

Copyright 2014 Red Hat, Inc.

Important systemd targets


graphical.target
multi-user.target
rescue.target
emergency.target

Copyright 2014 Red Hat, Inc.

Changing the state of a running system


systemctl isolate TARGET

Not all targets can be isolated

Copyright 2014 Red Hat, Inc.

Changing default.target
systemctl get-default
systemctl set-default TARGET

Copyright 2014 Red Hat, Inc.

Booting into a non-default target


systemd.target=TARGET

Copyright 2014 Red Hat, Inc.

Insert Screenshare Here

Documentation
systemd(1), systemd.unit(5), systemd.service(5),
systemd.socket(5), systemctl(1), and
journalctl(1) man pages
Additional information may be available in the
chapter on managing services with
systemd in the Red Hat Enterprise Linux
System Administrator's Guide for Red Hat
Enterprise Linux 7, which can be found at
http://docs.redhat.com/
Copyright 2014 Red Hat, Inc.

Questions?

Copyright 2014 Red Hat, Inc.

More system administration topics?


Red Hat System Administration I (RH124)
Red Hat System Administration II (RH134)
Red Hat System Administration III (RH254)
http://www.redhat.com/training/paths/core-system-administration.html

Copyright 2014 Red Hat, Inc.

RH3

Copyright 2014 Red Hat, Inc.

S-ar putea să vă placă și