LINUX.ORG.RU

Как отключить ненужные сервисы в CentOS?

 ,


0

1

Я сделал, но сделал костыльно. http://paste.org.ru/?ydjupl Как сделать то же самое, но 1). Сразу во всех уровнях запуска одной командой? 2). Вообще мышкой в GUI? В репо искал и не нашёл.

Вот так стало:

$ free -m
             total       used       free     shared    buffers     cached
Mem:           502        313        188          0         18        241
-/+ buffers/cache:         53        449
Swap:          251          0        251

CentOS 5, KDE.

How to enable and disable services in Red Hat

Red Hat, Fedora, and Red Hat based Linux distributions such as CentOS make use of the script called chkconfig to enable and disable the system services running in Linux.

How to enable a service

As an example, lets enable the Apache web server to start in run levels 2, 3, and 5. This is how it is done.

We first add the service using chkconfig script. Then turn on the service at the desired run levels.

# chkconfig httpd --add
# chkconfig  httpd  on --level 2,3,5

This will enable the Apache web server to automatically start in the run levels 2, 3 and 5. You can check this by running the command -

# chkconfig --list httpd

How to disable a service

# chkconfig httpd off
# chkconfig httpd --del

Red Hat/Fedora also have a useful script called service which can be used to start or stop any service. For example, to start Apache web server using the service script, the command is as follows -

# service httpd start

and to stop the service...

# service httpd stop

The options being start, stop and restart which are self explanatory.
int13h ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.