[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
es:howtos:general_admin:openrc [2019/02/09 20:09 (UTC)] – [Post installation] slackwarespanoles:howtos:general_admin:openrc [2019/02/18 20:34 (UTC)] (actual) – [Migración de /etc/init.d a /etc/openrc/init.d] slackwarespanol
Línea 1: Línea 1:
 <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). -->
-<note warning>En proceso de traducción. Victor</note>+
 ====== OpenRC ====== ====== OpenRC ======
  
Línea 37: Línea 37:
   echo 'agetty_options="--noclear"' >> /etc/openrc/conf.d/agetty.ttyS0   echo 'agetty_options="--noclear"' >> /etc/openrc/conf.d/agetty.ttyS0
  
-=== Update boot parameters ===+=== Actualizar los parámetros de arranque ===
  
-Add the following to your boot parameters (via ///etc/lilo.conf// for lilo or ///etc/default/grub// for grub): +Agregue lo siguiente a sus parámetros de arranque (a través de ///etc/lilo.conf// para lilo ///etc/default/grub // para grub): 
-  init=/sbin/openrc-init+   init =/sbin/openrc-init
  
-Regenerate boot configuration ('lilo -v' or 'grub-mkconfig -o /boot/grub/grub.cfg').+Vuelva a generar la configuración de inicio ('lilo -v' 'grub-mkconfig -o /boot/grub/grub.cfg').
  
-=== Enable boot logging ===+=== Habilitar el registro de arranque ===
  
-The main configuration file for OpenRC is ///etc/openrc/rc.conf//, and contains various options.+El archivo de configuración principal para OpenRC es ///etc/openrc/rc.conf//, y contiene varias opciones.
  
-A common option that could be changed is to enable boot logging by setting ''rc_logger="YES"'', this way any errors encountered via booting could be logged and examined later (default log location is ///var/log/rc.log//).+Una opción común que podría cambiarse es habilitar el registro de inicio configurando '' rc_logger = "YES"'', de esta manera, cualquier error encontrado durante el inicio podría registrarse y examinarse más tarde (la ubicación predeterminada del registro es  ///var/log/rc.log//).
  
-===== On reboot =====+===== Reinicio =====
  
-On rebootingone is booted to a command line with only the bare minimum of services enabled.+Al reiniciar,arranca en línea de comandos con solo el mínimo de servicios habilitados.
  
-It may show a warning about deprecated support for ///etc/mtab// as a fileand how to correct it:+Puede mostrar una advertencia sobre el soporte en desuso para ///etc/mtab // como un archivoy cómo corregirlo:
   # cp /etc/mtab /etc/mtab.bkp   # cp /etc/mtab /etc/mtab.bkp
   # ln -snf /proc/self/mounts /etc/mtab   # ln -snf /proc/self/mounts /etc/mtab
      
-It may also complain about missing ///etc/sysctl.conf// file which can be created as:+También puede reclamar de que falta el archivo ///etc/sysctl.conf// que se puede crear como:
  
   # touch /etc/sysctl.conf   # touch /etc/sysctl.conf
  
-==== Enabling some services ====+==== Habilitando algunos servicios ====
  
-Services can be enabled as:+Los servicios se pueden habilitar como:
  
   # rc-service add <service> <runlevel>   # rc-service add <service> <runlevel>
  
-They can be disabled as:+Pueden ser desactivados como:
  
   # rc-service del <service> <runlevel>   # rc-service del <service> <runlevel>
  
-Some common services that could be enabled:+Algunos servicios comunes que podrían ser habilitados:
  
   # rc-update add dbus default   # rc-update add dbus default
Línea 81: Línea 81:
   # rc-update add sshd default  # for server   # rc-update add sshd default  # for server
  
-Enabled services in current runlevel can be queried with:+Los servicios habilitados en el nivel de ejecución actual se pueden consultar con:
   $ rc-status   $ rc-status
  
-Enabled services across all runlevels can be queried with:+Los servicios habilitados en todos los niveles de ejecución se pueden consultar con:
   $ rc-update   $ rc-update
  
-Some services that are enabled by default for the **sysinit** runlevel include udev and udev-postmount.+Algunos servicios que están habilitados de forma predeterminada para el nivel de ejecución ** sysinit ** incluyen udev udev-postmount.
  
-Users who use dmcrypt, lvm, or mdraid could add the following services respectively to the **boot** runlevel:+Los usuarios que usan dmcrypt, lvm mdraid podrían agregar los siguientes servicios respectivamente al nivel de arranque ** boot **:
  
   # rc-update add dmcrypt boot        # dmcrypt   # rc-update add dmcrypt boot        # dmcrypt
Línea 96: Línea 96:
   # rc-update add mdraid boot         # mdraid   # rc-update add mdraid boot         # mdraid
  
-=== Network ===+=== Red ===
  
-If using ethernet via DHCP, the **dhcpcd** service could be enabled:+Si usa Ethernet a través de DHCP, el servicio ** dhcpcd ** podría estar habilitado:
   # rc-update add dhcpcd default   # rc-update add dhcpcd default
  
-If using wifi with laptops the **NetworkManager** or **wicd** service could be enabledThe combination of dhcpcd and wpa_supplicant (along with a frontend like wpa_gui or wpa_cli) could also be used as a lightweight alternative.+Si usa wifi con computadoras portátiles, el servicio ** NetworkManager ** ** wicd ** podría estar habilitadoLa combinación de dhcpcd wpa_supplicant (junto con una interfaz como wpa_gui wpa_cli) también podría usarse como una alternativa ligera.
  
-A static network can be configured by editing ///etc/openrc/conf.d/network//.+Se puede configurar una red estática editando ///etc/openrc/conf.d/network//.
  
-=== Display manager === +=== Gestor de visualización ===
- +
-To boot to a graphical display manager, ///etc/openrc/conf.d/xdm// can be edited to specify the display manager, and the xdm service could be enabled:+
  
 +Para iniciar desde un administrador de pantalla gráfico, ///etc/openrc/conf.d/xdm// se puede editar para especificar el administrador de pantalla, y el servicio xdm se podría habilitar:
   # rc-update add xdm default   # rc-update add xdm default
  
-If using a laptopthe **acpid** service could be enabled as well.+Si usa una computadora portátilel servicio ** acpid ** también podría habilitarse.
  
-=== Migrating existing enabled services ===+=== Migración de servicios habilitados existentes ===
  
-To check existing enabled servicesfollowing code could be used:+Para verificar los servicios habilitados existentesse podría usar el siguiente código:
  
  
Línea 124: Línea 123:
   done   done
  
-For these services corresponding OpenRC services could be enabledfor example:+Para estos servicios, se podrían habilitar los servicios OpenRC correspondientespor ejemplo:
  
   # rc-update add acpid default   # rc-update add acpid default
Línea 131: Línea 130:
   ...   ...
  
-All services present can be queried via:+Todos los servicios presentes se pueden consultar a través de:
  
   $ rc-update -v   $ rc-update -v
  
-====== Configuration ======+====== Configuración ======
  
-OpenRC services are present in the ///etc/openrc/init.d// folderand corresponding configuration files are present in ///etc/openrc/conf.d//+Los servicios de OpenRC están presentes en la carpeta ///etc/openrc/init.d//, y los archivos de configuración correspondientes están presentes en ///etc/openrc/conf.d//
  
-Some common configuration files include:+Algunos archivos de configuración comunes incluyen:
  
   /etc/openrc/conf.d/modules    # modules to be loaded at boot   /etc/openrc/conf.d/modules    # modules to be loaded at boot
Línea 145: Línea 144:
   /etc/openrc/conf.d/keymaps    # console keymap   /etc/openrc/conf.d/keymaps    # console keymap
  
-===== Service management =====+===== Gestión de servicios =====
  
-Services can be started/stopped/restarted as:+Los servicios se pueden iniciar detener reiniciar como:
  
   # rc-service <service> <action>   # rc-service <service> <action>
  
-For example,+ 
 +Por ejemplo,
  
   # rc-service sshd start   # rc-service sshd start
  
      
-===== Shutdown/reboot =====+===== Apagar reiniciar =====
  
-To shutdown or rebootone will need to use **openrc-shutdown**. To shutdown from a desktop environment using ConsoleKit2, check out this [[https://github.com/ConsoleKit2/ConsoleKit2/pull/113|PR]].+Para apagar o reiniciaruno tendrá que usar ** openrc-shutdown **. Para cerrar desde un entorno de escritorio con ConsoleKit2, consulte este [[https://github.com/ConsoleKit2/ConsoleKit2/pull/113|PR]]. 
 +====== Solución de problemas ======
  
-====== Troubleshooting ====== +En este momento solo se ha probado un subconjunto de los servicios incluidospor lo que es posible que algunos de ellos no se ejecuten correctamente.
- +
-At the moment only a subset of the included services have been testedso some of them may not run correctly. +
- +
-If some service does not work, try the system provided one in ///etc/rc.d// (if available).+
  
 +Si algún servicio no funciona, pruebe el sistema provisto en ///etc/rc.d// (si está disponible).
 ==== mysqld ==== ==== mysqld ====
  
-Try adding the following lines to ///etc/my.cnf//+Intente agregar las siguientes líneas a ///etc/my.cnf//
  
   [mysqld]   [mysqld]
Línea 177: Línea 175:
   socket = /var/run/mysql/mysql.sock   socket = /var/run/mysql/mysql.sock
  
-==== Dealing with crashed services ====+==== Tratar con servicios colapsados ====
  
-Sometimes openrc reports a service's status as "crashed"The process may have died or its pid file disappeared/changed.+A veces, openrc informa del estado de un servicio como "bloqueado"El proceso puede haber muerto o su archivo pid desapareció cambió.
  
-If one tries to start a crashed service, `rc-service` reports:+Si se intenta iniciar un servicio bloqueadolos informes de `rc-service`:
  
   * WARNING: <service> has already been started   * WARNING: <service> has already been started
 +Así que uno intenta detenerlo antes de volver a empezar.
  
-So one tries to stop it before starting again. +Sin embargo, en algunas situacionesel servicio no se detieneEsto conduce un punto muerto en el que no se puede detener el servicio ni iniciarloPara tales casos:
- +
-However in some situationsthe service does not stopThis leads to deadlock where one can neither stop the service nor start itFor such cases:+
  
   # rc-service <service> zap   # rc-service <service> zap
Línea 196: Línea 193:
 ===== openrc-init ===== ===== openrc-init =====
  
-Since version **0.25**, openrc provides //openrc-init// which can be used to boot the system.+Desde la versión ** 0.25 **, openrc proporciona // openrc-init // que puede usarse para iniciar el sistema.
  
-This allows switching between OpenRC and other init systemsfor example sysvinit, just by changing boot parameters.+Esto permite cambiar entre OpenRC y otros sistemas init, por ejemplo, sysvinit, simplemente cambiando los parámetros de arranque.
  
-For more infocheck out the [[https://wiki.gentoo.org/wiki/OpenRC#openrc-init|Gentoo wiki]].+Para obtener más informaciónconsulte la [[https://wiki.gentoo.org/wiki/OpenRC#openrc-init|Gentoo wiki]].
  
-===== Migrating from /etc/init.d to /etc/openrc/init.d =====+===== Migración de /etc/init.d /etc/openrc/init.d =====
  
-OpenRC 0.39+, as shipped via SBo, changes the service and configuration directory to ///etc/openrc// instead of ///etc//.+OpenRC 0.39+, tal como se envió a través de SBo, cambia el directorio de servicio y configuración a ///etc/openrc // en lugar de ///etc//.
  
-This is being done to maintain greater compatibility with a vanilla Slackware install.+Esto se está haciendo para mantener una mayor compatibilidad con una instalación Slackware vanilla.
  
-Existing services will need to be migrateddetails below on how it can be done.+Los servicios existentes deberán migrarsea continuación se detallan los detalles sobre cómo se puede hacer.
  
-=== 1. Install openrc-0.39.2 and openrc-services-20181107 ===+=== 1. Instale openrc-0.39.2 openrc-services-20181107 ===
  
-These packages ship the configuration and service files in ///etc/openrc//.+Estos paquetes envían los archivos de configuración y servicio en ///etc/openrc //.
  
-=== 2. Migrate existing services ===+=== 2. Migra los servicios existentes ===
  
-This involves steps:+Esto implica pasos:
  
   # migrate existing services   # migrate existing services
Línea 271: Línea 268:
   done   done
  
-Config changes found above can be updated by hand or copy pasted in new location.+Los cambios de configuración encontrados anteriormente se pueden actualizar manualmente o pegar en una nueva ubicación.
  
-=== 3. Check and reboot ===+=== 3. Revisar y reiniciar ===
  
-Verify if ''rc-status'' is showing all services (it may show them as stopped).+Verifique si '' rc-status '' está mostrando todos los servicios (puede mostrarlos como detenidos).
  
-Reboot and check whether things are working expectedmake changes as necessary.+Reinicie y verifique si las cosas funcionan correctamenterealice los cambios necesarios.
  
-The old files and folders can be renamed (or removed).+Los archivos y carpetas antiguos pueden ser renombrados (o eliminados).
  
   mv /etc/init.d /etc/init.d-openrc-bkp   mv /etc/init.d /etc/init.d-openrc-bkp
Línea 286: Línea 283:
   mv /etc/runlevels /etc/runlevels-openrc-bkp   mv /etc/runlevels /etc/runlevels-openrc-bkp
   mv /etc/rc.conf /etc/rc.conf-openrc.bkp   mv /etc/rc.conf /etc/rc.conf-openrc.bkp
- +   
-Finallyany changes done to the default Slackware system can be reverted+Finalmentecualquier cambio realizado en el sistema Slackware predeterminado puede revertirse
 +  
   mv /etc/init.d-bkp /etc/init.d   mv /etc/init.d-bkp /etc/init.d
  
-====== See Also ======+====== Ver también ======
  
 [[https://en.wikipedia.org/wiki/OpenRC|Wikipedia]] [[https://en.wikipedia.org/wiki/OpenRC|Wikipedia]]
Línea 299: Línea 296:
 [[https://github.com/OpenRC/openrc/|Github]] [[https://github.com/OpenRC/openrc/|Github]]
  
-[[https://github.com/OpenRC/openrc/blob/master/user-guide.md|User guide]]+[[https://github.com/OpenRC/openrc/blob/master/user-guide.md|Guía del usuario]]
  
 [[https://www.linuxquestions.org/questions/slackware-14/using-openrc-on-slackware-4175542567/|LQ thread]] [[https://www.linuxquestions.org/questions/slackware-14/using-openrc-on-slackware-4175542567/|LQ thread]]
Línea 310: Línea 307:
 <!-- * Original source: [[http://some.website.org/some/page.html]] --> <!-- * Original source: [[http://some.website.org/some/page.html]] -->
 <!-- Authors are allowed to give credit to themselves! --> <!-- Authors are allowed to give credit to themselves! -->
-Originally written by [[wiki:user:aaditya | Aaditya]]+   Originalmente escrito por[[wiki:user:aaditya | Aaditya]] 
 +   * Traducido por:  [[wiki:user: slackwarespanol | Victor]] 2019/02/11 01:12 (UTC)  
 <!-- * Contributions by [[wiki:user:yyy | User Y]] --> <!-- * Contributions by [[wiki:user:yyy | User Y]] -->
  
 es:howtos:general_admin:openrc ()