martes, 20 de diciembre de 2011

LINUX: tips niveles de arranque (Genérico).

En cualquier S.O linux se puede aplicar los siguientes tips de niveles de arranque.

Ejemplo:
Buscando el servicio cups dentro del directorio runlevel 3


[root@localhost ~]# l /etc/rc.d/rc3.d/S56cups
lrwxrwxrwx 1 root root 14 Aug 12 13:37 /etc/rc.d/rc3.d/S56cups -> ../init.d/cups
[root@localhost ~]#



Un servicio que esta habilitado dentro del directorio comienza con el prefijo "S"

Un servicio que esta habilitado dentro del directorio comienza con el prefijo "K"

[root@localhost ~]# l /etc/rc.d/rc3.d/K74ntpd
lrwxrwxrwx 1 root root 14 Aug 8 15:28 /etc/rc.d/rc3.d/K74ntpd -> ../init.d/ntpd
[root@localhost ~]#

Se Puede editar el link simbolico:

Para deshabilitar uno que esta habilitado, reemplazar el prefijo "S" por "K"
[root@localhost rc3.d]# mv S56cups K56cups
[root@localhost rc3.d]# chkconfig --list | grep cups
cups 0:off 1:off 2:off 3:off 4:off 5:on 6:off
[root@localhost rc3.d]#


Para habilitar uno que esta deshabilitado, reemplazar el prefijo "K" por "S"

[root@localhost rc3.d]# mv K56cups S56cups
[root@localhost rc3.d]# chkconfig --list | grep cups
cups 0:off 1:off 2:off 3:on 4:off 5:on 6:off
[root@localhost rc3.d]#

Se recomienda que si se añade un servicio, sea despues del networking:


Detener un servicio con "service"
[root@localhost rc3.d]# service cups stop
Stopping cups: [ OK ]
[root@localhost rc3.d]# [

Iniciar un servicio con "service"
[root@localhost rc3.d]# service cups start
Starting cups: [ OK ]
[root@localhost rc3.d]#

Detener un servicio con "init.d"
[root@localhost rc3.d]# /etc/init.d/cups stop
Stopping cups: [ OK ]

Iniciar un servicio con "init.d"
[root@localhost rc3.d]# /etc/init.d/cups start
Starting cups: [ OK ]
[root@localhost rc3.d]#

No hay comentarios:

Publicar un comentario