<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7786294552042737107</atom:id><lastBuildDate>Fri, 30 Aug 2024 00:23:07 +0000</lastBuildDate><category>Linux</category><category>MySQL</category><category>Red Hat</category><category>Administración</category><category>CEntOS</category><category>Fedora</category><category>Password</category><category>Python</category><category>Seguridad</category><category>ssh</category><category>Apache</category><category>GNOME</category><category>PHP</category><category>Ubuntu</category><category>Web Server</category><category>http</category><category>Buscar y Reemplazar en VI</category><category>Distros</category><category>GNOME Shell</category><category>HTTPD</category><category>Kaspersky</category><category>Lighttpd</category><category>Malware</category><category>RHEL</category><category>Rubi</category><category>Sistema</category><category>Spyware</category><category>Usuarios</category><category>Virus</category><category>chmod</category><category>comandos</category><category>db</category><category>df</category><category>disco</category><category>ext3</category><category>fdisk</category><category>fstab</category><category>hacking</category><category>index</category><category>mod_status</category><category>mount</category><category>particion</category><category>particiones</category><category>performance</category><category>permisos</category><category>scp</category><category>shell</category><category>sudo</category><category>tty</category><title>The Best Linux Server</title><description></description><link>http://best-linux-server.blogspot.com/</link><managingEditor>noreply@blogger.com (Angel Cabrera)</managingEditor><generator>Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-3967678418385794203</guid><pubDate>Thu, 26 Jul 2012 17:04:00 +0000</pubDate><atom:updated>2012-07-26T12:05:45.944-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">db</category><category domain="http://www.blogger.com/atom/ns#">index</category><category domain="http://www.blogger.com/atom/ns#">MySQL</category><category domain="http://www.blogger.com/atom/ns#">performance</category><title>Optimización de MySQL (Parte 1)</title><description>&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;L&lt;/b&gt;&lt;/span&gt;as bases de datos crecen y crecen a lo largo del tiempo, cada día almacenan más y más información. Por lo que es necesario asegurarse que los resultados solicitados sean entregados en el menor tiempo posible.&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
Medio segundo puede significar la perdida de un 20% del tráfico del sitio, así que es muy importante mejorar el rendimiento de las bases de datos.&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
Se pueden usar índices y particiones para limitar la cantidad de registros que MySQL tiene que procesar para entregar un resultado.&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
Para una consulta frecuente, la creación de un índice es la mejor manera de acelerar las cosas. Por ejemplo, si tenemos una tabla con 40 columnas, de las cuales una columna es accesada frecuentemente, se puede crear un índice para dicha columna y acelerar el proceso de búsqueda. Si no existen índices, MySQL hará un &quot;escaneo&quot; completo para obtener los datos, es decir, se examinan todos los registros en la tabla, uno a uno, hasta el último registro o se satisfaga la consulta.&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
En otros términos, podemos pensar en el índice de un libro. Maravilloso, no?&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
Cuando creamos un índice para un campo, MySQL registra toda la información de la columna en particular, la ordena y luego la almacena en un objeto único o archivo, separado de la tabla, junto con referencias a la tabla original con los datos sin ordenar.&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
El mantenimiento de los índices no requiere cosas adicionales. Si creamos un índice para tabla que es actualizada con frecuencia, todos los&amp;nbsp;&lt;b&gt;DELETE&lt;/b&gt;,&amp;nbsp;&lt;b&gt;INSERT&lt;/b&gt;&amp;nbsp;o&amp;nbsp;&lt;b&gt;UPDATE&lt;/b&gt;&amp;nbsp;también serán actualizados en el índice.&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
Cuidado, el manejo incorrecto de los índices ocasionará una carga extra al servidor y puede generar lentitud en otros procesos, por lo que no deben crear índices para todos los campos. Sólo creen índices para las consultas mas frecuentes o para tablas muy grandes (con miles y miles de registros)&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
Ahora, la forma de indexar va a depender del engine (motor de almacenamiento) que hayan usando al momento de crear las tablas de la base de datos. Anteriomente, MyISAM era el engine por default en mysql server, pero a partir de la versión 5.5 InnoDB a tomado su lugar. Pero no se preocupen, esto es algo que se puede manipular en el archivo de configuración (my.cnf) o se puede especificar mientras se crean las tablas.&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
Hay varios tipos de índices que se pueden utilizar, tales como B-Tree o Hash . La elección del índice depende del motor de almacenamiento que esté en uso.&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
UTILIZAR INDICES&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
Se puede crear un índice para una tabla (mientras se crea la tabla), o bien crearlo para las tablas existentes. Por ejemplo:&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
CREATE TABLE records (&lt;/div&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;name VARCHAR(50),&lt;/div&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;age INT,&lt;/div&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;id_num INT, INDEX (id)&lt;/div&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;);&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
Esto crea un índice llamada id para la columna id_num. Para una tabla existente el comando podría ser:&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
CREATE INDEX id ON records(id_num);&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
Para crear múltiples índices para una tabla:&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
ALTER TABLE records ADD INDEX id(id_num), ADD INDEX name(name);&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
Como MySQL desconoce la naturaleza exacta de los datos almacenados en un campo, se creará un índice con toda la longitud de los datos. Por lo tanto, si tenemos una tabla de artículos, y crear un índice en el campo de título de 50 caracteres, MySQL almacena la longitud total del nombre de cada artículo en la base de datos. En un caso como éste, es sabio almacenar sólo los primeros 20 caracteres en el índice, en lugar de la longitud total. Para grandes bases de datos con columnas muy largas, sería un desperdicio de espacio almacenar todo el nombre en el índice.&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
Puede limitar la longitud de los datos a 20 caracteres especificandolo junto con el nombre de la columna, de este modo:&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
ALTER TABLE records ADD INDEX id(id_num), ADD INDEX name(name(20));&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
Recuerden que un índice mal creado puede ocasionar un consumo excesivo de los recursos del servidor, sobre todo si se usa InnoDB.&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
En el próximo post hablaremos de las particiones.&lt;/div&gt;</description><link>http://best-linux-server.blogspot.com/2012/07/optimizacion-de-mysql-parte-1.html</link><author>noreply@blogger.com (Angel Cabrera)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-8173303911785314376</guid><pubDate>Tue, 12 Jun 2012 05:00:00 +0000</pubDate><atom:updated>2012-07-26T12:10:02.638-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">df</category><category domain="http://www.blogger.com/atom/ns#">disco</category><category domain="http://www.blogger.com/atom/ns#">ext3</category><category domain="http://www.blogger.com/atom/ns#">fdisk</category><category domain="http://www.blogger.com/atom/ns#">mount</category><category domain="http://www.blogger.com/atom/ns#">particion</category><title>Particionar y Formatear un nuevo disco duro con ext3</title><description>Recientemente me informaron acerca de la configuración de discos duros de los nuevos servidores, la necesidad es crear una partición primaria con ext3 y montarla en el directorio /data02.&lt;br /&gt;
&lt;br /&gt;
Manos a la obra:&lt;br /&gt;
&lt;br /&gt;
Lo primero que necesitamos es consultar la tabla de particiones y ubicar el disco que vamos a ocupar, aquí mucho cuidado, cualquier error nos puede arruinar el día. Por lo tanto ejecutamos fdisk de la siguiente forma:&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&lt;b&gt;# /sbin/fdisk -l&lt;/b&gt;&lt;br /&gt;Disk /dev/cciss/c0d0: 299.9 GB, 299966445568 bytes&lt;br /&gt;255 heads, 63 sectors/track, 36468 cylinders&lt;br /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br /&gt;&lt;br /&gt;Device Boot Start End Blocks Id System&lt;br /&gt;/dev/cciss/c0d0p1 * 1 16 128488+ 83 Linux&lt;br /&gt;/dev/cciss/c0d0p2 17 36468 292800690 8e Linux LVM&lt;br /&gt;&lt;br /&gt;Disk /dev/cciss/c0d1: 599.9 GB, 599932844032 bytes&lt;br /&gt;255 heads, 32 sectors/track, 143596 cylinders&lt;br /&gt;Units = cylinders of 8160 * 512 = 4177920 bytes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&lt;b&gt; Disk /dev/cciss/c0d1 doesn&#39;t contain a valid partition table&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
El disco a trabajar es /dev/cciss/c0d1, y tal como lo dice el mensaje: No contiene una tabla de partición válida. Para comenzar, usamos nuevamente el comando fdisk de la siguiente forma (Se resaltan las opciones en negritas):&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# /sbin/fdisk /dev/cciss/c0d1&lt;/b&gt;&lt;br /&gt;Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel&lt;br /&gt;Building a new DOS disklabel. Changes will remain in memory only,&lt;br /&gt;until you decide to write them. After that, of course, the previous&lt;br /&gt;content won&#39;t be recoverable.&lt;br /&gt;&lt;br /&gt;The number of cylinders for this disk is set to 143596.&lt;br /&gt;There is nothing wrong with that, but this is larger than 1024,&lt;br /&gt;and could in certain setups cause problems with:&lt;br /&gt;1) software that runs at boot time (e.g., old versions of LILO)&lt;br /&gt;2) booting and partitioning software from other OSs&lt;br /&gt;(e.g., DOS FDISK, OS/2 FDISK)&lt;br /&gt;Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)&lt;br /&gt;&lt;br /&gt;Command (m for help):&lt;b&gt;n&lt;/b&gt;&lt;br /&gt;Command action&lt;br /&gt;e extended&lt;br /&gt;p primary partition (1-4)&lt;br /&gt;&lt;b&gt; p&lt;/b&gt;&lt;br /&gt;Partition number (1-4):&lt;b&gt; 1&lt;/b&gt;&lt;br /&gt;First cylinder (1-143596, default 1): &lt;b&gt;1&lt;/b&gt;&lt;br /&gt;Last cylinder or +size or +sizeM or +sizeK (1-143596, default143596 ): &lt;b&gt;143596&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Command (m for help): &lt;b&gt;t&lt;/b&gt;&lt;br /&gt;Partition number (1-4): &lt;b&gt;1&lt;/b&gt;&lt;br /&gt;Hex code (type L to list codes): &lt;b&gt;83&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Command (m for help): &lt;b&gt;w&lt;/b&gt;&lt;br /&gt;The partition table has been altered!&lt;br /&gt;&lt;br /&gt;Calling ioctl() to re-read partition table.&lt;br /&gt;Syncing disks.&lt;/span&gt;&lt;/blockquote&gt;
No olviden la &quot;&lt;b&gt;w&lt;/b&gt;&quot;, de lo contrario los cambios no se escribirán en la tabla de particiones.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos a crear el sistema de archivos ext3 (o formatear, como normalmente se dice)&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# /sbin/mkfs.ext3 -b 4096 /dev/cciss/c0d1&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;mke2fs 1.39 (29-May-2006)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;Filesystem label=&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;OS type: Linux&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;Block size=4096 (log=2)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;Fragment size=4096 (log=2)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;73236480 inodes, 146467979 blocks&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;7323398 blocks (5.00%) reserved for the super user&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;First data block=0&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;Maximum filesystem blocks=4294967296&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;4470 block groups&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;32768 blocks per group, 32768 fragments per group&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;16384 inodes per group&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;Superblock backups stored on blocks:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;102400000&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;Writing inode tables: done&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;Creating journal (32768 blocks): done&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;Writing superblocks and filesystem accounting information: done&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;This filesystem will be automatically checked every 33 mounts or&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;180 days, whichever comes first. Use tune2fs -c or -i to override.&lt;/span&gt;&lt;/blockquote&gt;
Ahora que el disco está particionado y formateado, el último paso es &quot;montarlo&quot;, recordemos que el directorio donde deseo montar mi nuevo disco es /data02. Primero creamos el directorio /data02.&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# mkdir /data02&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
Y luego editamos el archivo /etc/fstab para agregar la entrada (en azul):&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;/dev/vg_root/lv_root &amp;nbsp; / &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ext3 &amp;nbsp; defaults &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 1&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;/dev/vg_root/lv_tmp &amp;nbsp; &amp;nbsp;/tmp &amp;nbsp; &amp;nbsp; ext3 &amp;nbsp; defaults &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 2&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;/dev/vg_root/lv_data01 /data01 &amp;nbsp;ext3 &amp;nbsp; defaults &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 2&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;/dev/vg_root/lv_usr &amp;nbsp; &amp;nbsp;/usr &amp;nbsp; &amp;nbsp; ext3 &amp;nbsp; defaults &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 2&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;/dev/vg_root/lv_var &amp;nbsp; &amp;nbsp;/var &amp;nbsp; &amp;nbsp; ext3 &amp;nbsp; defaults &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 2&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;LABEL=/boot &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/boot &amp;nbsp; &amp;nbsp;ext3 &amp;nbsp; defaults &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 2&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;tmpfs &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/dev/shm tmpfs &amp;nbsp;defaults &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 0&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;devpts &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /dev/pts devpts gid=5,mode=620 0 0&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;sysfs &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/sys &amp;nbsp; &amp;nbsp; sysfs &amp;nbsp;defaults &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 0&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;proc &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /proc &amp;nbsp; &amp;nbsp;proc &amp;nbsp; defaults &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 0&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;/dev/vg_root/lv_swap &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;swap &amp;nbsp; swap defaults &amp;nbsp;0 0&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;&lt;b&gt;/dev/cciss/c0d1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/data02 &amp;nbsp;ext3 &amp;nbsp; defaults &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 1&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
Después de crear la entrada, lo que resta es montar el disco:&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# mount /data02&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
Verificamos que todo quedó bien:&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# /bin/df -h&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;Filesystem &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Size Used Avail Use% Mounted on&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;/dev/mapper/vg_root-lv_root &amp;nbsp; &amp;nbsp;2.0G 399M 1.5G &amp;nbsp; 22% /&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;/dev/mapper/vg_root-lv_tmp &amp;nbsp; &amp;nbsp; 3.9G 137M 3.6G &amp;nbsp; &amp;nbsp;4% /tmp&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;/dev/mapper/vg_root-lv_data01 &amp;nbsp;250G 188M 237G &amp;nbsp; &amp;nbsp;1% /data01&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;/dev/mapper/vg_root-lv_usr &amp;nbsp; &amp;nbsp; 5.9G 1.1G 4.5G &amp;nbsp; 20% /usr&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;/dev/mapper/vg_root-lv_var &amp;nbsp; &amp;nbsp; 5.9G 292M 5.3G &amp;nbsp; &amp;nbsp;6% /var&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;/dev/cciss/c0d0p1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;122M &amp;nbsp;13M 103M &amp;nbsp; 11% /boot&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;tmpfs &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16G &amp;nbsp; &amp;nbsp; 0 16G &amp;nbsp; &amp;nbsp;0% /dev/shm&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; font-size: x-small;&quot;&gt;/dev/cciss/c0d1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;550G 198M 522G &amp;nbsp; &amp;nbsp;1% /data02&lt;/span&gt;&lt;/blockquote&gt;</description><link>http://best-linux-server.blogspot.com/2012/06/particionar-y-formatear-un-nuevo-disco.html</link><author>noreply@blogger.com (Angel Cabrera)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-963394452634562005</guid><pubDate>Tue, 15 May 2012 17:14:00 +0000</pubDate><atom:updated>2012-06-18T16:52:55.779-05:00</atom:updated><title>Concatenar comandos en linux</title><description>Concatenar comandos:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;con |&lt;/b&gt; hace que la salida del primero se convierta en la entrada del segundo.&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[root@server ~]# cmd1 | cmd2&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Con &amp;amp;&lt;/b&gt; hará que los dos (o más) comandos se ejecuten de manera simultanea.&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[root@server ~]# cmd1 &amp;amp; cmd2&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Con ||&lt;/b&gt; El segundo comando se ejecutará si el primero termina sin éxito.&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[root@server ~]# cmd1 || cmd2&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Con &amp;amp;&amp;amp;&lt;/b&gt; El segundo comando se ejecutará solo si el primero termina con éxito.&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[root@server ~]# cmd1 &amp;amp;&amp;amp; cmd2&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Con ;&lt;/b&gt; El segundo comando se ejecutará sin importar el resultado del primero.&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[root@server ~]# cmd1 ; cmd2&lt;/pre&gt;</description><link>http://best-linux-server.blogspot.com/2012/05/concatenar-comandos-en-linux.html</link><author>noreply@blogger.com (Angel Cabrera)</author><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-1253194256629971693</guid><pubDate>Thu, 16 Feb 2012 16:39:00 +0000</pubDate><atom:updated>2012-06-18T16:53:48.504-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Distros</category><category domain="http://www.blogger.com/atom/ns#">Linux</category><category domain="http://www.blogger.com/atom/ns#">Red Hat</category><category domain="http://www.blogger.com/atom/ns#">RHEL</category><title>Scientific Linux 6.2</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEj1MQKU0quz7jyukLN-Csr2NF4wa3hFziR8J-Av2D3k5qg4pObIsVJogXmJj-qYr4EIxkHZSZTULfJJX3_swxJvcN_OmnMRDzDuPoQLMs277tU3dhw2HpNLYQN3RQaTLJH341c2GGxo4/s1600/scientific+linux.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEj1MQKU0quz7jyukLN-Csr2NF4wa3hFziR8J-Av2D3k5qg4pObIsVJogXmJj-qYr4EIxkHZSZTULfJJX3_swxJvcN_OmnMRDzDuPoQLMs277tU3dhw2HpNLYQN3RQaTLJH341c2GGxo4/s320/scientific+linux.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;D&lt;/span&gt;&lt;/b&gt;emos la bienvenida a Scientific Linux 6.2 - Distro desarrollada por el CERN y basada en RPMs y SRPMs de Red Hat Enterprise Linux 6 Update 2 Cliente y Servidor.&lt;br /&gt;
&lt;br /&gt;
Notas &lt;a href=&quot;http://www.scientificlinux.org/distributions/6x/rnotes/sl-release-notes-6.2.html&quot;&gt;http://www.scientificlinux.org/distributions/6x/rnotes/sl-release-notes-6.2.html&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
Descarga:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://ftp.scientificlinux.org/linux/scientific/6.2/&quot;&gt;http://ftp.scientificlinux.org/linux/scientific/6.2/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://ftp1.scientificlinux.org/linux/scientific/6.2/&quot;&gt;http://ftp1.scientificlinux.org/linux/scientific/6.2/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;ftp://ftp.scientificlinux.org/linux/scientific/6.2/&quot;&gt;ftp://ftp.scientificlinux.org/linux/scientific/6.2/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
Descarga en formarto Iso i686:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://ftp.scientificlinux.org/linux/scientific/6.2/i386/iso/&quot;&gt;http://ftp.scientificlinux.org/linux/scientific/6.2/i386/iso/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://ftp.scientificlinux.org/linux/scientific/6.2/i386/iso/readme&quot;&gt;http://ftp.scientificlinux.org/linux/scientific/6.2/i386/iso/readme&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
Descarga en formato Iso x86_64:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://ftp.scientificlinux.org/linux/scientific/6.2/x86_64/iso/&quot;&gt;http://ftp.scientificlinux.org/linux/scientific/6.2/x86_64/iso/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://ftp.scientificlinux.org/linux/scientific/6.2/x86_64/iso/&quot;&gt;http://ftp.scientificlinux.org/linux/scientific/6.2/x86_64/iso/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
Mirrors:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.scientificlinux.org/download/mirrors&quot;&gt;http://www.scientificlinux.org/download/mirrors&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><link>http://best-linux-server.blogspot.com/2012/02/scientific-linux-62.html</link><author>noreply@blogger.com (Angel Cabrera)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEj1MQKU0quz7jyukLN-Csr2NF4wa3hFziR8J-Av2D3k5qg4pObIsVJogXmJj-qYr4EIxkHZSZTULfJJX3_swxJvcN_OmnMRDzDuPoQLMs277tU3dhw2HpNLYQN3RQaTLJH341c2GGxo4/s72-c/scientific+linux.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-6659654863723392054</guid><pubDate>Mon, 13 Feb 2012 19:15:00 +0000</pubDate><atom:updated>2012-02-13T13:15:18.287-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PHP</category><category domain="http://www.blogger.com/atom/ns#">Python</category><category domain="http://www.blogger.com/atom/ns#">Rubi</category><title>PHP vs. PYTHON vs. RUBY</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU-DXvpNEMU1bprgi7By6ns79XSC2XrkrPg0dRqUrluEsCBD8xZ8Bbg0A3m56LzsgNPltffTS1apVDLVavCxnPW9CicsNbYJd1OVarZXPgG1llDHHxxruafCiIJMm8FGov9VMog_-68JE/s1600/PROGRAMMING-LANGUAGE-3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU-DXvpNEMU1bprgi7By6ns79XSC2XrkrPg0dRqUrluEsCBD8xZ8Bbg0A3m56LzsgNPltffTS1apVDLVavCxnPW9CicsNbYJd1OVarZXPgG1llDHHxxruafCiIJMm8FGov9VMog_-68JE/s1600/PROGRAMMING-LANGUAGE-3.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;</description><link>http://best-linux-server.blogspot.com/2012/02/php-vs-python-vs-ruby.html</link><author>noreply@blogger.com (Angel Cabrera)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU-DXvpNEMU1bprgi7By6ns79XSC2XrkrPg0dRqUrluEsCBD8xZ8Bbg0A3m56LzsgNPltffTS1apVDLVavCxnPW9CicsNbYJd1OVarZXPgG1llDHHxxruafCiIJMm8FGov9VMog_-68JE/s72-c/PROGRAMMING-LANGUAGE-3.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-4114592175388843246</guid><pubDate>Mon, 16 Jan 2012 19:40:00 +0000</pubDate><atom:updated>2012-01-16T13:41:07.310-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Apache</category><category domain="http://www.blogger.com/atom/ns#">http</category><category domain="http://www.blogger.com/atom/ns#">HTTPD</category><category domain="http://www.blogger.com/atom/ns#">Python</category><title>httpd.conf VirtualHost Splitter</title><description>Sin duda, ser ordenados nos lleva a tener una mejor administración de los&lt;br /&gt;
recursos. Y más, si estamos hablando de una gran infraestructura de servidores Apache que alojan cientos de hosts virtuales.&lt;br /&gt;
&lt;br /&gt;
Por esta razón he creado un script python el cual ayudará en ésta tarea. La filosofía fue la siguiente:&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Generar un archivo de configuración por cada VirtualHost, usando la directiva de Apache &quot;ServerName&quot; por ejemplo: &quot;ServerName&quot;.conf&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Guardar cada archivo creado en en nuevo directorio: /etc/httpd/vhosts/&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Incluir el nuevo directorio en la configuración principal de Apache: Include vhost/*.conf&lt;/li&gt;
&lt;li&gt;Finalmente, comentar todos los VirtualHosts del archivo de configuración principal.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Refrescar la configuración de Apache.&lt;/li&gt;
&lt;/ol&gt;
El script ejecuta algunos comandos de sistema, el primero respalda el&lt;br /&gt;
httpd.conf original por cualquiero cosa (no está de más). Y otros comandos cambian permisos de carpetas y archivos para poder ser usados con otros propósitos (Una interfaz Web)&lt;br /&gt;
&lt;br /&gt;
Bien, aquí les dejo el script, espero sea de su utilidad. &lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black; font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#!/usr/bin/python&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;# AUTHORS:&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ANGEL CABRERA, ALEJANDRO GUADARRAMA&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;# DATE: &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;11/01/2012&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;# DESCR: &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;HTTPD.CONF SPLITTER&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;import re, sys, os&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;vhost_dir = &quot;/etc/httpd/vhost/&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;os.system(&#39;cp -rp %s %s.bak&#39; % (sys.argv[1], sys.argv[1]))&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;print &quot;\nRespaldando configuracion actual...&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;if os.path.exists(vhost_dir):&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;\nYa existe el directorio &quot;, vhost_dir, &quot;\n&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;else:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;\nCreando el directorio &quot;, vhost_dir, &quot;\n&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; os.makedirs(vhost_dir)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; os.chmod(vhost_dir,0775)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;if len(sys.argv) == 1:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; print &quot;Uso: split.py &amp;lt;httpd.conf&amp;gt;&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; sys.exit(1)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;input = open(sys.argv[1], &quot;rb&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;p_include = re.compile(r&quot;[I,i]nclude /etc/httpd/conf.d/vhosts/\*.conf&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;p_comment = re.compile(r&quot;[\s\t]*#.*&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;p_begin = re.compile(r&quot;&amp;lt;VirtualHost[^&amp;gt;]+&amp;gt;&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;p_end = re.compile(r&quot;&amp;lt;/VirtualHost&amp;gt;&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;p_server = re.compile(r&quot;[S,s]erver[N,n]ame[\s\t]*(.*)&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;file_name = &quot;default&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;found = False&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;commented = False&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;servers = {}&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;new_lines = []&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;archivo_comentado = []&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;n_total = 0&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;n_commented = 0&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;num_servers = 0&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;n_include = []&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;total_lineas = 0&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;iniciando = True&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;primer_host = 0&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;for line in input:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; total_lineas += 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; if not found:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i = p_include.search(line)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if i:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n_include.append(line)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; m = p_begin.search(line)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if m:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; found = True&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if iniciando:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; primer_host = total_lineas&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; iniciando&amp;nbsp; = False&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file_name = &quot;default&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new_lines.append(line)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m = p_comment.search(line)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; commented = False&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; archivo_comentado.append(&quot;#&quot;+line)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if m:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; commented = True&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; else:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; archivo_comentado.append(&quot;#&quot;+line)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; new_lines.append(line)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; m = p_server.search(line)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if m:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file_name = m.group(1).strip()&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; m = p_end.search(line)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if m:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; found = False&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if num_servers == 0 and not commented:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; prefijo = &quot;1_&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; prefijo = &quot;&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nombre_arch = vhost_dir+prefijo+file_name+&quot;.conf&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if file_name in servers:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; servers[file_name] += 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file_name += &quot;-%d&quot; % servers[file_name]&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; servers[file_name] = 0&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if commented:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n_commented += 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;Omitiendo virtual host... %s&quot; % nombre_arch +&quot;\n&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; num_servers += 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;Creando virtual host... %s&quot; % nombre_arch +&quot;\n&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output = open(nombre_arch, &quot;wb&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output.writelines(new_lines)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output.close()&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; os.chmod(nombre_arch,0664)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new_lines = []&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n_total += 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;input.close()&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;os.system(&#39;chown -R root:reloadapache %s&#39; % vhost_dir)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;print &quot;\n%d virtual hosts encontrados. %d comentados no creados| %d creados.\n&quot; % (n_total, n_commented,num_servers)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;arch = open(sys.argv[1], &quot;rb&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;contenido_original = arch.readlines()&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;arch.close()&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;del contenido_original[primer_host:(total_lineas+1)]&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;arch_modif = open(sys.argv[1], &quot;w&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;arch_modif.writelines(contenido_original)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;arch_modif.writelines(archivo_comentado)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;arch_modif.write(&quot;\nInclude vhost/*.conf\n&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;arch_modif.writelines(n_include)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;arch_modif.close()&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: black; font-size: small;&quot;&gt;os.system(&#39;/sbin/service httpd reload&#39;)&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
Nos vemos en la siguiente entrada!</description><link>http://best-linux-server.blogspot.com/2012/01/httpdconf-virtualhost-splitter.html</link><author>noreply@blogger.com (Angel Cabrera)</author><thr:total>0</thr:total><georss:featurename>Doroteo Arango 3, Ampl. Emiliano Zapata, Atizapán de Zaragoza, MEX, México</georss:featurename><georss:point>19.600223876261662 -99.263362884521484</georss:point><georss:box>19.598353876261662 -99.265830384521479 19.602093876261662 -99.26089538452149</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-6678768856902845775</guid><pubDate>Wed, 16 Nov 2011 19:16:00 +0000</pubDate><atom:updated>2011-11-16T14:29:04.386-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Administración</category><category domain="http://www.blogger.com/atom/ns#">Apache</category><category domain="http://www.blogger.com/atom/ns#">http</category><category domain="http://www.blogger.com/atom/ns#">mod_status</category><title>Apache mod_status</title><description>&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Menú arriba */
google_ad_slot = &quot;7417695000&quot;;
google_ad_width = 728;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZTgn3w9PBFBipRBVdDKeGiu0oMNpB9pGIbFNcbscDGM8tc9UvEb1De7pfdC28LJ32WO4c4XmxEnlrqPPcGRQRfrie9TnxOVHNaa0oS-s9iun3-mIGLiGpfG8TsHfGs_W5_uBQYr1wd58/s1600/Apache+Server+Status.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;492&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZTgn3w9PBFBipRBVdDKeGiu0oMNpB9pGIbFNcbscDGM8tc9UvEb1De7pfdC28LJ32WO4c4XmxEnlrqPPcGRQRfrie9TnxOVHNaa0oS-s9iun3-mIGLiGpfG8TsHfGs_W5_uBQYr1wd58/s640/Apache+Server+Status.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
El módulo de estado permite a un administrador averiguar qué tan bien está funcionando su servidor. Una página HTML presenta las estadísticas del servidor actual en una forma fácilmente legible. Se puede hacer que esta página se actualice automáticamente. Los datos recogidos son los siguientes:&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;El número solicitudes (request)&lt;/li&gt;
&lt;li&gt;El número de procesos ociosos (idle)&lt;/li&gt;
&lt;li&gt;La situación de cada proceso, el número de solicitudes que se han realizado y la cantidad total de bytes(*)&lt;/li&gt;
&lt;li&gt;El total de accesos y la cantidad de bytes servidos (*)&lt;/li&gt;
&lt;li&gt;El tiempo de inició del servidor y el tiempo que ha estado en funcionamiento&lt;/li&gt;
&lt;li&gt;Promedios, dando el número de solicitudes por segundo, el número de bytes por segundo y el número promedio de bytes por solicitud (*)&lt;/li&gt;
&lt;li&gt;El porcentaje actual de uso del CPU y el total por Apache (*)&lt;/li&gt;
&lt;li&gt;Los hosts actuales y peticiones en trámite (*)&lt;/li&gt;
&lt;/ul&gt;
Las líneas marcadas con &quot;(*)&quot; sólo están disponibles si ExtendedStatus está activado. Verifique que la línea ExtendedStatus del archivo httpd.conf esté descomentada.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Habilitar la compatibilidad de Estado&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Para habilitar los informes de estado sólo para los navegadores del dominio foo.com añadir este código a su httpd.conf.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Location /server-status&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; SetHandler server-status &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;
Order Deny,Allow&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; Deny from all &lt;br /&gt;
&amp;nbsp;&amp;nbsp;
Allow from .foo.com &lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ahora puede acceder a las estadísticas del servidor mediante el uso de un navegador web para acceder a la página http://your.server.name/server-status&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Actualizaciones automáticas&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Usted puede hacer que la página de estado se actualice automáticamente si usted tiene un navegador que soporte &quot;refresh&quot;. Acceder a la página http://your.server.name/server-status?refresh=N para actualizar la página cada N segundos.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Nota&lt;/b&gt;: Este ajuste se aplica a todo el servidor, y no puede ser activada o desactivada por host virtual. El uso de esta caracteristica de apache puede ralentizar el servidor.</description><link>http://best-linux-server.blogspot.com/2011/11/apache-modstatus.html</link><author>noreply@blogger.com (Angel Cabrera)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZTgn3w9PBFBipRBVdDKeGiu0oMNpB9pGIbFNcbscDGM8tc9UvEb1De7pfdC28LJ32WO4c4XmxEnlrqPPcGRQRfrie9TnxOVHNaa0oS-s9iun3-mIGLiGpfG8TsHfGs_W5_uBQYr1wd58/s72-c/Apache+Server+Status.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-2356626694284939063</guid><pubDate>Thu, 27 Oct 2011 20:59:00 +0000</pubDate><atom:updated>2011-10-27T15:59:34.340-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Fedora</category><category domain="http://www.blogger.com/atom/ns#">GNOME</category><category domain="http://www.blogger.com/atom/ns#">GNOME Shell</category><category domain="http://www.blogger.com/atom/ns#">Red Hat</category><title>Fedora 16 + Gnome 3.2: Eficiencia y Facilidad de uso.</title><description>El proyecto Fedora anunció que el próximo lanzamiento de Fedora 16 (Verne), incorporará la última versión del popular entorno de escritorio GNOME.&lt;br /&gt;
&lt;br /&gt;
Fedora tiene como objetivo ofrecer la mejor tecnología de código libre y abierto, integrado en una distribución de Linux que cualquier persona puede descargar libremente, usar, modificar y redistribuir. El lanzamiento de Fedora 16 también incluirá nuevas funciones y mejoras para los usuarios finales, administradores, desarrolladores y entusiastas.&lt;br /&gt;
&lt;br /&gt;
Fedora 16 incluirá GNOME 3.2 o GNOME Shell como se le llama comúnmente. El lanzamiento de GNOME 3.2 ofrece varias mejoras, se destacan:&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Nuevo diseño para GDM, y el gestor de inicio de sesión de GNOME&lt;/li&gt;
&lt;li&gt;Mejoras a la apariencia del escritorio, incluyendo barras de títulos más pequeños y ventanas que son más fáciles de cambiar el tamaño&lt;/li&gt;
&lt;li&gt;Cuentas de usuario en línea para que sea más fácil interactuar con documentos, contactos, calendarios y gestionado por un proveedor en línea&lt;/li&gt;
&lt;li&gt;Contactos, nueva aplicación para el seguimiento de los detalles de sus amigos y colegas&lt;/li&gt;
&lt;li&gt;Documentos, nueva aplicación para encontrar, organizar y visualizar los documentos más utilizados&lt;/li&gt;
&lt;li&gt;Mejoras en el teclado en pantalla y otras funciones de accesibilidad.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
El Proyecto Fedora es un proyecto comunitario patrocinado por Red Hat.&lt;br /&gt;
&lt;br /&gt;
Listo, nos vemos en la siguiente entrada.</description><link>http://best-linux-server.blogspot.com/2011/10/fedora-16-gnome-32-eficiencia-y.html</link><author>noreply@blogger.com (Angel Cabrera)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-122705629193494771</guid><pubDate>Tue, 11 Oct 2011 16:47:00 +0000</pubDate><atom:updated>2011-10-11T11:47:55.515-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">chmod</category><category domain="http://www.blogger.com/atom/ns#">comandos</category><category domain="http://www.blogger.com/atom/ns#">permisos</category><title>Linux - Comando chmod (Parte 1)</title><description>&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;E&lt;/b&gt;&lt;/span&gt;l comando chmod en Linux/Unix se deriva de &lt;b&gt;CH&lt;/b&gt;ange&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;MOD&lt;/b&gt;e, y se utiliza para cambiar los permisos de archivos y carpetas.&lt;br /&gt;
&lt;br /&gt;
Los permisos de Archivos/Carpetas son: lectura (r), escritura (w) y ejecución (x) y aplican para cada usuario (u), grupo (g) y otros (o).&lt;br /&gt;
&lt;br /&gt;
Este tipo de restricción es útil para la correcta administración de archivos y carpetas, proporciona seguridad y nivel de acceso a archivos/carpetas.&lt;br /&gt;
&lt;br /&gt;
Pero, ¿por qué necesitamos cambiar los permisos de archivos/carpetas ?&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Para ejecutar un script&lt;/li&gt;
&lt;li&gt;Cuando una aplicación requiere aceso a archivos/carpetas para trabajar adecuadamente&lt;/li&gt;
&lt;li&gt;Para dar la posibilidad a un usuario de editar un archivo.&lt;/li&gt;
&lt;/ol&gt;
¿Cómo podemos cambiar los persmisos de archivos/carpetas?&lt;br /&gt;
&lt;br /&gt;
Los permisos pueden ser: ejecución, escritura y lectura y se pueden aplicar de dos formas:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt; Método Numérico: Usando números (1, 2 y 4)&lt;/li&gt;
&lt;li&gt;Método Alfa: Usando caracteres (w, x, r, u, o, g, a, -, +, =, s, t&lt;/li&gt;
&lt;/ol&gt;
&lt;b&gt;Método Numérico&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
2^0=1&amp;nbsp;&amp;nbsp; --&amp;gt;&amp;nbsp; Ejecución&amp;nbsp; (x)&lt;br /&gt;
2^1=2&amp;nbsp;&amp;nbsp; --&amp;gt;&amp;nbsp; Escritura&amp;nbsp; (w)&lt;br /&gt;
2^2=4&amp;nbsp;&amp;nbsp; --&amp;gt;&amp;nbsp; Lectura&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (r)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Método Alfa&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
w -&amp;nbsp; escritura&lt;br /&gt;
x&amp;nbsp; -&amp;nbsp; ejecución&lt;br /&gt;
r&amp;nbsp; -&amp;nbsp; lectura&lt;br /&gt;
u&amp;nbsp; -&amp;nbsp; usuario&lt;br /&gt;
g&amp;nbsp; -&amp;nbsp; grupo&lt;br /&gt;
o&amp;nbsp; -&amp;nbsp; otros&lt;br /&gt;
a&amp;nbsp; -&amp;nbsp; todos&lt;br /&gt;
+ -&amp;nbsp; agregar los permisos al usuario/grupo/otros mencionado&lt;br /&gt;
-&amp;nbsp;&amp;nbsp; -&amp;nbsp; remover los permidos al usuario/grupo/otros mencionado&lt;br /&gt;
= -&amp;nbsp; replicar los permisos a otra clase de usuario/grupo/otros&lt;br /&gt;
&lt;br /&gt;
Adicional a esto, hay otros conceptos que van ligados al método numérico
 y alfa (SUID, SGID, Sticky Bit). Mas adelante, en otro post explicaré esto.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
A continuación veremos como cambiar los permisos básicos a un archivo. Para esto, será necesario entender la salida del comando ls.&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[angel@angelcm ~]$ ls -al
Total 36
&lt;b&gt;-&lt;/b&gt;&lt;span style=&quot;color: blue;&quot;&gt;rw-------.&lt;/span&gt;  1 angel angel     39913 Oct 11 11:05 .bash_history
&lt;b&gt;-&lt;/b&gt;&lt;span style=&quot;color: blue;&quot;&gt;rw-r--r--.&lt;/span&gt;  1 angel   500        18 Jun 22 08:49 .bash_logout
&lt;b&gt;-&lt;/b&gt;&lt;span style=&quot;color: blue;&quot;&gt;rw-r--r--.&lt;/span&gt;  1 angel   500       193 Jun 22 08:49 .bash_profile
&lt;b&gt;-&lt;/b&gt;&lt;span style=&quot;color: blue;&quot;&gt;rw-r--r--.&lt;/span&gt;  1 angel   500       124 Jun 22 08:49 .bashrc
&lt;/pre&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
La primer columna puede ser divida en dos partes, en negro &lt;b&gt;-&lt;/b&gt; y en azul &lt;span style=&quot;color: blue;&quot;&gt;rw-r--r--&lt;/span&gt;. &lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;Tipo de archivo&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Permisos para el archivo &lt;/b&gt;(dividido en tres partes)&lt;br /&gt;a) Permisos para el usuario: &lt;b&gt;rw&lt;/b&gt;&lt;br /&gt;b) Permisos para el grupo: &lt;b&gt;r&lt;/b&gt;&lt;br /&gt;c) Permisos para otros: &lt;b&gt;r&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;b&gt;Ejemplo usando el método numérico:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
El archivo debe tener permisos de lectura, escritura y ejecución para el usuario, permisos de lectura y ejecución para el grupo y lectura y ejecución para otros.&lt;br /&gt;
&lt;br /&gt;
Entonces:&lt;br /&gt;
&lt;br /&gt;
permisos de lectura, escritura y ejecución para el usuario = 7 &lt;br /&gt;
permisos de lectura y ejecución para el grupo = 5&lt;br /&gt;
permisos de lectura y ejecución para otros = 5&lt;br /&gt;
&lt;br /&gt;
Los permisos serán 755&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[angel@angelcm ~]$ chmod 755 archivo&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Ejemplos usando el método alfa: &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Ejemplo&lt;/b&gt;: asignando permisos de escritura al usuario&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[angel@angelcm ~]$ chmod w+u archivo&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Ejemplo&lt;/b&gt;: asignando permisos de escritura al grupo&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[angel@angelcm ~]$ chmod w+g archivo&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Ejemplo&lt;/b&gt;: asignando permisos de ejecución a otros.&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[angel@angelcm ~]$ chmod x+o archivo&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Ejemplo&lt;/b&gt;: asignando permisos de ejecución y escritura a todos.&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[angel@angelcm ~]$ chmod xw+a archivo&lt;/pre&gt;
&lt;br /&gt;
&amp;nbsp;&lt;b&gt;Ejemplo&lt;/b&gt;: removiendo permisos de ejecución a usuario.&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[angel@angelcm ~]$ chmod u-x archivo&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Ejemplo&lt;/b&gt;: replicando los permisos del usuario al grupo.&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[angel@angelcm ~]$ chmod u=g archivo&lt;/pre&gt;
&lt;br /&gt;
Listo, nos vemos en la siguiente entrada.</description><link>http://best-linux-server.blogspot.com/2011/10/linux-comando-chmod-parte-1.html</link><author>noreply@blogger.com (Angel Cabrera)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-5871676803714013568</guid><pubDate>Thu, 06 Oct 2011 16:49:00 +0000</pubDate><atom:updated>2011-10-06T11:52:04.586-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">hacking</category><category domain="http://www.blogger.com/atom/ns#">Linux</category><category domain="http://www.blogger.com/atom/ns#">Seguridad</category><title>News - Kernel.org fue hackeado (linux.com, linuxfoundation.org y mysql.com también)</title><description>&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;E&lt;/b&gt;&lt;/span&gt;l sitio web que hospeda el kernel Linux fue comprometido en su seguridad al haber sido vulnerado y tomado controles de root.&lt;br /&gt;
&lt;br /&gt;
El ataque fue realizado el 12 de agosto pasado, y el 28 del mismo mes se pudieron notar los primeros problemas. Los más importantes fueron los que atacaron al sistema de credenciales digitales del protocolo SSH, dentro del equipo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
De cualquier manera desde la Linux Foundation salieron a tranquilizar las cosas:&amp;nbsp; “… &lt;i&gt;no hay necesidad de preocuparse por la integridad del código fuente del kernel o de cualquier otro software alojado en los sistemas de kernel.org&lt;/i&gt;”,&amp;nbsp; palabra de Jonathan Corbet.&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
Lo mismo pasó con linux.com, linuxfoundation.org y mysql.com&lt;br /&gt;
&lt;br /&gt;
Listo, nos vemos en la siguiente entrada.</description><link>http://best-linux-server.blogspot.com/2011/10/news-kernelorg-fue-hackeado-linuxcom.html</link><author>noreply@blogger.com (Angel Cabrera)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-8658962011669983534</guid><pubDate>Thu, 22 Sep 2011 15:41:00 +0000</pubDate><atom:updated>2011-09-22T10:45:17.841-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Administración</category><category domain="http://www.blogger.com/atom/ns#">Linux</category><category domain="http://www.blogger.com/atom/ns#">shell</category><category domain="http://www.blogger.com/atom/ns#">ssh</category><title>Linux - Ejecutar comandos remotos con ssh</title><description>&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;E&lt;/b&gt;&lt;/span&gt;l comando ssh es un programa increíble. Se puede usar para abrir sesiones entre servidores o bien se puede usar para ejecutar comandos en un sistema remoto.&lt;br /&gt;
&lt;br /&gt;
Un ejemplo sencillo sería para conocer el uso del disco duro de un servidor: &lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[angel@angelcm ~]$ ssh user@server &#39; /bin/df -h&#39;
user@server&#39;s password: 
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_root-lv_root
                      2.0G  410M  1.5G  22% /
