informatica:linux:runlevel
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
informatica:linux:runlevel [2010/03/17 18:07] – 83.247.136.12 | informatica:linux:runlevel [2015/07/21 13:05] – jose | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Runlevel | + | ====== Runlevels ====== |
+ | |||
+ | ===== Red Hat ===== | ||
Para añadir un servicio en los diferentes niveles de ejecución: | Para añadir un servicio en los diferentes niveles de ejecución: | ||
+ | Creamos el script en /etc/init.d indicando runlevel y posición de arranque y parada. Por ejemplo le damos el nombre servicio: | ||
+ | < | ||
+ | #! /bin/bash | ||
- | Red Hat: | + | # chkconfig: 2345 90 60 |
- | # chkconfig --list |grep -i sendmail | + | case " |
+ | start) | ||
- | sendmail | + | runuser usuario -c " |
- | # chkconfig --level 2 sendmail off | + | ;; |
- | # chkconfig | + | stop) |
+ | runuser usuario | ||
- | sendmail | + | ;; |
+ | *) | ||
+ | echo $" | ||
+ | exit 1 | ||
+ | esac | ||
+ | exit $? | ||
+ | </ | ||
+ | Añadimos el servicio: | ||
+ | # chkconfig --add servicio | ||
- | Debian: | + | Ahora ya lo podemos administrar con chkconfig |
+ | # chkconfig --list |grep -i sendmail | ||
+ | |||
+ | sendmail | ||
+ | |||
+ | # chkconfig --level 2 sendmail off | ||
+ | |||
+ | # chkconfig --list |grep -i sendmail | ||
+ | |||
+ | sendmail | ||
+ | | ||
+ | Para activar un servicio: | ||
+ | chkconfig --list rngd | ||
+ | rngd | ||
+ | |||
+ | chkconfig rngd on | ||
+ | |||
+ | chkconfig --list rngd | ||
+ | rngd | ||
+ | |||
+ | | ||
+ | |||
+ | |||
+ | ===== Debian ===== | ||
Copiar el ejecutable en /etc/init.d | Copiar el ejecutable en /etc/init.d | ||
- | # | + | |
Deshabilitar en niveles: \\ | Deshabilitar en niveles: \\ | ||
- | # | + | |
+ | |||
+ | Herramientas gráficas pero de líneas de comando: | ||
+ | rcconf sysv-rc-conf |
informatica/linux/runlevel.txt · Last modified: 2019/12/04 09:21 by osk-k-k-k