From b1e2bca22584074d11e83263eca9f7a5a1ec27ec Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 15 Nov 2018 01:46:06 -0600 Subject: Admin: Add beginnings of service chapter --- src/admin/4_services.xml | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) (limited to 'src/admin') diff --git a/src/admin/4_services.xml b/src/admin/4_services.xml index d557b0b..735d19b 100644 --- a/src/admin/4_services.xml +++ b/src/admin/4_services.xml @@ -1,9 +1,37 @@ - Services - + Service management + In this chapter, we will discuss service management in the Adélie Linux system. This will include long-running processes (or services), scheduling processes to run at a later time, and scheduling processes to run periodically. + NoteFor the service management section of this chapter, an OpenRC installation is assumed. Other process management systems, including the s6 supervision suite, are not yet discussed in this documentation. +
+ Services + A service, also called a daemon or server process, is a long-running process that provides a function for your computer, or for others on your network. A service may be a web server, print spooler, a screen resource manager, or any other useful process. There are a number of high-quality services packaged and available for you to install on your Adélie Linux system. Once you install one (or more), you will need to configure and enable them. You can then start, restart, stop, or view the status of any service on your system. In this section, we will use the OpenSSH remote shell service in our examples. OpenSSH allows you to connect to your computer using your login name and password, and run commands on it from another computer. +
+ Installing a service + Refer to for detailed information about installing packages. When you install the openssh package using apk add openssh, you may notice that APK automatically installs openssh-openrc for you. Services packaged by Adélie Linux always include -openrc subpackages which allow you to quickly and easily bring up new services on your systems. +
+
+ Enabling and disabling services + Security NoticeRemember to always review a service's documentation and best practices for configuration before enabling and starting the service. + To enable a service, you may use the command rc-update add SERVICE default, where SERVICE is the name of the service — in this example, sshd. This adds the service to OpenRC's default runlevel, which means the service will automatically start when the system is booted. You may configure other runlevels based on your needs; however, this process is beyond the scope of this handbook. Refer to the official OpenRC documentation for more information. + To disable a service, and prevent it from automatically starting on system boot, you may use the command rc-update del SERVICE default, where SERVICE is the name of the service. +
+
+ Starting, stopping, and restarting services + To start a service, you may use the command service SERVICE start, where SERVICE is the name of the service you wish to start. To stop a service, you may use the command service SERVICE stop, and to restart, you may use the command service SERVICE restart. +
+
+ Viewing service status + To view the status of a single service, you may use the command service SERVICE status, where SERVICE is the service for which you wish to view status. This command will output started if a service is currently running, stopped if a service is not currently running, and crashed if a service stopped running prematurely. + To view the status of all services on your system, you may use the command rc-status. If any services are listed under "Dynamic Runlevel: manual", these are services that have been started but do not belong to any runlevel. That means they have been started without being enabled first, and will not automatically start on next system boot. +
+
+
+ Scheduling a process to run later + You may wish to run a command at a specific time. Therefore, we should describe at here some day. +
- - + Scheduling a process to run periodically + ... explain cron ...
-- cgit v1.2.3-70-g09d2