{"id":228,"date":"2014-11-16T19:30:49","date_gmt":"2014-11-16T18:30:49","guid":{"rendered":"http:\/\/maburro-robermb.rhcloud.com\/?p=228"},"modified":"2024-02-25T23:09:24","modified_gmt":"2024-02-25T22:09:24","slug":"administrando-servicios-y-runlevels-en-rhel-7","status":"publish","type":"post","link":"https:\/\/robermb.com\/blog\/geeks\/administrando-servicios-y-runlevels-en-rhel-7\/","title":{"rendered":"Administrando Servicios y Runlevels en RHEL 7"},"content":{"rendered":"<p>En <strong>RHEL 7<\/strong>\u00a0<span style=\"line-height: 1.5em;\">se han producido algunos cambios a la hora de <strong>administrar<\/strong> los <strong>servicios<\/strong> y los <strong>niveles de ejecuci\u00f3n<\/strong>.<\/span><\/p>\n<p>Han aparecido alternativas a los comandos &#8216;service&#8217; &#8216;chkconfig&#8217; y &#8216;init &#8216;. Ahora se gestiona todo con el comando <em><strong>systemctl<\/strong><\/em>.<\/p>\n<div>\n<ul>\n<li><strong><span style=\"text-decoration: underline;\">ADMINISTRAR SERVICIOS<\/span><\/strong><\/li>\n<\/ul>\n<\/div>\n<div>&#8211; <span style=\"text-decoration: underline;\">Arrancar \/ Parar \/ Reiniciar servicio<\/span>:<\/div>\n<pre class=\"lang:default decode:true\"># systemctl start httpd.service\n# systemctl stop httpd.service\n# systemctl restart httpd.service<\/pre>\n<div><!--more--><\/div>\n<div>&#8211; <span style=\"text-decoration: underline;\">Habilitar el inicio autom\u00e1tico de un servicio en el arranque o para deshabilitarlo<\/span>:<\/div>\n<pre class=\"lang:default decode:true\"># systemctl enable httpd.service\n# systemctl disable httpd.service<\/pre>\n<p>&#8211; <span style=\"text-decoration: underline;\">Listar servicios<\/span>:<\/p>\n<pre class=\"lang:default decode:true\"># systemctl list-units<\/pre>\n<div><\/div>\n<div>&#8211; <span style=\"text-decoration: underline;\">Mostrar estado de un servicio<\/span>:<\/div>\n<div>\n<pre># systemctl status httpd.service<\/pre>\n<\/div>\n<div>\n<ul>\n<li><strong style=\"text-decoration: underline;\">ADMINISTRAR RUNLEVELS O TARGETS<\/strong><\/li>\n<\/ul>\n<\/div>\n<div>Tambi\u00e9n ha cambiado la forma de administrar los Runlevels o Targets.<\/div>\n<div><\/div>\n<div>&#8211; <span style=\"text-decoration: underline;\">Equivalencia de runlevel y target<\/span>:<\/div>\n<div><\/div>\n<table style=\"height: 251px;\" width=\"390\">\n<thead>\n<tr>\n<th align=\"center\"><span style=\"text-decoration: underline;\">Runlevel<\/span><\/th>\n<th align=\"center\"><span style=\"text-decoration: underline;\">Target Units<\/span><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td align=\"center\">0<\/td>\n<td align=\"center\">poweroff.target<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">1<\/td>\n<td align=\"center\">rescue.target<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">2<\/td>\n<td align=\"center\">multi-user.target<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">3<\/td>\n<td align=\"center\">multi-user.target<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">4<\/td>\n<td align=\"center\">multi-user.target<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">5<\/td>\n<td align=\"center\">graphical.target<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">6<\/td>\n<td align=\"center\">reboot.target<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div><\/div>\n<div>&#8211; <span style=\"text-decoration: underline;\">Listar todos los Runlevels\/Targets:<\/span><\/div>\n<div>\n<pre class=\"lang:default decode:true\"># systemctl list-units --type target --all<\/pre>\n<\/div>\n<div>&#8211; <span style=\"text-decoration: underline;\">Mostrar el default target que est\u00e1 configurado<\/span>:<\/div>\n<div>\n<pre class=\"lang:default decode:true\"># systemctl get-default<\/pre>\n<\/div>\n<div>\n<p>&#8211; <span style=\"text-decoration: underline;\">C<\/span><span style=\"text-decoration: underline;\">onfigurar el default target a &#8216;runlevel 3&#8217;:<\/span><\/p>\n<pre class=\"lang:default decode:true\"># systemctl set-default multi-user.target<\/pre>\n<p>&#8211; <span style=\"text-decoration: underline;\">Cambiar a &#8216;runlevel 3&#8217;<\/span>:<\/p>\n<pre class=\"lang:default decode:true\"># systemctl isolate multi-user.target<\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>En RHEL 7\u00a0se han producido algunos cambios a la hora de administrar los servicios y los niveles de ejecuci\u00f3n. Han &hellip; <a href=\"https:\/\/robermb.com\/blog\/geeks\/administrando-servicios-y-runlevels-en-rhel-7\/\" class=\"more-link\">More <span class=\"screen-reader-text\">Administrando Servicios y Runlevels en RHEL 7<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1856,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,8],"tags":[35,49,130],"_links":{"self":[{"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/posts\/228"}],"collection":[{"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/comments?post=228"}],"version-history":[{"count":1,"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/posts\/228\/revisions"}],"predecessor-version":[{"id":2006,"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/posts\/228\/revisions\/2006"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/media\/1856"}],"wp:attachment":[{"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/media?parent=228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/categories?post=228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/tags?post=228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}