Systemd: Difference between revisions

From Q
Jump to navigation Jump to search
Tgurr (talk | contribs)
No edit summary
Tgurr (talk | contribs)
No edit summary
Line 20: Line 20:


{{Root|cave resolve world -cx}}
{{Root|cave resolve world -cx}}
== Configuration ==
{{File|/etc/hostname|
<pre>
desired-hostname
</pre>
}}
{{File|/etc/vconsole.conf|
<pre>
KEYMAP="de"
</pre>
}}
{{File|/etc/env.d/02locale|
<pre>
LANG=de_DE.utf8
</pre>
}}
Reboot and login.


== Network ==
== Network ==
Line 84: Line 62:
{{Root|systemctl start sshd.socket}}
{{Root|systemctl start sshd.socket}}


Reboot and login.
== Configuration ==
=== Hostname ===
Edits /etc/hostname and /etc/machine-info.
{{Root|hostnamectl set-hostname desiredhostname}}
== Keyboard Layout ==
Edits /etc/vconsole.conf.
localectl set-keymap de
== Localization ==
Edits /etc/env.d/02locale (?).
{{Root|localectl set-locale LANG="de_DE.utf8"}}


== Manually starting and stopping services ==
== Misc ==
=== Manually starting and stopping services ===
You'll find an overview of all installed services and sockets in /lib/systemd/system.
You'll find an overview of all installed services and sockets in /lib/systemd/system.


Line 94: Line 95:
{{Root|systemctl}} prints a status report of your systemd setup.
{{Root|systemctl}} prints a status report of your systemd setup.


== Enable additional/optional services ==
=== Enable additional/optional services ===


systemd-journal-gatewayd (accessible via port 19531):
systemd-journal-gatewayd (accessible via port 19531):

Revision as of 14:19, 8 November 2013

Description

systemd is a system and session manager for Linux also including udev nowadays.

Kernel settings

First of all you need a recent kernel version >=3.8 and some kernel options set.

Installation

File: /etc/paludis/options.conf
*/* build_options: jobs=5 -recommended_tests
*/* systemd
sys-apps/systemd simple-net
# cave resolve systemd -x

Now we need to reinstall packages with the systemd option set.

# cave resolve world -cx

Network

You can find out what the network device will be named by running:

# udevadm test-builtin net_id /sys/class/net/<ifname> 2> /dev/null
Code: network device name
ID_NET_NAME_MAC=enx005056a84955
ID_NET_NAME_PATH=enp11s0

DHCP (NetworkManager)

# cave resolve repository/desktop -x
# cave resolve NetworkManager -x
# systemctl enable NetworkManager.service

Static (simple-net)

File: /etc/conf.d/network.conf
IFACE=enp11s0
IPV4=192.168.0.2
MASK=255.255.255.0
BCAST=255.255.255.0
GATEWAY=192.168.0.1
# systemctl enable network.service

Enable sshd connectivity

# systemctl enable sshd.socket
# systemctl start sshd.socket

Reboot and login.


Configuration

Hostname

Edits /etc/hostname and /etc/machine-info.

# hostnamectl set-hostname desiredhostname

Keyboard Layout

Edits /etc/vconsole.conf.

localectl set-keymap de

Localization

Edits /etc/env.d/02locale (?).

# {{{1}}}

Misc

Manually starting and stopping services

You'll find an overview of all installed services and sockets in /lib/systemd/system.

# systemctl start <service>.service
# systemctl stop <service>.service
# systemctl

prints a status report of your systemd setup.

Enable additional/optional services

systemd-journal-gatewayd (accessible via port 19531):

# systemctl enable systemd-journal-gatewayd.service

NFS (client):

# systemctl start rpcstatd.service

vixie-cron:

# systemctl enable vixie-cron.service

ntp:

# systemctl enable ntpd.service

MySQL:

# systemctl enable mysql.service