검색

이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 12. Services and Daemons

download PDF
Maintaining security on your system is extremely important, and one approach for this task is to manage access to system services carefully. Your system may need to provide open access to particular services (for example, httpd if you are running a web server). However, if you do not need to provide a service, you should turn it off to minimize your exposure to possible bug exploits.
This chapter explains the concept of runlevels, and describes how to set the default one. It also covers the setup of the services to be run in each of these runlevels, and provides information on how to start, stop, and restart the services on the command line using the service command.

Important

When you allow access for new services, always remember that both the firewall and SELinux need to be configured as well. One of the most common mistakes committed when configuring a new service is neglecting to implement the necessary firewall configuration and SELinux policies to allow access for it. For more information, see the Red Hat Enterprise Linux 6 Security Guide.

12.1. Configuring the Default Runlevel

A runlevel is a state, or mode, defined by services that are meant to be run when this runlevel is selected. Seven numbered runlevels exist (indexed from 0):
Table 12.1. Runlevels in Red Hat Enterprise Linux
RunlevelDescription
0 Used to halt the system. This runlevel is reserved and cannot be changed.
1 Used to run in a single-user mode. This runlevel is reserved and cannot be changed.
2 Not used by default. You are free to define it yourself.
3 Used to run in a full multi-user mode with a command-line user interface.
4 Not used by default. You are free to define it yourself.
5 Used to run in a full multi-user mode with a graphical user interface.
6 Used to reboot the system. This runlevel is reserved and cannot be changed.
To check in which runlevel you are operating, type the following:
~]$ runlevel
N 5
The runlevel command displays previous and current runlevel. In this case it is number 5, which means the system is running in a full multi-user mode with a graphical user interface.
The default runlevel can be changed by modifying the /etc/inittab file, which contains a line near the end of the file similar to the following:
id:5:initdefault:
To do so, edit this file as root and change the number on this line to the desired value. The change will take effect the next time you reboot the system.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.