informatica:linux:runlevel
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
informatica:linux:runlevel [2007/09/23 11:45] – created 80.35.129.70 | informatica:linux:runlevel [2015/04/13 20:19] – external edit 127.0.0.1 | ||
---|---|---|---|
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: | ||
- | Red Hat: | + | Creamos el script en /etc/init.d indicando runlevel y posición de arranque y parada. Por ejemplo le damos el nombre servicio: |
- | # chkconfig --list |grep -i sendmail | + | < |
- | sendmail | + | #! /bin/bash |
- | # chkconfig --level 2 sendmail off | + | |
- | # chkconfig --list |grep -i sendmail | + | |
- | sendmail | + | |
- | Debian: | + | # chkconfig: 2345 90 60 |
+ | |||
+ | case " | ||
+ | start) | ||
+ | |||
+ | runuser usuario -c " | ||
+ | |||
+ | ;; | ||
+ | |||
+ | stop) | ||
+ | runuser usuario -c " | ||
+ | |||
+ | ;; | ||
+ | *) | ||
+ | echo $" | ||
+ | exit 1 | ||
+ | esac | ||
+ | exit $? | ||
+ | </ | ||
+ | |||
+ | Añadimos el servicio: | ||
+ | # chkconfig --add servicio | ||
+ | |||
+ | Ahora ya lo podemos administrar con chkconfig | ||
+ | |||
+ | # chkconfig --list |grep -i sendmail | ||
+ | |||
+ | sendmail | ||
+ | |||
+ | # chkconfig --level 2 sendmail off | ||
+ | |||
+ | # chkconfig --list |grep -i sendmail | ||
+ | |||
+ | sendmail | ||
+ | |||
+ | |||
+ | ===== Debian ===== | ||
Copiar el ejecutable en /etc/init.d | Copiar el ejecutable en /etc/init.d | ||
- | # | + | |
+ | | ||
+ | |||
+ | 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