/dev/mapper/vg_root-lv_tmp
                      2.0G   70M  1.8G   4% /tmp
/dev/mapper/vg_root-lv_var
                      2.0G  378M  1.5G  21% /var
/dev/mapper/vg_root-lv_data01
                      6.7G  982M  5.4G  16% /data01
/dev/mapper/vg_data-lv_data02
                      247G   15G  219G   7% /data02
/dev/mapper/vg_root-lv_usr
                      3.0G  1.5G  1.3G  55% /usr
/dev/sda1             122M   13M  103M  11% /boot
tmpfs                 3.9G     0  3.9G   0% /dev/shm
[angel@angelcm ~]$ &lt;/pre&gt;
&lt;br /&gt;
Esto es muy bueno, pero se vuelve más útil cuando &quot;automatizamos&quot; mediante el intercambio de llaves SSH, esto lo pueden aprender en otro post: &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://best-linux-server.blogspot.com/2011/09/linux-login-ssh-sin-password.html&quot;&gt;Linux - Login SSH sin password&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Mientras tanto, podemos ejecutar algunos otros comandos. Por ejemplo, para contar el número de procesos de apache que están corriendo en el servidor web. Todo lo que necesitamos hacer es escribir el comando entre comillas. El siguiente comando se conecta a un servidor web, luego lista todos los procesos &lt;b&gt;ps -ef&lt;/b&gt;, después busca y cuenta las coincidencias con apache &lt;b&gt;grep -c apach[e]&lt;/b&gt; :&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[angel@angelcm ~]$ ssh user@server &#39;ps -ef | grep -c apach[e]&#39;
34
[angel@angelcm ~]$&lt;/pre&gt;
&lt;br /&gt;
El resultado es 34 procesos de apache corriendo en el servidor.&lt;br /&gt;
&lt;br /&gt;
También podemos mostrar algunas estádisticas sobre el uso de CPU del servidor:&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[angel@angelcm ~]$ ssh user@server &#39; top -b -n 1 | head -n 8&#39;
top - 10:15:40 up 117 days,  6:24,  2 users,  load average: 1.43, 1.52, 1.64
Tasks: 165 total,   1 running, 164 sleeping,   0 stopped,   0 zombie
Cpu(s): 10.2%us,  1.5%sy,  0.2%ni, 87.1%id,  0.1%wa,  0.3%hi,  0.7%si,  0.0%st
Mem:  16436872k total, 13376292k used,  3060580k free,   943720k buffers
Swap:  4194296k total,        0k used,  4194296k free,  5637000k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
16619 apache    15   0  350m  16m 5308 S 30.8  0.1   0:33.63 httpd              
[angel@angelcm ~]$&lt;/pre&gt;
&lt;br /&gt;
Para ver quien está loggeado en el servidor:&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[angel@angelcm ~]$ ssh user@server &#39;who&#39;
juanito   pts/0        2011-09-20 16:50 (10.177.65.41)
pepito    pts/1        2011-09-21 10:13 (10.177.65.209)
[angel@angelcm ~]$&lt;/pre&gt;
&lt;br /&gt;
Nuevamente, les recomiendo la lectura de los posts:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt; &lt;a href=&quot;http://best-linux-server.blogspot.com/2011/09/linux-login-ssh-sin-password.html&quot;&gt;Linux - Login SSH sin password&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://best-linux-server.blogspot.com/2011/09/linux-sorry-you-must-have-tty-to-run.html&quot;&gt;Linux - Sorry, you must have a tty to run sudo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Listo, nos vemos en la siguiente entrada.</description><link>http://best-linux-server.blogspot.com/2011/09/linux-ejecutar-comandos-remotos-con-ssh.html</link><author>noreply@blogger.com (Angel Cabrera)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-91363761981057816</guid><pubDate>Thu, 22 Sep 2011 02:33:00 +0000</pubDate><atom:updated>2011-09-21T21:35:02.091-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CEntOS</category><category domain="http://www.blogger.com/atom/ns#">Fedora</category><category domain="http://www.blogger.com/atom/ns#">Red Hat</category><category domain="http://www.blogger.com/atom/ns#">ssh</category><category domain="http://www.blogger.com/atom/ns#">sudo</category><category domain="http://www.blogger.com/atom/ns#">tty</category><title>Linux - Sorry, you must have a tty to run sudo</title><description>&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;&lt;strong&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;E&lt;/span&gt;&lt;/strong&gt;staba intentando actualizar unos paquetes de forma remota con ssh, para lo que usé el siguiente comando:&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset currentColor; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[root@server ~]# ssh &lt;a href=&quot;mailto:user@192.168.1.100&quot;&gt;user@192.168.1.100&lt;/a&gt; &quot;sudo yum update httpd&quot;&lt;/pre&gt;
&lt;br /&gt;
Pero recibí un mensaje de error:&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset currentColor; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;Sorry, you must have a tty to run sudo&lt;/pre&gt;
&lt;br /&gt;
&lt;strong&gt;Solución.&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Esto funciona en Fedora, RHEL y CEntOS.&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset currentColor; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[root@server ~]# ssh -t &lt;a href=&quot;mailto:user@192.168.1.100&quot;&gt;user@192.168.1.100&lt;/a&gt; &quot;sudo yum update httpd&quot;&lt;/pre&gt;
&lt;br /&gt;
El switch &#39;-t&#39; nos permitirá interactuar mediante una TTY (terminal) tal como si estuvieramos de forma local en el servidor.&lt;br /&gt;
&lt;br /&gt;
Listo, nos vemos en la siguiente entrada.</description><link>http://best-linux-server.blogspot.com/2011/09/linux-sorry-you-must-have-tty-to-run.html</link><author>noreply@blogger.com (Angel Cabrera)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-4698352868079661606</guid><pubDate>Wed, 14 Sep 2011 20:19:00 +0000</pubDate><atom:updated>2011-09-14T15:23:04.950-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CEntOS</category><category domain="http://www.blogger.com/atom/ns#">MySQL</category><category domain="http://www.blogger.com/atom/ns#">Password</category><category domain="http://www.blogger.com/atom/ns#">Red Hat</category><title>Red Hat - Cómo cambiar el password de root en MySQL (Red Hat, Fedora, CEntOS)</title><description>&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt; 
&lt;/script&gt;&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;O&lt;/b&gt;&lt;/span&gt;dio decir &quot;&lt;i&gt;te lo dije&lt;/i&gt;&quot;, pero te lo dije. Aquí en la editorial administramos múltiples servidores MySQL, cientos de bases de datos y usuarios, de tal forma que debemos contar con una buena administración de passwords.&lt;br /&gt;
&lt;br /&gt;
Muy a pesar de tener una buena administración de passwords, no estamos exentos de perder u olvidar una clave importante, cómo es la del usuario root de MySQL. Por esta razón, aquí les presento los pasos que debemos seguir para cambiar la clave, de verdad que esto es útil.&lt;br /&gt;
&lt;br /&gt;
Este procedimiento aplica para Red Hat, Fedora, CEntOS.&lt;br /&gt;
&lt;br /&gt;
1. Detener el proceso mysql&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[root@server ~]# /etc/init.d/mysqld stop&lt;/pre&gt;
&lt;br /&gt;
2. Iniciar el proceso mysql con la opción --skip-grant-tables y --skip-networking&amp;nbsp;, así no pedirá el password y no aceptará conexiones remotas a MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[root@server ~]# /usr/bin/mysqld_safe --skip-grant-tables --skip-networking &amp;amp;&lt;/pre&gt;
&lt;br /&gt;
3. Ingresar a MySQL con el usuario root.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[root@server ~]# mysql -u root&lt;/pre&gt;
&lt;br /&gt;
4. Actualizar el password de root (&lt;b&gt;&lt;u&gt;en este paso no olviden el uso de las comillas&lt;/u&gt;&lt;/b&gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;/div&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border-style: inset; border-width: 1px; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;mysql&amp;gt; use mysql;
mysql&amp;gt; update user set password=PASSWORD(&#39;NUEVO_PASSWORD&#39;) where User=&#39;root&#39;;
mysql&amp;gt; flush privileges;
mysql&amp;gt; quit&lt;/pre&gt;
&lt;br /&gt;
5. Detener el proceso mysql&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;/div&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border-style: inset; border-width: 1px; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[root@server ~]# /etc/init.d/mysqld stop&lt;/pre&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;
6. Iniciar MySQL y probar con la nueva clave.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;/div&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border-style: inset; border-width: 1px; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;[root@server ~]# /etc/init.d/mysqld start
[root@server ~]# mysql -u root -p&lt;/pre&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Muy bien, nos vemos en la siguiente entrada.&lt;/div&gt;
</description><link>http://best-linux-server.blogspot.com/2011/09/red-hat-como-cambiar-el-password-de.html</link><author>noreply@blogger.com (Angel Cabrera)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-2947783097943234461</guid><pubDate>Tue, 13 Sep 2011 20:56:00 +0000</pubDate><atom:updated>2011-09-13T15:57:01.155-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">scp</category><category domain="http://www.blogger.com/atom/ns#">ssh</category><title>Linux - Login SSH sin password</title><description>&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
En mi estancia en GEE he encontrado que los desarrolladores crean scripts para distribuir archivos a los mirrors, haciendo una especie de mirroring &quot;charro&quot;, pero con la magia de no requerir la intervención de un admin y, además, automático.&lt;br /&gt;
&lt;br /&gt;
Supongamos que deseamos usar Linux y OpenSSH para automatizar algunas tareas (cómo la mencionada arriba). Por lo tanto, necesitamos hacer login desde un host &quot;A&quot; con Usuario &quot;a&quot; hacia el host &quot;B&quot; con Usuario &quot;b&quot;, y cómo estamos usando ssh desde un script no deseamos introducir el password.&lt;br /&gt;
&lt;br /&gt;
Manos a la obra:&lt;br /&gt;
&lt;br /&gt;
Primero debemos hacer log in en &quot;A&quot; y generar las llaves de autenticación. No introducir passphrase:&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;a@A:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/angel/.ssh/id_rsa): 
Enter passphrase (empty for no &lt;b&gt;passphrase&lt;/b&gt;): 
Enter same passphrase again: 
Your identification has been saved in /home/angel/.ssh/id_rsa.
Your public key has been saved in /home/angel/.ssh/id_rsa.pub.
The key fingerprint is:
dd:1a:a1:bf:28:02:2d:d1:ac:c8:94:7d:cd:7f:a7:28 a@A
The key&#39;s randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|  oo  o   .      |
| o..o. o o o     |
|o. +.   S o .    |
|..+ .    o + .   |
|   o      = o    |
|    . .E o o     |
|     . .o .      |
+-----------------+&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Ahora usaremos ssh para crear el directorio ~/.ssh como el usuario &quot;b&quot; en &quot;B&quot; (el directorio ya puede existir):&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;a@A:~$ ssh b@B mkdir -p .ssh
b@B&#39;s password:&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Finalmente agregamos la llave pública generada en &quot;A&quot; a b@B:.ssh/authorized_keys e introducir el password de &quot;b&quot; una vez más:&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;a@A:~$ cat .ssh/id_rsa.pub | ssh b@B &#39;cat &amp;gt;&amp;gt; .ssh/authorized_keys&#39;
b@B&#39;s password: 
a@A:~$&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
A partir de este momento podremos hacer log in en &quot;B&quot; como &quot;b&quot; desde &quot;A&quot; sin password.&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;a@A:~$ ssh b@B
Last login: Thu May 19 12:23:06 2011 from 192.168.1.33
[b@B ~]$&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
También funciona para hacer scp (Secure Copy)&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;background-color: #cccccc; border: 1px inset; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;a@A:~$ touch test
a@A:~$ scp test b@B:.
test                                          100%    0     0.0KB/s   00:00    
a@A:~$&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Genial!! Nos vemos en la siguiente entrada!!!</description><link>http://best-linux-server.blogspot.com/2011/09/linux-login-ssh-sin-password.html</link><author>noreply@blogger.com (Angel Cabrera)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-8147605107206474913</guid><pubDate>Mon, 12 Sep 2011 17:18:00 +0000</pubDate><atom:updated>2011-09-12T12:18:08.653-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Fedora</category><category domain="http://www.blogger.com/atom/ns#">Lighttpd</category><category domain="http://www.blogger.com/atom/ns#">MySQL</category><category domain="http://www.blogger.com/atom/ns#">PHP</category><category domain="http://www.blogger.com/atom/ns#">Web Server</category><title>Fedora 15 - Instalar Lighttpd con PHP y MySQL</title><description>&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt; 
&lt;/script&gt;&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;&lt;b&gt;Lighttpd&lt;/b&gt; (&lt;i&gt;pronunciado lighty&lt;/i&gt;) es un servidor web diseñado para ser rápido, seguro, flexible, y fiel a los estándares. Está optimizado para entornos donde la velocidad es muy importante, y por eso consume menos CPU y memoria RAM que otros servidores. Por todo lo que ofrece, &lt;i&gt;lighttpd&lt;/i&gt; es apropiado para cualquier servidor que tenga problemas de carga.&lt;br /&gt;
&lt;br /&gt;
En este tutorial usaremos el hostname &lt;i&gt;servidor.dominio.com&lt;/i&gt; con la dirección IP &lt;i&gt;192.168.0.100&lt;/i&gt; (ustedes usen su propia información)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;1. Instalación de MySQL&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
# yum install mysql mysql-server&lt;/div&gt;
&lt;br /&gt;
Ahora creamos los links de inicio para MySQL e iniciamos MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
# chkconfig --levels 235 mysqld on&lt;br /&gt;# /etc/init.d/mysqld start&lt;/div&gt;
&lt;br /&gt;
Ahora continuamos con la post instalación de MySQL&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
# mysql_secure_installation&lt;/div&gt;
&lt;div style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE!&amp;nbsp; PLEASE READ EACH STEP CAREFULLY!&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;In order to log into MySQL to secure it, we&#39;ll need the current&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;password for the root user.&amp;nbsp; If you&#39;ve just installed MySQL, and&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;you haven&#39;t set the root password yet, the password will be blank,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;so you should just press enter here.&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Enter current password for root (enter for none): &lt;b&gt;&amp;lt;-- ENTER&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;OK, successfully used password, moving on...&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Setting the root password ensures that nobody can log into the MySQL&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;root user without the proper authorisation.&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Set root password? [Y/n] &lt;b&gt;&amp;lt;-- ENTER&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;New password: &lt;b&gt;&amp;lt;-- Escribir el Password&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Re-enter new password: &lt;b&gt;&amp;lt;-- Confirmar el Password&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Password updated successfully!&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Reloading privilege tables..&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;... Success!&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;By default, a MySQL installation has an anonymous user, allowing anyone&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;to log into MySQL without having to have a user account created for &lt;/span&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;them.&amp;nbsp; This is intended only for testing, and to make the installation &lt;/span&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;go a bit smoother.&amp;nbsp; You should remove them before moving into a &lt;/span&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;production environment.&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Remove anonymous users? [Y/n] &lt;b&gt;&amp;lt;-- ENTER&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;... Success!&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Normally, root should only be allowed to connect from &#39;localhost&#39;.&amp;nbsp; This &lt;/span&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;ensures that someone cannot guess at the root password from the network.&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Disallow root login remotely? [Y/n] &lt;b&gt;&amp;lt;-- ENTER&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;... Success!&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;By default, MySQL comes with a database named &#39;test&#39; that anyone can&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;access.&amp;nbsp; This is also intended only for testing, and should be removed&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;before moving into a production environment.&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Remove test database and access to it? [Y/n] &lt;b&gt;&amp;lt;-- ENTER&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;- Dropping test database...&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;... Success!&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;- Removing privileges on test database...&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;... Success!&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Reloading the privilege tables will ensure that all changes made so far &lt;/span&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;will take effect immediately.&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Reload privilege tables now? [Y/n] &lt;b&gt;&amp;lt;-- ENTER&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;... Success!&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Cleaning up...&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;All done!&amp;nbsp; If you&#39;ve completed all of the above steps, your MySQL&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;installation should now be secure.&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Thanks for using MySQL!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2. Instalación de Lighttpd&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
# yum install lighttpd&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ahora creamos los links de inicio para Lighttpd e iniciamos Lighttpd.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
# chkconfig --levels 235 lighttpd on&lt;br /&gt;# /etc/init.d/lighttpd start&lt;/div&gt;
&lt;br /&gt;
Para comprobar que todo vaya bien, abrimos el navegador y nos dirigimos a http://192.168.0.100/ y veremos la página de inicio de Lighttpd.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH1EDhGZxmgCp8gxjxOYPSLCv3jF_gcVogDl6N7rDqWG8AFRxFeaTegxbsYcqvGecbfY86UIMV7z8RZ5b7fHM_PKtB-l6mg5K4LApOb3Wi_z71mZbWoKX6nsh2rnW8KUU-E5K270Lrz2c/s1600/lighttpd.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;464&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH1EDhGZxmgCp8gxjxOYPSLCv3jF_gcVogDl6N7rDqWG8AFRxFeaTegxbsYcqvGecbfY86UIMV7z8RZ5b7fHM_PKtB-l6mg5K4LApOb3Wi_z71mZbWoKX6nsh2rnW8KUU-E5K270Lrz2c/s640/lighttpd.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
En Fedora, el directorio default de Lighttpd es &lt;i&gt;/var/www/lighttpd&lt;/i&gt; y el archivo de configuración &lt;i&gt;/etc/lighttpd/lighttpd.conf&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3. Instalación de PHP5&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Podemos hacer que PHP5 trabaje en Lighttpd por medio de FastCGI. Por tanto, instalamos los paquetes &lt;i&gt;lighttpd-fastcgi&lt;/i&gt; y &lt;i&gt;php-cli&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;# yum install lighttpd-fastcgi php-cli&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;4. Configurando Lighttpd y PHP5.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Para habilitar PHP5 en Lighttpd, debemos modificar dos archivos, &lt;i&gt;/etc/php.ini&lt;/i&gt; y &lt;i&gt;/etc/lighttpd/lighttpd.conf&lt;/i&gt;. Primero abrimos &lt;i&gt;/etc/php.ini&lt;/i&gt; descomentamos la línea &lt;i&gt;cgi.fix_pathinfo=1&lt;/i&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #cccccc; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;[...]&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.&amp;nbsp; PHP&#39;s&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;; what PATH_INFO is.&amp;nbsp; For more information on PATH_INFO, see the cgi specs.&amp;nbsp; Setting&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;; this to 1 will cause PHP CGI to fix its paths to conform to the spec.&amp;nbsp; A setting&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;; of zero causes PHP to behave as before.&amp;nbsp; Default is 1.&amp;nbsp; You should fix your scripts&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;; http://www.php.net/manual/en/ini.core.php#ini.cgi.fix-pathinfo&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;cgi.fix_pathinfo=1&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;[...]&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Luego abrimos &lt;i&gt;/etc/lighttpd/lighttpd.conf&lt;/i&gt; y descomentamos &quot;&lt;i&gt;mod_fastcgi&lt;/i&gt;&quot;, en la sección &lt;i&gt;server.modules&lt;/i&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;[...]&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;server.modules&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = (&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_rewrite&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_redirect&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_alias&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_access&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_trigger_b4_dl&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_auth&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_status&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_setenv&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;b&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_fastcgi&quot;,&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_proxy&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_simple_vhost&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_evhost&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_userdir&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_cgi&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_compress&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_ssi&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_usertrack&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_expire&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_secdownload&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_rrdtool&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;mod_accesslog&quot; )&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;[...]&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Luego, mas abajo en el archivo existe una sección fastcgi.server y descomentamos como se muestra a continuación:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;[...]&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#### fastcgi module&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;## read fastcgi.txt for more info&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;## for PHP don&#39;t forget to set cgi.fix_pathinfo = 1 in the php.ini&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;fastcgi.server&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = ( &quot;.php&quot; =&amp;gt;&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( &quot;localhost&quot; =&amp;gt;&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;socket&quot; =&amp;gt; &quot;/var/run/lighttpd/php-fastcgi.socket&quot;,&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;bin-path&quot; =&amp;gt; &quot;/usr/bin/php-cgi&quot;&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;[...]&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Luego reiniciamos Lighttpd:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
# /etc/init.d/lighttpd restart&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;5. Probar la instalación.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
En el document root /var/www/lighttpd creamos un archivo PHP (info.php) y lo invocamos desde el navegador:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
# cd /var/www/lighttpd&lt;/div&gt;
&lt;div style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
# vi info.php&lt;/div&gt;
&lt;br /&gt;
 &lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;phpinfo();&lt;/span&gt;&lt;br style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Al invocar el archivo desde el navegador http://192.168.1.100/info.php, veremos:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh99m5e8QFndwrx-sNGrASpIGhO08HntglGCc3tsMU_l_ERp_OKVb4gesXB-jI2me3vLDhzzQZxXgF0HD7pmgMfG5hNvIoIumYrgIKY3vlofKwCfrrezwVznXzn2yJ9d6IXvlMt-TGVxSU/s1600/lighttpd_info_php.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;464&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh99m5e8QFndwrx-sNGrASpIGhO08HntglGCc3tsMU_l_ERp_OKVb4gesXB-jI2me3vLDhzzQZxXgF0HD7pmgMfG5hNvIoIumYrgIKY3vlofKwCfrrezwVznXzn2yJ9d6IXvlMt-TGVxSU/s640/lighttpd_info_php.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Como podemos observar, PHP está trabajando, y lo está haciendo vía FastCGI como lo indica la línea &lt;i&gt;Server API&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;6. Instalación de MySQL y soporte con PHP5.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Para dar soporte MySQL en PHP solo necesitamos el paquete &lt;i&gt;php-mysql&lt;/i&gt;. Es buena idea instalar algunos otros modulos de acuerdo a nuestras necesidades, por ejemplo:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
# yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc&lt;/div&gt;
&lt;br /&gt;
Por último, reiniciar Lighttpd:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
# /etc/init.d/lighttpd restart&lt;/div&gt;
&lt;br /&gt;
Ahora refrescamos la página http://192.168.1.100/info.php y validamos los nuevos módulos instalados.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi35Uv2KPmqxskh9QyYINg9t88-Z3opwbf2FYnUXJAB0tBJTq5d0kZuyuil4hvUKo9Yr5gIH5dNYSxbJTpMotrSwmGopnUsarg_i7cpQm3fzThQo2DWOd4ah9tdhXFm-vAj2w7H109A-E8/s1600/lighttpd_mysql.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;464&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi35Uv2KPmqxskh9QyYINg9t88-Z3opwbf2FYnUXJAB0tBJTq5d0kZuyuil4hvUKo9Yr5gIH5dNYSxbJTpMotrSwmGopnUsarg_i7cpQm3fzThQo2DWOd4ah9tdhXFm-vAj2w7H109A-E8/s640/lighttpd_mysql.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Listo, nos vemos en la siguiente entrada.&lt;br /&gt;
&lt;br /&gt;</description><link>http://best-linux-server.blogspot.com/2011/09/fedora-15-instalar-lighttpd-con-php-y.html</link><author>noreply@blogger.com (Angel Cabrera)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH1EDhGZxmgCp8gxjxOYPSLCv3jF_gcVogDl6N7rDqWG8AFRxFeaTegxbsYcqvGecbfY86UIMV7z8RZ5b7fHM_PKtB-l6mg5K4LApOb3Wi_z71mZbWoKX6nsh2rnW8KUU-E5K270Lrz2c/s72-c/lighttpd.png" height="72" width="72"/><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-5652801324799799770</guid><pubDate>Fri, 09 Sep 2011 19:07:00 +0000</pubDate><atom:updated>2011-09-12T12:18:51.117-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Python</category><category domain="http://www.blogger.com/atom/ns#">Web Server</category><title>Linux - Servir un directorio como una página web con Python.</title><description>&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
¿Necesitas publicar rapidamente, via web, un directorio entre tus colegas de trabajo o amigos a través de LAN?&lt;br /&gt;
&lt;br /&gt;
Para esto existen un sin número de aplicaciones que pueden ayudar, pero en Linux lo único que realmente necesitas es &lt;b&gt;Python&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;$ cd /dir/a/publicar&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;$ python -m SimpleHTTPServer&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Posteriormente accesar en el navegador a http://127.0.0.1:8000 (local) o bien http://direccion_ip:8000 (en red)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu99J8TpakSd6uU4NefuUUAiturdymcUyzQG5BfXdNIzC4i-TfM7mheMecOebbXtePdVr5iBqUyemZAXtYMWrNeZfiqrcbalYy98LfLxLm1SEiIfbXkqak2yNashpn7qFaA4QN2pKDyVI/s1600/Screenshot-Directory+listing+for+-+-+Google+Chrome.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;556&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu99J8TpakSd6uU4NefuUUAiturdymcUyzQG5BfXdNIzC4i-TfM7mheMecOebbXtePdVr5iBqUyemZAXtYMWrNeZfiqrcbalYy98LfLxLm1SEiIfbXkqak2yNashpn7qFaA4QN2pKDyVI/s640/Screenshot-Directory+listing+for+-+-+Google+Chrome.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;lt;Ctrl&amp;gt;+&amp;lt;c&amp;gt; para finalizar python.&lt;br /&gt;
&lt;br /&gt;
Listo, nos vemos en la siguiente entrada.</description><link>http://best-linux-server.blogspot.com/2011/09/linux-servir-un-directorio-como-una.html</link><author>noreply@blogger.com (Angel Cabrera)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu99J8TpakSd6uU4NefuUUAiturdymcUyzQG5BfXdNIzC4i-TfM7mheMecOebbXtePdVr5iBqUyemZAXtYMWrNeZfiqrcbalYy98LfLxLm1SEiIfbXkqak2yNashpn7qFaA4QN2pKDyVI/s72-c/Screenshot-Directory+listing+for+-+-+Google+Chrome.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-434669951202048241</guid><pubDate>Fri, 09 Sep 2011 17:12:00 +0000</pubDate><atom:updated>2011-09-09T12:12:24.488-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">GNOME</category><category domain="http://www.blogger.com/atom/ns#">Password</category><category domain="http://www.blogger.com/atom/ns#">Seguridad</category><category domain="http://www.blogger.com/atom/ns#">Sistema</category><category domain="http://www.blogger.com/atom/ns#">Ubuntu</category><title>Ubuntu - Cómo evitar que pida password después de Hibernar o Suspender.</title><description>&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
Al cerrar la tapa de su laptop, mientras Ubuntu se está ejecutando, el equipo entra en modo de suspensión. Lo mismo sucede cuando escogemos Hibernar en el menú de apagado, cuando la laptop entra en &quot;un sueño profundo&quot; y consume menos energía.&lt;br /&gt;
&lt;br /&gt;
Al reactivarse después de estos dos estados, Ubuntu le preguntará su contraseña.&lt;br /&gt;
&lt;br /&gt;
Si desea evitar este comportamiento, abra el &quot;&lt;i&gt;gconf-editor&lt;/i&gt;&quot; (&lt;i&gt;&amp;lt;Alt&amp;gt;+&amp;lt;F2&amp;gt;&lt;/i&gt; y escribir &lt;i&gt;gconf-editor&lt;/i&gt;), y luego vaya a &lt;i&gt;Apps &amp;gt; gnome-power-manager &amp;gt; loc&lt;/i&gt;k. Allí encontrará una casilla de verificación para la hibernación y otro para suspender. Desactive ambas y cierre el editor de configuración. La próxima vez que reanude de suspensión e hibernación, no se le pedirá una contraseña.&lt;br /&gt;
&lt;br /&gt;
Usted puede seguir bloqueando manualmente la pantalla antes de cerrar la tapa de la laptop mediante el uso de &lt;i&gt;&amp;lt;Ctrl&amp;gt; + &amp;lt;Alt&amp;gt; + &amp;lt;L&amp;gt;&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
Nos vemos en la siguiente entrada. </description><link>http://best-linux-server.blogspot.com/2011/09/ubuntu-como-evitar-que-pida-password.html</link><author>noreply@blogger.com (Angel Cabrera)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-3706288772036918527</guid><pubDate>Wed, 07 Sep 2011 18:58:00 +0000</pubDate><atom:updated>2011-09-07T13:58:38.496-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">fstab</category><category domain="http://www.blogger.com/atom/ns#">Linux</category><category domain="http://www.blogger.com/atom/ns#">particiones</category><category domain="http://www.blogger.com/atom/ns#">Ubuntu</category><title>Ubuntu - Cómo montar particiones automáticamente (La forma fácil)</title><description>&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt; 
&lt;/script&gt;&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;Usualmente para hacer que una partición se monte de forma automática se requiere trabajar con el archivo &quot;fstab&quot;, lo cual es confuso para la gente que recién empieza con Linux.&lt;br /&gt;
&lt;br /&gt;
Por tal motivo, la forma más fácil de hacerlo es leyendo este artículo... así que manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Bien, vamos a instalar el programa que hará que el proceso sea más sencillo, este programa es llamado &quot;&lt;i&gt;Storage Device Manager&lt;/i&gt;&quot;. Introduzca el siguiente comando para instalarlo (o también lo pueden instalar desde el Ubuntu Software Center):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: #cccccc; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ sudo apt-get install pysdm&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Ahora vamos a iniciar el programa desde &lt;i&gt;System &amp;gt; Administration &amp;gt; Storage Device Manager&lt;/i&gt;. Ahora, de la lista de particiones elija la partición que quiere montar&amp;nbsp; al inicio del sistema (primero expanda la lista de discos) y luego de clic en el botón &lt;i&gt;Assistant&lt;/i&gt; del lado derecho.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF8tw3ouYC75KxDf4cYhKvWgWtE3gSFwSM06lZ9daNAFHG25lUkNBWC3k7UrmteJmXJQZSGwlnVf_FkT86MGkf_0J4DpaLUNusvpZNN3_eWzqYzDvUOlHikqqmsNMP0Z0-ALD5TTQmSbg/s1600/assistant.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF8tw3ouYC75KxDf4cYhKvWgWtE3gSFwSM06lZ9daNAFHG25lUkNBWC3k7UrmteJmXJQZSGwlnVf_FkT86MGkf_0J4DpaLUNusvpZNN3_eWzqYzDvUOlHikqqmsNMP0Z0-ALD5TTQmSbg/s640/assistant.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Ahora, veremos la ventana de Opciones. Solo hay que &lt;u&gt;marcar&lt;/u&gt; la opción &quot;&lt;i&gt;The file system is mounted at boot time&lt;/i&gt;&quot; y &lt;u&gt;desmarcar&lt;/u&gt;&amp;nbsp; la opción “&lt;i&gt;Mount file system in read-only mode&lt;/i&gt;”.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdodkiC77EQhR6QGx8ZH9VQtBl3TTE773xaspw5_zs7_YT6zI-wqHuQRnGBnPJErkLli6lMqQTam3lo-_HQMP6MwSdPcu59UuiDBBr-J3c0odDj-4S1VxUR9wwP1XaHgYYLwq03t5tz54/s1600/assistant2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;346&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdodkiC77EQhR6QGx8ZH9VQtBl3TTE773xaspw5_zs7_YT6zI-wqHuQRnGBnPJErkLli6lMqQTam3lo-_HQMP6MwSdPcu59UuiDBBr-J3c0odDj-4S1VxUR9wwP1XaHgYYLwq03t5tz54/s640/assistant2.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
También puede editar otras opciones, pero si no es cuidadoso puede ocasionar un daño a su sistema. Una vez terminado de clic en &quot;&lt;i&gt;OK&lt;/i&gt;&quot; y luego &quot;&lt;i&gt;Apply&lt;/i&gt;&quot;. Cierre el programa y reinicie su sistema para ver los cambios.&lt;br /&gt;
&lt;br /&gt;
Listo, nos vemos en la siguiente entrada.</description><link>http://best-linux-server.blogspot.com/2011/09/ubuntu-como-montar-particiones.html</link><author>noreply@blogger.com (Angel Cabrera)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF8tw3ouYC75KxDf4cYhKvWgWtE3gSFwSM06lZ9daNAFHG25lUkNBWC3k7UrmteJmXJQZSGwlnVf_FkT86MGkf_0J4DpaLUNusvpZNN3_eWzqYzDvUOlHikqqmsNMP0Z0-ALD5TTQmSbg/s72-c/assistant.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-9054470833098313412</guid><pubDate>Wed, 31 Aug 2011 17:09:00 +0000</pubDate><atom:updated>2011-09-07T12:55:16.146-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">MySQL</category><category domain="http://www.blogger.com/atom/ns#">Password</category><category domain="http://www.blogger.com/atom/ns#">Seguridad</category><title>Cómo cambiar el password de root en MySQL (Red Hat, Fedora, CEntOS)</title><description>&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
&lt;div style=&quot;font-family: inherit;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;O&lt;/b&gt;dio decir &quot;&lt;i&gt;te lo dije&lt;/i&gt;&quot;, pero te lo dije. Aquí en la editorial administramos múltiples servidores MySQL, cientos de bases de datos y usuarios, de tal forma que debemos contar con una buena administración de passwords.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Muy a pesar de tener una buena administración de passwords, no estamos exentos de perder u olvidar una clave importante, cómo es la del usuario root de MySQL. Por esta razón, aquí les presento los pasos que debemos seguir para cambiar la clave, de verdad que esto es útil.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Este procedimiento aplica para Red Hat, Fedora, CEntOS.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;1. Detener el proceso mysql&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;border-style: inset; border-width: 1px; font-family: inherit; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;[root@server ~]# /etc/init.d/mysqld stop&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;2. Iniciar el proceso mysql con la opción --skip-grant-tables y --skip-networking&amp;nbsp;, así no pedirá el password y no aceptará conexiones remotas a MySQL.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;border-style: inset; border-width: 1px; font-family: inherit; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;[root@server ~]# /usr/bin/mysqld_safe --skip-grant-tables --skip-networking &amp;amp;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;3. Ingresar a MySQL con el usuario root.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;border-style: inset; border-width: 1px; font-family: inherit; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;[root@server ~]# mysql -u root&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;4. Actualizar el password de root (&lt;b&gt;&lt;u&gt;en este paso no olviden el uso de las comillas&lt;/u&gt;&lt;/b&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;border-style: inset; border-width: 1px; font-family: inherit; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;mysql&amp;gt; use mysql;
mysql&amp;gt; update user set password=PASSWORD(&#39;NUEVO_PASSWORD&#39;) where User=&#39;root&#39;;
mysql&amp;gt; flush privileges;
mysql&amp;gt; quit&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;5. Detener el proceso mysql&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;border-style: inset; border-width: 1px; font-family: inherit; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;[root@server ~]# /etc/init.d/mysqld stop&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;font-family: inherit;&quot;&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;6. Iniciar MySQL y probar con la nueva clave.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;border-style: inset; border-width: 1px; font-family: inherit; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;[root@server ~]# /etc/init.d/mysqld start
[root@server ~]# mysql -u root -p&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;font-family: inherit;&quot;&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: inherit;&quot;&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Muy bien, nos vemos en la siguiente entrada.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://best-linux-server.blogspot.com/2011/08/como-cambiar-el-password-de-root-en.html</link><author>noreply@blogger.com (Angel Cabrera)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-3999087327967506669</guid><pubDate>Wed, 31 Aug 2011 16:56:00 +0000</pubDate><atom:updated>2011-09-07T12:55:29.320-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Administración</category><category domain="http://www.blogger.com/atom/ns#">Linux</category><category domain="http://www.blogger.com/atom/ns#">Usuarios</category><title>Eliminar / Borrar una cuenta de usuario en Linux</title><description>&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: inherit; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Como administradores de GNU/Linux, la tarea de eliminar una cuenta de usuario es muy importante. Es tan importante que merece la pena escribir un protocolo para ello. Por seguridad, por administración, por lo que sea hay que tomar en serio ésta tarea.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Para esto existe el comando &#39;&lt;b&gt;userdel&lt;/b&gt;&#39;, el cual tiene que ser ejecutado como root. Por ejemplo:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre dir=&quot;ltr&quot; style=&quot;border-bottom-style: inset; border-bottom-width: 1px; border-color: initial; border-left-style: inset; border-left-width: 1px; border-right-style: inset; border-right-width: 1px; border-top-style: inset; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: left;&quot;&gt;[root@server ~]# /usr/sbin/userdel usuario&lt;/pre&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Un ejemplo ampliado de esto sería: borrar la cuenta de usuario &#39;angel&#39; y su home asociado (opción -r):&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre dir=&quot;ltr&quot; style=&quot;border-bottom-style: inset; border-bottom-width: 1px; border-color: initial; border-left-style: inset; border-left-width: 1px; border-right-style: inset; border-right-width: 1px; border-top-style: inset; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: left;&quot;&gt;[root@server ~]# /usr/sbin/userdel -r angel&lt;/pre&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;El comando anterior borrará la cuenta de usuario, su home y los mensajes de correo existentes. Si existen archivos creados en otros directorios estos tendrán que ser buscados y borrados manualmente.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Archivo /etc/login.defs y /etc/deluser.conf&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Los valores, por default, del comando &#39;userdel&#39; son tomados del archivo&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;/etc/login.defs&lt;/b&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;en Red Hat, Fedora, CEntOS:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre dir=&quot;ltr&quot; style=&quot;border-bottom-style: inset; border-bottom-width: 1px; border-color: initial; border-left-style: inset; border-left-width: 1px; border-right-style: inset; border-right-width: 1px; border-top-style: inset; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: left;&quot;&gt;# *REQUIRED*
#   Directory where mailboxes reside, _or_ name of file, relative to the
#   home directory.  If you _do_ define both, MAIL_DIR takes precedence.
#   QMAIL_DIR is for Qmail
#
#QMAIL_DIR Maildir
MAIL_DIR /var/spool/mail
#MAIL_FILE .mail

# Password aging controls:
#
# PASS_MAX_DAYS Maximum number of days a password may be used.
# PASS_MIN_DAYS Minimum number of days allowed between password changes.
# PASS_MIN_LEN Minimum acceptable password length.
# PASS_WARN_AGE Number of days warning given before a password expires.
#
PASS_MAX_DAYS 99999
PASS_MIN_DAYS 0
PASS_MIN_LEN 5
PASS_WARN_AGE 7

#
# Min/max values for automatic uid selection in useradd
#
UID_MIN     500
UID_MAX   60000

#
# Min/max values for automatic gid selection in groupadd
#
GID_MIN     500
GID_MAX   60000

#
# If defined, this command is run when removing a user.
# It should remove any at/cron/print jobs etc. owned by
# the user to be removed (passed as the first argument).
#
#USERDEL_CMD /usr/sbin/userdel_local

#
# If useradd should create home directories for users by default
# On RH systems, we do. This option is overridden with the -m flag on
# useradd command line.
#
CREATE_HOME yes

# The permission mask is initialized to this value. If not specified, 
# the permission mask will be initialized to 022.
UMASK           077

# This enables userdel to remove user groups if no members exist.
#
USERGROUPS_ENAB yes

# Use MD5 or DES to encrypt password? Red Hat use MD5 by default.
MD5_CRYPT_ENAB yes&lt;/pre&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Y&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;/etc/deluser.conf&lt;/b&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;en Debian y Ubuntu Linux:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre dir=&quot;ltr&quot; style=&quot;border-bottom-style: inset; border-bottom-width: 1px; border-color: initial; border-left-style: inset; border-left-width: 1px; border-right-style: inset; border-right-width: 1px; border-top-style: inset; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: left;&quot;&gt;# /etc/deluser.conf: `deluser&#39; configuration.

# Remove home directory and mail spool when user is removed
REMOVE_HOME = 0

# Remove all files on the system owned by the user to be removed
REMOVE_ALL_FILES = 0

# Backup files before removing them. This options has only an effect if
# REMOVE_HOME or REMOVE_ALL_FILES is set.
BACKUP = 0

# target directory for the backup file
BACKUP_TO = &quot;.&quot;

# delete a group even there are still users in this group
ONLY_IF_EMPTY = 0

# exclude these filesystem types when searching for files of a user to backup
EXCLUDE_FSTYPES = &quot;(proc|sysfs|usbfs|devpts|tmpfs)&quot;&lt;/pre&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Procedimiento:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;A continuación les presento el procedimiento recomendado para borrar una cuenta de usuario. Primero hay que bloquear la cuenta:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre dir=&quot;ltr&quot; style=&quot;border-bottom-style: inset; border-bottom-width: 1px; border-color: initial; border-left-style: inset; border-left-width: 1px; border-right-style: inset; border-right-width: 1px; border-top-style: inset; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: left;&quot;&gt;[root@server ~]# /usr/bin/passwd -l angel&lt;/pre&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;De ser necesario, respaldar los archivos del usuario:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre dir=&quot;ltr&quot; style=&quot;border-bottom-style: inset; border-bottom-width: 1px; border-color: initial; border-left-style: inset; border-left-width: 1px; border-right-style: inset; border-right-width: 1px; border-top-style: inset; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: left;&quot;&gt;[root@server ~]# tar -zcvf /backup/angel.tar.gz /home/angel/&lt;/pre&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&#39;Matar&#39; los procesos que pertenecen al usuario:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre dir=&quot;ltr&quot; style=&quot;border-bottom-style: inset; border-bottom-width: 1px; border-color: initial; border-left-style: inset; border-left-width: 1px; border-right-style: inset; border-right-width: 1px; border-top-style: inset; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: left;&quot;&gt;[root@server ~]# ps -fp $(pgrep -u angel)
[root@server ~]# killall -KILL -u angel
&lt;/pre&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Borrar la cuenta del usuario:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre dir=&quot;ltr&quot; style=&quot;border-bottom-style: inset; border-bottom-width: 1px; border-color: initial; border-left-style: inset; border-left-width: 1px; border-right-style: inset; border-right-width: 1px; border-top-style: inset; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: left;&quot;&gt;[root@server ~]# /usr/sbin/userdel -r angel&lt;/pre&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Borrar las tareas at:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre dir=&quot;ltr&quot; style=&quot;border-bottom-style: inset; border-bottom-width: 1px; border-color: initial; border-left-style: inset; border-left-width: 1px; border-right-style: inset; border-right-width: 1px; border-top-style: inset; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: left;&quot;&gt;[root@server ~]# # find /var/spool/at/ -name &quot;[^.]*&quot; -type f -user angel -delete&lt;/pre&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Borrar las tareas de cron:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre dir=&quot;ltr&quot; style=&quot;border-bottom-style: inset; border-bottom-width: 1px; border-color: initial; border-left-style: inset; border-left-width: 1px; border-right-style: inset; border-right-width: 1px; border-top-style: inset; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: left;&quot;&gt;[root@server ~]# crontab -r -u angel&lt;/pre&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Borrar los trabajos de impresión:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre dir=&quot;ltr&quot; style=&quot;border-bottom-style: inset; border-bottom-width: 1px; border-color: initial; border-left-style: inset; border-left-width: 1px; border-right-style: inset; border-right-width: 1px; border-top-style: inset; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: left;&quot;&gt;[root@server ~]# lprm angel&lt;/pre&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Buscar todos los archivos propiedad del usuario:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre dir=&quot;ltr&quot; style=&quot;border-bottom-style: inset; border-bottom-width: 1px; border-color: initial; border-left-style: inset; border-left-width: 1px; border-right-style: inset; border-right-width: 1px; border-top-style: inset; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: left;&quot;&gt;[root@server ~]# find / -user angel -print&lt;/pre&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Por último, podemos buscar todos los archivos propiedad del usuario y cambiarlos de propietario:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre dir=&quot;ltr&quot; style=&quot;border-bottom-style: inset; border-bottom-width: 1px; border-color: initial; border-left-style: inset; border-left-width: 1px; border-right-style: inset; border-right-width: 1px; border-top-style: inset; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: left;&quot;&gt;[root@server ~]# find / -user angel -exec chown usuario:grupo {} \;&lt;/pre&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Listo, nos vemos en la siguiente entrada.&lt;/div&gt;&lt;/span&gt;</description><link>http://best-linux-server.blogspot.com/2011/08/eliminar-borrar-una-cuenta-de-usuario.html</link><author>noreply@blogger.com (Angel Cabrera)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-2464268104718115135</guid><pubDate>Tue, 30 Aug 2011 19:06:00 +0000</pubDate><atom:updated>2011-09-07T12:55:35.487-05:00</atom:updated><title>Empezar con Linux</title><description>&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: inherit; margin: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg96mReHGXtTxjG9lhoqKhtQ-Z3_NE6g2xB0YmfKPtbGi4pciIk5mjJDPFyLMQfK6o4FkPwd_sIK7Uv53UKpQRtJUXi-bsEpyOn3HZbEJ3ZuBt6n_A87FtyieSC-nNVT0uS0g70sZJxBxY/s1600/Ubuntu+logo.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg96mReHGXtTxjG9lhoqKhtQ-Z3_NE6g2xB0YmfKPtbGi4pciIk5mjJDPFyLMQfK6o4FkPwd_sIK7Uv53UKpQRtJUXi-bsEpyOn3HZbEJ3ZuBt6n_A87FtyieSC-nNVT0uS0g70sZJxBxY/s1600/Ubuntu+logo.png&quot; style=&quot;cursor: move;&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Una de las preguntas más frecuentes que me hace la gente es: - &quot;Quiero cambiar a linux, pero ¿Qué distribución es la mejor?&quot;-&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;A lo que yo respondo: &quot;La mejor opción para un usuario que empieza con Linux es Ubuntu&quot;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Es fácil de usar y es compatible con la mayoría del hardware que usamos hoy en día.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;No se necesita ser un experto para llevar a cabo la instalación.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Es gratis.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Con Ubuntu puedes olvidarte de los virus, soy usuario de Linux por mas de 10 años y jamás me he visto en situaciones indeseables por causa de virus. Aunque, cómo ya lo mencioné en otro post, existen Anti-Virus para linux, de los cuales me quedo con Kaspersky.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;El Administrador de Software facilita la búsqueda, instalación y desinstalación de paquetes. Incluye Libre Office, los navegadores más rápidos Chrome y firefox, aplicaciones de mensajería instantánea, editores de imágenes, ambientes de desarrollo, qué mas necesitas?&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Descarga Ubuntu:&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://www.ubuntu.com/download/ubuntu/download%20&quot;&gt;http://www.ubuntu.com/download/ubuntu/download&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Nos vemos en la siguiente entrada.&lt;/span&gt;&lt;/div&gt;</description><link>http://best-linux-server.blogspot.com/2011/08/empezar-con-linux.html</link><author>noreply@blogger.com (Angel Cabrera)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg96mReHGXtTxjG9lhoqKhtQ-Z3_NE6g2xB0YmfKPtbGi4pciIk5mjJDPFyLMQfK6o4FkPwd_sIK7Uv53UKpQRtJUXi-bsEpyOn3HZbEJ3ZuBt6n_A87FtyieSC-nNVT0uS0g70sZJxBxY/s72-c/Ubuntu+logo.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-9084061075345569462</guid><pubDate>Mon, 29 Aug 2011 19:06:00 +0000</pubDate><atom:updated>2011-09-07T12:55:42.983-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Kaspersky</category><category domain="http://www.blogger.com/atom/ns#">Linux</category><category domain="http://www.blogger.com/atom/ns#">Malware</category><category domain="http://www.blogger.com/atom/ns#">Spyware</category><category domain="http://www.blogger.com/atom/ns#">Virus</category><title>Malware en Linux</title><description>&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: inherit; margin: 0px; text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;a href=&quot;http://www.kaspersky.com/images/newdesign/logo_.gif&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.kaspersky.com/images/newdesign/logo_.gif&quot; style=&quot;cursor: move;&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;C&lt;/b&gt;&lt;/span&gt;uántas veces nos hemos preguntado si GNU/Linux es &quot;mas seguro&quot; que MS Windows. Puede ser percepción, pero desde mi punto de vista no todo depende de una compañía u otra, sino también de nuestros hábitos en Internet, de nuestros hábitos como administradores de los servidores o la red. Sería muy tonto echarle la culpa a la compañía X o Y, pues somos usuarios de aaaaaaños de sus sistemas operativos, sabemos como funcionan, sabemos sus fallos y siempre debemos estar un paso adelante en la investigación, en la seguridad, debemos hacernos responsables de aplicar los parches de seguridad, de actualizar el kernel, de no usar aplicaciones dudosas, etc.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;En Internet, hay una gran cantidad de servidores Web usando linux, hay una gran cantidad de servidores FTP, servidores de correo, servidores de bases de datos corriendo una distribución linux. Existe una gran cantidad de proveedores de hosting usando linux en sus data centers, por lo que linux se convierte en un medio de transporte para el malware. Por otro lado, cada día aumenta el numero de usuarios de linux a nivel desktop.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;Por estas razones, es altamente recomendable el uso de una herramienta anti malware en Linux (y no solo en nuestros equipos PCs o laptops, también en los servidores, smartphones, etc.) y, pues bien, después de haber trabajado &amp;nbsp;por muchos años en lo que fue Kaspersky Lab México (hoy mayorista de KL) puedo recomendar a la comunidad linuxera en AL y cualquier parte del mundo el uso de&amp;nbsp;Kaspersky Endpoint Security para Linux, el cual es ideal para uso personal y en ambientes empresariales por su facilidad de instalación y administración. KES4Linux incluye protección en tiempo real, lo que lo hace aún mas atractivo.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;Pero no todo puede ser bello, lamentablemente la protección en tiempo real depende de la versión del kernel que usemos, así que si ustedes son usuarios de las siguientes distribuciones podrán instalar Kaspersky:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;Red Hat Enterprise Linux 5.5 Desktop&lt;/span&gt;&lt;/li&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;li&gt;Fedora 13&lt;/li&gt;
&lt;li&gt;CentOS-5.5&lt;/li&gt;
&lt;li&gt;SUSE Linux Enterprise Desktop 10 SP3&lt;/li&gt;
&lt;li&gt;SUSE Linux Enterprise Desktop 11 SP1&lt;/li&gt;
&lt;li&gt;openSUSE Linux 11.3&lt;/li&gt;
&lt;li&gt;Ubuntu 10.04 LTS Desktop Edition&lt;/li&gt;
&lt;li&gt;Debian GNU/Linux 5.0.5&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;Incluye soporte para 32 y 64 bits.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;Mas información:&amp;nbsp;&lt;a href=&quot;http://www.kaspersky.com/endpoint-security-linux&quot;&gt;http://www.kaspersky.com/endpoint-security-linux&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;Descarga:&amp;nbsp;&lt;a href=&quot;http://www.kaspersky.com/productupdates?chapter=146274389&quot;&gt;Kaspersky Endpoint Security para Linux&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://www.kaspersky.com/productupdates?chapter=146274395&quot;&gt;Kaspersky Anti-Virus for Linux File Server&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;En escritorio, uso Ubuntu 11.04 y próximamente Fedora 15, y como les dije no hay soporte para estas versiones recientes.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;Si requieren alguna licencia (original) comercial de este producto con gusto se las puedo conseguir a buen precio, y si desean algún tipo de consultoría sobre este tipo de soluciones caseras y empresariales también con todo gusto los puedo ayudar.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;Nos vemos en la siguiente entrada&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;/div&gt;</description><link>http://best-linux-server.blogspot.com/2011/08/malware-en-linux.html</link><author>noreply@blogger.com (Angel Cabrera)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-5327558269127092227</guid><pubDate>Mon, 11 Jul 2011 06:00:00 +0000</pubDate><atom:updated>2011-09-22T12:55:58.599-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CEntOS</category><category domain="http://www.blogger.com/atom/ns#">Linux</category><title>CEntOS 6</title><description>&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;C&lt;/b&gt;&lt;/span&gt;EntOS Linux 6 ha sido liberado. La famosa versión basada en RHEL (Red Hat Enterprise Linux) soportada por la comunidad es considerada la más popular para servidores Web, con casi el 30% de uso en Internet. &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTLJ2wSlA3TNsGDJx6FSge-54U2b46WVAA7BtId5fkxA7pIAYkBMjKzoN8jPVagFw79rr8in1YAB08Mn1a43_b8_tt4TXIIHNMbqUmBZieGmZH9SyshhZSBUMYWXm9KXTjuGrrS6mO6ow/s1600/CentOS6-Desktop.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTLJ2wSlA3TNsGDJx6FSge-54U2b46WVAA7BtId5fkxA7pIAYkBMjKzoN8jPVagFw79rr8in1YAB08Mn1a43_b8_tt4TXIIHNMbqUmBZieGmZH9SyshhZSBUMYWXm9KXTjuGrrS6mO6ow/s640/CentOS6-Desktop.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Descarga: &lt;a href=&quot;http://mirror.centos.org/centos/6/isos/i386/&quot;&gt;i386&lt;/a&gt; | &lt;a href=&quot;http://mirror.centos.org/centos/6/isos/x86_64/&quot;&gt;x86_64&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Listo, nos vemos en la siguiente entrada.</description><link>http://best-linux-server.blogspot.com/2011/07/centos-6.html</link><author>noreply@blogger.com (Angel Cabrera)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTLJ2wSlA3TNsGDJx6FSge-54U2b46WVAA7BtId5fkxA7pIAYkBMjKzoN8jPVagFw79rr8in1YAB08Mn1a43_b8_tt4TXIIHNMbqUmBZieGmZH9SyshhZSBUMYWXm9KXTjuGrrS6mO6ow/s72-c/CentOS6-Desktop.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-2966961457240620691</guid><pubDate>Fri, 27 May 2011 18:29:00 +0000</pubDate><atom:updated>2011-11-16T14:34:37.152-06:00</atom:updated><title>Administración segura de Linux con sudo</title><description>&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Menú arriba */
google_ad_slot = &quot;7417695000&quot;;
google_ad_width = 728;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;style type=&quot;text/css&quot;&gt;
.summary {margin-top:1.0em;text-shadow:0 1px 1px #fff;background:#b8bbc5;padding:10px;font-size:1.0em;font-family:Helvetica;color:#000; }h2{font-size:1.2em;line-height:0.9em;margin-bottom:0.9em;font-family:Helvetica,Arial,&quot;Lucida Grande&quot;,&quot;Lucida Sans&quot;,Tahoma,Verdana,sans-serif;text-shadow:0 1px 1px #fff;color:#333}
&lt;/style&gt;&lt;br /&gt;
&lt;div class=&quot;summary&quot;&gt;
Root es el todopoderoso en Linux. Gracias a nuestra característica errante como seres humanos es muy aventurado usar root. Usando sudo podemos limitar el riesgo y evitar situaciones indeseadas.&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Helvetica,Arial,&#39;Lucida Grande&#39;,&#39;Lucida Sans&#39;,Tahoma,Verdana,sans-serif; font-size: 19px; font-weight: bold; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Helvetica,Arial,&#39;Lucida Grande&#39;,&#39;Lucida Sans&#39;,Tahoma,Verdana,sans-serif; font-size: 19px; font-weight: bold; line-height: 17px;&quot;&gt;Uso de root en linux&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Helvetica,Arial,&#39;Lucida Grande&#39;,&#39;Lucida Sans&#39;,Tahoma,Verdana,sans-serif; font-size: 19px; font-weight: bold; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
La cuenta root en Linux puede hacer todo - ver todos los archivos, correr todas las tareas, matar todos los procesos, ver todos los logs, borrar discos duros, etc. En lo personal, he visto muchos &quot;administradores&quot; que son felices usando root, inclusive que inician sesión en el ambiente gráfico como root. A este tipo de personas también las he visto sufrir y llorar durante días debido a que cometieron errores difíciles de revertir. Por ejemplo: apagar el servidor, borrar el directorio /, activar el firewall, etc.&lt;br /&gt;
&lt;br /&gt;
Afortunadamente, existe una forma de limitar el impacto del error humano, esto se logra con &lt;i&gt;sudo&lt;/i&gt;, qué, sencillamente, permite ejecutar comando como root a usuarios que no son root. Eso no le quita lo peligroso, pero si nos va a ahorrar muchos dolores de cabeza.&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Helvetica,Arial,&#39;Lucida Grande&#39;,&#39;Lucida Sans&#39;,Tahoma,Verdana,sans-serif; font-size: 19px; font-weight: bold; line-height: 17px;&quot;&gt;¿Cómo funciona sudo?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Sudo permite a los usuarios realizar acciones como root. Podemos especificar las cuentas de usuario que pueden hacer tareas especificas. Por ejemplo, si queremos darle permiso al usuario angel para reiniciar apache, angel puede hacer lo siguiente:&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;border: 1px inset; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;angel@angel-Vostro-200:~$ sudo /etc/init.d/httpd restart
Password: #angel&#39;s password entered
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]&lt;/pre&gt;
&lt;br /&gt;
Sin ser root, angel pudo reiniciar apache.&amp;nbsp;Adicional&amp;nbsp;a esto, todas las acciones son reportadas a &lt;i&gt;/var/log/messages&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;border: 1px inset; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;Jun 12 00:00:01 angel-Vostro-200 sudo: angel : TTY = pts/0 ; PWD = /home/angel ; USER = root ; COMMAND = /etc/init.d/httpd restart&lt;/pre&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Helvetica,Arial,&#39;Lucida Grande&#39;,&#39;Lucida Sans&#39;,Tahoma,Verdana,sans-serif; font-size: 19px; font-weight: bold; line-height: 17px;&quot;&gt;Configurando los permisos&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Para hacer esto se debe acceder como root y ejecutar visudo.&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;border: 1px inset; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;# visudo&lt;/pre&gt;
&lt;br /&gt;
Este es el archivo de configuración de sudoers. Aquí se definen los comandos que vamos a permitir que ejecuten los usuarios como root. Nuestra necesidad es que angel pueda administrar Apache.&lt;br /&gt;
&lt;br /&gt;
Para facilitar la administración, sugiero generar alias de usuario.&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;border: 1px inset; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;User_Alias &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;WEBSERVERADMIN&lt;/b&gt;&lt;/span&gt; = angel&lt;/pre&gt;
&lt;br /&gt;
A continuación se definen los servicios que angel podrá operar.&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;border: 1px inset; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;Cmnd_Alias &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;APACHE&lt;/b&gt;&lt;/span&gt; = /etc/init.d/httpd start, /etc/init.d/httpd stop, /etc/init.d/httpd restart, /etc/init.d/httpd graceful, /etc/init.d/httpd configtest&lt;/pre&gt;
&lt;br /&gt;
Por último, construimos los permisos usando alias de usuario y de comando:&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;border: 1px inset; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;WEBSERVERADMIN ALL= APACHE&lt;/pre&gt;
&lt;br /&gt;
Para salir de visudo, presionamos ESC y escribimos :wq en modo comando (igual que en vi)&lt;br /&gt;
&lt;br /&gt;
A partir de este momento, cualquier usuario en el alias &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;WEBSERVERADMIN&lt;/b&gt;&lt;/span&gt;&amp;nbsp;podrá usar los comandos definidos en &amp;nbsp;Cmnd_Alias cuando usen sudo.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Nota: No olviden anteponer sudo antes de ejecutar el comando.&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Nos vemos en la siguiente entrada.</description><link>http://best-linux-server.blogspot.com/2011/05/blog-post.html</link><author>noreply@blogger.com (Angel Cabrera)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7786294552042737107.post-7575252697625612938</guid><pubDate>Fri, 20 May 2011 17:47:00 +0000</pubDate><atom:updated>2011-11-16T14:12:41.665-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Buscar y Reemplazar en VI</category><title>Buscar y Reemplazar en VI</title><description>Algo que normalmente hacemos en Win2, en Word, Excel, Notepad y, prácticamente, en cualquier editor gráfico de texto, es usar la función &quot;Buscar y Reemplazar&quot;. Pero qué pasa cuando estamos frente a una consola linux, sin ambiente gráfico... Cómo que la cosa se complica, no? Bueno, pues el editor &quot;vi&quot; (vi-ai) nos permite hacer esto de una forma sencilla:&lt;br /&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-2517565030614323&quot;;
/* Entradas */
google_ad_slot = &quot;6617699081&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;&lt;br/&gt;
&lt;br /&gt;
Abran el archivo con vi&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;border: 1px inset; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;$ vi archivo&lt;/pre&gt;
&lt;br /&gt;
Vayan a &quot;command mode&quot; presionando la tecla &amp;lt;ESC&amp;gt; y a continuación escriban:&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;border: 1px inset; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;:1,$ s/texto_buscado/reemplazar_con/g&lt;/pre&gt;
&lt;br /&gt;
Esto significa, escribir el carácter dos puntos &quot;:&quot; luego definimos el rango de líneas en donde queremos buscar y reemplazar, en este caso decimos: desde la línea &quot;1&quot;, luego &quot;,&quot; y el &quot;$&quot; que significa la última línea del archivo. &lt;br /&gt;
&lt;br /&gt;
A continuación un &quot;espacio&quot; y &quot;s/&quot; que significa &quot;Search&quot; escribir el texto a buscar, luego &quot;/&quot; escribir el texto con el qué vamos a reemplazar, y por último &quot;/g&quot; para indicar el fin del comando.&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;border: 1px inset; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;:1,$ s/texto_buscado/reemplazar_con/g&lt;/pre&gt;
&lt;br /&gt;
Si desean que por cada coincidencia les vaya confirmando el reemplazo solo agreguen una &quot;c&quot; al final:&lt;br /&gt;
&lt;br /&gt;
&lt;pre dir=&quot;ltr&quot; style=&quot;border: 1px inset; margin: 0px; overflow: auto; padding: 6px; text-align: left;&quot;&gt;:1,$ s/texto_buscado/reemplazar_con/gc&lt;/pre&gt;
&lt;br /&gt;
Listo, nos vemos en la siguiente entrada.</description><link>http://best-linux-server.blogspot.com/2011/05/algo-que-normalmente-hacemos-en-win2-en.html</link><author>noreply@blogger.com (Angel Cabrera)</author><thr:total>0</thr:total></item></channel></rss>