Translations:Handbook:PPC64/Installation/Tools/2/en

From Gentoo Wiki
Jump to:navigation Jump to:search
Handbook:PPC64 Handbook
Installation
About the installation
Choosing the media
Configuring the network
Preparing the disks
Installing stage3
Installing base system
Configuring the kernel
Configuring the system
Installing tools
Configuring the bootloader
Finalizing
Working with Gentoo
Portage introduction
USE flags
Portage features
Initscript system
Environment variables
Working with Portage
Files and directories
Variables
Mixing software branches
Additional tools
Custom package repository
Advanced features
Network configuration
Getting started
Advanced configuration
Modular networking
Wireless
Adding functionality
Dynamic management


System logger

Tip
systemd users can usually skip this step unless they specifically want a syslog. systemd includes journald which handles the same functionality.

Some tools are missing from the stage3 archive because several packages provide the same functionality. It is now up to the user to choose which ones to install.

The first tool to decide on has to provide logging facilities for the system. Unix and Linux have an excellent history of logging capabilities - if needed, everything that happens on the system can be logged in log files. This happens through the system logger.

Gentoo offers several system logger utilities. A few of these include:

  • app-admin/sysklogd - Offers the traditional set of system logging daemons. The default logging configuration works well out of the box which makes this package a good option for beginners.
  • app-admin/syslog-ng - An advanced system logger. Requires additional configuration for anything beyond logging to one big file. More advanced users may choose this package based on its logging potential; be aware additional configuration is a necessity for any kind of smart logging.
  • app-admin/metalog - A highly-configurable system logger.

Others are available through Portage as well - the number of available packages increases on a daily basis.

Tip
If syslog-ng is going to be used, it is recommended to install and configure logrotate afterwards as it doesn't provide any rotation mechanism for the log files. Newer versions (>= 2.0) of sysklogd however handle their own log rotation.
Tip
systemd provides its own logging facility called the "journal". Installing a separate syslog provider is optional on systems running systemd, and may require additional configuration to have the syslog daemon read messages from the journal.

To install the system logger of choice, emerge it. On OpenRC, add it to the default runlevel using rc-update. The following example installs app-admin/sysklogd:

root #emerge --ask app-admin/sysklogd

On OpenRC:

root #rc-update add sysklogd default

sysklogd does not install a systemd unit so systemd users either need to use the journal (built-in to systemd) or a different syslog daemon.

Optional: Cron daemon

Tip
systemd does not require a cron daemon as it has timers, but it's still possible to run a cron daemon.

Next is the cron daemon. Although it is optional and not required for every system, it is wise to install one.

A cron daemon executes scheduled commands. It is very handy if some command needs to be executed regularly (for instance daily, weekly or monthly).

Gentoo offers several possible cron daemons, including sys-process/bcron, sys-process/dcron, sys-process/fcron, and sys-process/cronie. Installing one of them is similar to installing a system logger. The following example uses sys-process/cronie:

root #emerge --ask sys-process/cronie

On OpenRC:

root #rc-update add cronie default

Or on systemd:

root #systemctl enable cronie

If dcron is used, an additional initialization command needs to be executed:

root #crontab /etc/crontab

If fcron is used, an additional emerge step is required:

root #emerge --config sys-process/fcron

Optional: File indexing

In order to index the file system to provide faster file location capabilities, install sys-apps/mlocate.

root #emerge --ask sys-apps/mlocate

Optional: Remote access

To be able to access the system remotely after installation, sshd must be configured to start on boot.

To add the sshd init script to the default runlevel on OpenRC:

root #rc-update add sshd default

And on systemd:

root #systemctl enable sshd

If serial console access is needed (which is possible in case of remote servers), agetty must be configured.

On OpenRC, uncomment the serial console section in /etc/inittab:

root #nano -w /etc/inittab
# SERIAL CONSOLES
s0:12345:respawn:/sbin/agetty 9600 ttyS0 vt100
s1:12345:respawn:/sbin/agetty 9600 ttyS1 vt100

On systemd, run:

root #systemctl enable getty@tty1.service

Time synchronization

It is important to use some method of synchronizing the system clock. This is usually done via the NTP protocol and software. Other implementations using the NTP protocol exist, like Chrony.

To set up Chrony, for example:

root #emerge --ask net-misc/chrony

On OpenRC, run:

root #rc-update add chronyd default

On systemd, run:

root #systemctl enable chronyd

systemd users may wish to use systemd-timesyncd described on the systemd article.

Filesystem tools

Depending on the filesystems used, it is necessary to install the required file system utilities (for checking the filesystem integrity, creating additional file systems etc.). Note that tools for managing ext4 filesystems (sys-fs/e2fsprogs) are already installed as a part of the @system set.

The following table lists the tools to install if a certain filesystem is used:

Filesystem Package
Ext 4 sys-fs/e2fsprogs
XFS sys-fs/xfsprogs
ReiserFS sys-fs/reiserfsprogs
JFS sys-fs/jfsutils
VFAT (FAT32, ...) sys-fs/dosfstools
Btrfs sys-fs/btrfs-progs
ZFS sys-fs/zfs
Tip
For more information on filesystems in Gentoo see the filesystem article.

Networking tools

If networking was previously configured in the Configuring the system step and network setup is complete, then this 'networking tools' section can be safely skipped. In this case, proceed with the section on Configuring a bootloader.

Installing a DHCP client

Important
Although optional, the majority of users will find that they need a DHCP client to connect to the DHCP server on their network. Please take this opportunity to install a DHCP client. If this step is forgotten, then the system might not be able to get on the network thus making it impossible to download a DHCP client afterward.

In order for the system to automatically obtain an IP address for one or more network interface(s) using netifrc scripts, it is necessary to install a DHCP client. We recommend the use of net-misc/dhcpcd although many other DHCP clients are available through the Gentoo repository:

root #emerge --ask net-misc/dhcpcd

More information on dhcpcd can be found in the dhcpcd article.

Optional: Installing a PPPoE client

If PPP is used to connect to the internet, install the net-dialup/ppp package:

root #emerge --ask net-dialup/ppp

Optional: Install wireless networking tools

If the system will be connecting to wireless networks, install the net-wireless/iw package for Open or WEP networks and/or the net-wireless/wpa_supplicant package for WPA or WPA2 networks. iw is also a useful basic diagnostic tool for scanning wireless networks.

root #emerge --ask net-wireless/iw net-wireless/wpa_supplicant

Now continue with Configuring the bootloader.