venerdì 20 dicembre 2013

CentOS: gestione dei servizi

[root@centoshost ~]# chkconfig --list
auditd          0:off   1:off   2:on    3:on    4:on    5:on    6:off
blk-availability        0:off   1:on    2:on    3:on    4:on    5:on    6:off
crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off
ip6tables       0:off   1:off   2:on    3:on    4:on    5:on    6:off
iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off
lvm2-monitor    0:off   1:on    2:on    3:on    4:on    5:on    6:off
netconsole      0:off   1:off   2:off   3:off   4:off   5:off   6:off
netfs           0:off   1:off   2:off   3:on    4:on    5:on    6:off
network         0:off   1:off   2:on    3:on    4:on    5:on    6:off
postfix         0:off   1:off   2:on    3:on    4:on    5:on    6:off
rdisc           0:off   1:off   2:off   3:off   4:off   5:off   6:off
restorecond     0:off   1:off   2:off   3:off   4:off   5:off   6:off
rsyslog         0:off   1:off   2:on    3:on    4:on    5:on    6:off
saslauthd       0:off   1:off   2:off   3:off   4:off   5:off   6:off
sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
udev-post       0:off   1:on    2:on    3:on    4:on    5:on    6:off
[root@centoshost ~]#

mostra un servizio specifico:
chkconfig --list <service_name>

abilita o disabilita un servizio per i runlevel 2, 3, 4, e 5:
chkconfig <service_name> <on|off>

abilita o disabilita un servizio per alcuni runlevel (non valido per i servizi gestiti da inted):
chkconfig <service_name> <on|off> --levels <runlevel, ad esempio: 35 per i runlevel 3 e 5>

mostra lo stato di tutti i servizi:
service --status-all

avvio/stop/riavvio/stato per un servizio:
service <service_name> <start|stop|restart|status>