<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>Rubén Ortiz &#187; Linux</title> <atom:link href="http://www.rubenortiz.es/category/linux/feed/" rel="self" type="application/rss+xml" /><link>http://www.rubenortiz.es</link> <description>Blog personal de Rubén Ortiz</description> <lastBuildDate>Mon, 16 Jan 2012 08:09:38 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=</generator> <item><title>CentOS &#8211; deshabilitar selinux</title><link>http://www.rubenortiz.es/2011/10/11/centos-deshabilitar-selinux/</link> <comments>http://www.rubenortiz.es/2011/10/11/centos-deshabilitar-selinux/#comments</comments> <pubDate>Tue, 11 Oct 2011 07:21:59 +0000</pubDate> <dc:creator>Rubén Ortiz</dc:creator> <category><![CDATA[Centos]]></category> <category><![CDATA[Linux]]></category> <guid
isPermaLink="false">http://www.rubenortiz.es/?p=4832</guid> <description><![CDATA[Para hacerlo al momento sin esperar a reinicio 1# setenforce 0 Cambiar configuración para siguientes reinicios 12345678910# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # &#160; &#160; &#160; enforcing - SELinux security policy is enforced. # &#160; &#160; &#160; permissive - SELinux prints [...]]]></description> <content:encoded><![CDATA[<p>Para hacerlo al momento sin esperar a reinicio</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># setenforce 0</div></td></tr></tbody></table></div><p><span
id="more-4832"></span><br
/> Cambiar configuración para siguientes reinicios</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/>6<br
/>7<br
/>8<br
/>9<br
/>10<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># This file controls the state of SELinux on the system.<br
/> # SELINUX= can take one of these three values:<br
/> # &nbsp; &nbsp; &nbsp; enforcing - SELinux security policy is enforced.<br
/> # &nbsp; &nbsp; &nbsp; permissive - SELinux prints warnings instead of enforcing.<br
/> # &nbsp; &nbsp; &nbsp; disabled - SELinux is fully disabled.<br
/> SELINUX=disabled<br
/> # SELINUXTYPE= type of policy in use. Possible values are:<br
/> # &nbsp; &nbsp; &nbsp; targeted - Only targeted network daemons are protected.<br
/> # &nbsp; &nbsp; &nbsp; strict - Full SELinux protection.<br
/> SELINUXTYPE=targeted</div></td></tr></tbody></table></div> ]]></content:encoded> <wfw:commentRss>http://www.rubenortiz.es/2011/10/11/centos-deshabilitar-selinux/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>MongoDB en CentOS</title><link>http://www.rubenortiz.es/2011/10/06/mongodb-en-centos/</link> <comments>http://www.rubenortiz.es/2011/10/06/mongodb-en-centos/#comments</comments> <pubDate>Thu, 06 Oct 2011 11:17:49 +0000</pubDate> <dc:creator>Rubén Ortiz</dc:creator> <category><![CDATA[Centos]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[centos]]></category> <category><![CDATA[mongodb]]></category> <guid
isPermaLink="false">http://www.rubenortiz.es/?p=4810</guid> <description><![CDATA[¿Qué es MongoDB? Buena pregunta, ¿hay algún médico en la sala? Pues es una base de datos orientada a documentos, un concepto bastente diferente del SQL. MongoDB wasn’t designed in a lab. We built MongoDB from our own experiences building large scale, high availability, robust systems. We didn’t start from scratch, we really tried to [...]]]></description> <content:encoded><![CDATA[<p>¿Qué es MongoDB? Buena pregunta, ¿hay algún médico en la sala? Pues es una base de datos orientada a documentos, un concepto bastente diferente del SQL.</p><blockquote><p>MongoDB wasn’t designed in a lab. We built MongoDB from our own experiences building large scale, high availability, robust systems. We didn’t start from scratch, we really tried to figure out what was broken, and tackle that. So the way I think about MongoDB is that if you take MySql, and change the data model from relational to document based, you get a lot of great features: embedded docs for speed, manageability, agile development with schema-less databases, easier horizontal scalability because joins aren’t as important. There are lots of things that work great in relational databases: indexes, dynamic queries and updates to name a few, and we haven’t changed much there. For example, the way you design your indexes in MongoDB should be exactly the way you do it in MySql or Oracle, you just have the option of indexing an embedded field.</p><p>– Eliot Horowitz, 10gen CTO and Co-founder</p></blockquote><p>Acabamos de conocernos pero lo poco que he visto me gusta, al menos, la documentación es amplia y precisa. En este post tratamos la instalación y cuatro comandos de newbie<br
/> <span
id="more-4810"></span></p><p>La instalación se lleva a cabo en CentOS 6 64 bits.<br
/> Editamos nuestro repositorio de CentOS:</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># cd /etc/yum.repos.d<br
/> # vim mongodb.10gen.repo</div></td></tr></tbody></table></div><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[10gen]<br
/> name=10gen Repository<br
/> baseurl=http://downloads.mongodb.org/distros/centos/5.4/os/x86_64/<br
/> gpgcheck=0</div></td></tr></tbody></table></div><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># sudo yum install mongo-stable-server<br
/> # sudo /etc/init.d/monod start<br
/> # chkconfig mongod on</div></td></tr></tbody></table></div><p>Primeros pasos:</p><p>Accedemos por consola a nuestro MongoDB</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">-bash-4.1# mongo<br
/> MongoDB shell version: 1.6.5<br
/> connecting to: test<br
/> &amp;gt;</div></td></tr></tbody></table></div><p>Una vez dentro, listamos bases de datos a las que estamos conectados</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&amp;gt; show dbs<br
/> admin<br
/> local</div></td></tr></tbody></table></div><p>Cambiamos a otra base de datos o creamos una de cero</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&amp;gt; use prueba<br
/> switched to db prueba</div></td></tr></tbody></table></div><p>Añadimos y salvamos un documento</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/>6<br
/>7<br
/>8<br
/>9<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&amp;gt; post={<br
/> ... 'title':'aprendiendo mongodb',<br
/> ... 'content':'base de datos orientada a documentos???? lol'<br
/> ... }<br
/> {<br
/> &quot;title&quot; : &quot;aprendiendo mongodb&quot;,<br
/> &quot;content&quot; : &quot;base de datos orientada a documentos???? lol&quot;<br
/> }<br
/> &amp;gt; db.blog.insert(post)</div></td></tr></tbody></table></div><p>Hacemos query de todos los documentos</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&amp;gt; db.blog.find()<br
/> { &quot;_id&quot; : ObjectId(&quot;4e8d8a2b9699783129d48d61&quot;), &quot;title&quot; : &quot;aprendiendo mongodb&quot;, &quot;content&quot; : &quot;mongodb es una base de datos orientada a documentos...LOL&quot; }</div></td></tr></tbody></table></div><p>Query de un documento</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/>6<br
/>7<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&amp;gt; db.blog.findOne()<br
/> {<br
/> &quot;_id&quot; : ObjectId(&quot;4e8d8a2b9699783129d48d61&quot;),<br
/> &quot;title&quot; : &quot;aprendiendo mongodb&quot;,<br
/> &quot;content&quot; : &quot;mongodb es una base de datos orientada a documentos...LOL&quot;<br
/> }<br
/> &amp;gt;</div></td></tr></tbody></table></div><p>Query de documentos en base a un valor especifico</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&amp;gt; db.blog.find({'title':'aprendiendo mongodb'})<br
/> { &quot;_id&quot; : ObjectId(&quot;4e8d8a2b9699783129d48d61&quot;), &quot;title&quot; : &quot;aprendiendo mongodb&quot;, &quot;content&quot; : &quot;mongodb es una base de datos orientada a documentos...LOL&quot; }<br
/> &amp;gt;</div></td></tr></tbody></table></div><p><strong>Links</strong></p><ul><li><a
href="http://www.mongodb.org/display/DOCS/Overview+-+The+MongoDB+Interactive+Shell">http://www.mongodb.org/display/DOCS/Overview+-+The+MongoDB+Interactive+Shell</a></li><li><a
href="http://komunitasweb.com/2010/06/my-first-step-into-mongodb-installing-mongodb-on-ubuntu/">http://komunitasweb.com/2010/06/my-first-step-into-mongodb-installing-mongodb-on-ubuntu/</a></li><li><a
href="http://komunitasweb.com/2010/06/beginner-step-into-mongodb/">http://komunitasweb.com/2010/06/beginner-step-into-mongodb/</a></li><li><a
href="http://www.mongodb.org/display/DOCS/Introduction">http://www.mongodb.org/display/DOCS/Introduction</a></li></ul> ]]></content:encoded> <wfw:commentRss>http://www.rubenortiz.es/2011/10/06/mongodb-en-centos/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Linux &#8211; montar swap</title><link>http://www.rubenortiz.es/2011/10/03/linux-montar-swap/</link> <comments>http://www.rubenortiz.es/2011/10/03/linux-montar-swap/#comments</comments> <pubDate>Mon, 03 Oct 2011 13:18:51 +0000</pubDate> <dc:creator>Rubén Ortiz</dc:creator> <category><![CDATA[Centos]]></category> <category><![CDATA[Linux]]></category> <guid
isPermaLink="false">http://www.rubenortiz.es/?p=4801</guid> <description><![CDATA[Apunte sobre swap. Mejor que esté y lo puedas utilizar, que lo tengas que utilizar y no lo hayas montado. Tenemos una máquina sin swap activo pero con la partición ya formateada. 12345678# fdisk -l Disk /dev/sda: 274.8 GB, 274877906944 bytes 255 heads, 63 sectors/track, 33418 cylinders Units = cylinders of 16065 * 512 = [...]]]></description> <content:encoded><![CDATA[<p>Apunte sobre swap. Mejor que esté y lo puedas utilizar, que lo tengas que utilizar y no lo hayas montado. Tenemos una máquina sin swap activo pero con la partición ya formateada.<br
/> <span
id="more-4801"></span></p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/>6<br
/>7<br
/>8<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># fdisk -l<br
/> Disk /dev/sda: 274.8 GB, 274877906944 bytes<br
/> 255 heads, 63 sectors/track, 33418 cylinders<br
/> Units = cylinders of 16065 * 512 = 8225280 bytes<br
/> <br
/> ...<br
/> /dev/sda4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 33158 &nbsp; &nbsp; &nbsp; 33419 &nbsp; &nbsp; 2096128 &nbsp; 82 &nbsp;Linux swap / Solaris<br
/> ...</div></td></tr></tbody></table></div><p>Utilizamos mkswap  para configurar el área de swap</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># mkswap -f /dev/sda4</div></td></tr></tbody></table></div><p>Y finalmente, activamos la swap del sistema</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># swapon /dev/sda4</div></td></tr></tbody></table></div><p><strong>Link</strong><br
/> <a
href="http://lissot.net/partition/partition-08.html">http://lissot.net/partition/partition-08.html</a></p> ]]></content:encoded> <wfw:commentRss>http://www.rubenortiz.es/2011/10/03/linux-montar-swap/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Ubuntu &#8211; Instalando cliente snmpd</title><link>http://www.rubenortiz.es/2011/08/04/ubuntu-instalando-cliente-snmpd/</link> <comments>http://www.rubenortiz.es/2011/08/04/ubuntu-instalando-cliente-snmpd/#comments</comments> <pubDate>Thu, 04 Aug 2011 07:58:15 +0000</pubDate> <dc:creator>Rubén Ortiz</dc:creator> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[cacti]]></category> <category><![CDATA[ubuntu]]></category> <guid
isPermaLink="false">http://www.rubenortiz.es/?p=4742</guid> <description><![CDATA[Configuración necesaria para monitorizar el tráfico de un host Ubuntu (Ubuntu!, que gracia me hace la palabra ). 12# apt-get install snmp snmpd # mv /etc/snmp/snmpd.conf /etc/snmp/old.snmpd.conf añadimos nuestra community al fichero de configuración 1# echo &#34;rocommunity mycommunity&#34; &#62; /etc/snmp/snmpd.conf por último hemos de cambiar una fichero más, sino, nuestro Cacti no llegará a conectarse [...]]]></description> <content:encoded><![CDATA[<p>Configuración necesaria para monitorizar el tráfico de un host Ubuntu (Ubuntu!, que gracia me hace la palabra <img
src='http://www.rubenortiz.es/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ).<br
/> <span
id="more-4742"></span></p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># apt-get install snmp snmpd<br
/> # mv /etc/snmp/snmpd.conf /etc/snmp/old.snmpd.conf</div></td></tr></tbody></table></div><p>añadimos nuestra community al fichero de configuración</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># echo &quot;rocommunity mycommunity&quot; &gt; /etc/snmp/snmpd.conf</div></td></tr></tbody></table></div><p>por último hemos de cambiar una fichero más, sino, nuestro Cacti no llegará a conectarse al cliente snmpd. Quitamos el string &#8220;127.0.0.1&#8243; y nos quedará algo como esto</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid'</div></td></tr></tbody></table></div><p>Reinciamos y ya debería funcionar <img
src='http://www.rubenortiz.es/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># /etc/init.d/snmpd restart</div></td></tr></tbody></table></div> ]]></content:encoded> <wfw:commentRss>http://www.rubenortiz.es/2011/08/04/ubuntu-instalando-cliente-snmpd/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>CentOS 6</title><link>http://www.rubenortiz.es/2011/07/18/centos-6/</link> <comments>http://www.rubenortiz.es/2011/07/18/centos-6/#comments</comments> <pubDate>Mon, 18 Jul 2011 10:16:27 +0000</pubDate> <dc:creator>Rubén Ortiz</dc:creator> <category><![CDATA[Centos]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[centos]]></category> <guid
isPermaLink="false">http://www.rubenortiz.es/?p=4685</guid> <description><![CDATA[Lanzamiento de CentOS 6 ya disponible. Esta distribución tiene como kernel la versión 2.6.32. Se han subido de versión paquetes como Apache, MySQL, PHP, etc.El MTA es ahora postfix, no sendmail. Links http://centos.org/ http://wiki.centos.org/Manuals/ReleaseNotes/CentOS6.0 http://isoredirect.centos.org/centos/6/isos/x86_64/ http://isoredirect.centos.org/centos/6/isos/i386/]]></description> <content:encoded><![CDATA[<p>Lanzamiento de CentOS 6 ya disponible. Esta distribución tiene como kernel la versión 2.6.32. Se han subido de versión paquetes como Apache, MySQL, PHP, etc.El MTA es ahora postfix, no sendmail.</p><p><strong>Links</strong></p><p><a
href="http://centos.org/" title="Centos Home">http://centos.org/</a><br
/> <a
href="http://wiki.centos.org/Manuals/ReleaseNotes/CentOS6.0" title="Centos 6 Release Notes">http://wiki.centos.org/Manuals/ReleaseNotes/CentOS6.0</a><br
/> <a
href="http://isoredirect.centos.org/centos/6/isos/x86_64/" title="Centos 6.0 X86_64">http://isoredirect.centos.org/centos/6/isos/x86_64/</a><br
/> <a
href="http://isoredirect.centos.org/centos/6/isos/i386/" title="CentOS x86">http://isoredirect.centos.org/centos/6/isos/i386/</a></p> ]]></content:encoded> <wfw:commentRss>http://www.rubenortiz.es/2011/07/18/centos-6/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>CentOS 5 &#8211; compilar e instalar NMAP</title><link>http://www.rubenortiz.es/2011/07/08/centos-5-compilar-e-instalar-nmap/</link> <comments>http://www.rubenortiz.es/2011/07/08/centos-5-compilar-e-instalar-nmap/#comments</comments> <pubDate>Fri, 08 Jul 2011 12:56:39 +0000</pubDate> <dc:creator>Rubén Ortiz</dc:creator> <category><![CDATA[Centos]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[centos]]></category> <guid
isPermaLink="false">http://www.rubenortiz.es/?p=4636</guid> <description><![CDATA[Compilando NMAP 123456789# yum install gcc gcc-c++ # wget http://nmap.org/dist/nmap-5.51.tgz # tar xf nmap-5.51.tgz # cd nmap-5.51 # ./configure # make # make install # whereis nmap nmap: /usr/local/bin/nmap /usr/share/nmap]]></description> <content:encoded><![CDATA[<p>Compilando NMAP</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/>6<br
/>7<br
/>8<br
/>9<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># yum install gcc gcc-c++<br
/> # wget http://nmap.org/dist/nmap-5.51.tgz<br
/> # tar xf nmap-5.51.tgz<br
/> # cd nmap-5.51<br
/> # ./configure<br
/> # make<br
/> # make install<br
/> # whereis nmap<br
/> nmap: /usr/local/bin/nmap /usr/share/nmap</div></td></tr></tbody></table></div> ]]></content:encoded> <wfw:commentRss>http://www.rubenortiz.es/2011/07/08/centos-5-compilar-e-instalar-nmap/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Centos 5 &#8211; instalar Mtop</title><link>http://www.rubenortiz.es/2011/05/03/centos-5-instalar-mtop/</link> <comments>http://www.rubenortiz.es/2011/05/03/centos-5-instalar-mtop/#comments</comments> <pubDate>Tue, 03 May 2011 09:57:15 +0000</pubDate> <dc:creator>Rubén Ortiz</dc:creator> <category><![CDATA[Centos]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[centos]]></category> <category><![CDATA[mysql]]></category> <guid
isPermaLink="false">http://www.rubenortiz.es/?p=4406</guid> <description><![CDATA[Vamos a ver como instalar mtop. Mtop, es un software desarrollado para trabajar contra el motor de base de datos Mysql. Mtop monitoriza MySQL Server mostrando las queries que están tardando más tiempo en completarse. Incluye características como zooming sobre el proceso para mostrar la query completa, explicación de la optimización de la query y [...]]]></description> <content:encoded><![CDATA[<p>Vamos a ver como instalar mtop. Mtop, es un software desarrollado para trabajar contra el motor de base de datos <a
href="http://www.rubenortiz.es/category/software/mysql-software/">Mysql</a>. Mtop monitoriza MySQL Server mostrando las queries que están tardando más tiempo en completarse. Incluye características como zooming sobre el proceso para mostrar la query completa, explicación de la optimización de la query y matar queries. Además, nos aporta estadísticas de rendimiento del servidor, información de la configuración y consejos de tunning.<br
/> <span
id="more-4406"></span><br
/> <strong>1. Instalación</strong></p><p>Antes de la instalación necesitamos instalar un rpm no oficial del repositorio de DagWiers</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;# wget http://dag.wieers.com/rpm/packages/perl-Curses/perl-Curses-1.23-1.el5.rf.x86_64.rpm&lt;/strong&gt;<br
/> # rpm -ivh perl-Curses-1.23-1.el5.rf.x86_64.rpm</div></td></tr></tbody></table></div><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/>6<br
/>7<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;# cd /usr/local/src<br
/> # wget http://downloads.sourceforge.net/project/mtop/mtop/v0.6.6/mtop-0.6.6.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmtop%2Ffiles%2Fmtop%2Fv0.6.6%2F&amp;amp;ts=1304411062&amp;amp;use_mirror=ignum<br
/> # tar xf mtop-0.6.6.tar.gz<br
/> # cd mtop-0.6.6<br
/> # perl Makefile.PL<br
/> # make<br
/> # make install&lt;/strong&gt;</div></td></tr></tbody></table></div><p>Nos debería salir algo así</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/>6<br
/>7<br
/>8<br
/>9<br
/>10<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;-bash-3.2# make install&lt;/strong&gt;<br
/> Manifying blib/man1/mkill.1<br
/> Manifying blib/man1/mtop.1<br
/> Installing /usr/local/bin/mkill<br
/> Installing /usr/local/bin/mtop<br
/> Installing /usr/local/lib/perl5/5.8.8/cpan2spec.pl<br
/> Installing /usr/local/share/man/man1/mtop.1<br
/> Installing /usr/local/share/man/man1/mkill.1<br
/> Writing /usr/local//lib64/perl5/5.8.8/x86_64-linux-thread-multi/auto/mtop/.packlist<br
/> Appending installation info to /usr/local//lib64/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod</div></td></tr></tbody></table></div><p><strong>2. Ejecución</strong></p><p>Ahora deberíamos poder ejecutar mtop de la siguiente forma</p><p># /usr/local/bin/mtop &#8211;host=localhost &#8211;dbuser=root &#8211;password=password</p><p>y veremos algo así</p><p><a
href="http://www.rubenortiz.es/wp-content/uploads/2011/05/mtop1.jpg"><img
src="http://www.rubenortiz.es/wp-content/uploads/2011/05/mtop1-300x88.jpg" alt="" title="mtop" width="300" height="88" class="aligncenter size-medium wp-image-4411" /></a></p><p><strong>3. Explicación de Valores</strong><br
/> n Threads: running, cached<br
/> Los n Threads representa cuantos threads ha alojado mysqld. Un thread es alojado por cada conexión de usuario. Los threads adicionales son usados para replicación.</p><p>Queries/slow: Total queries / Total SLOW QUERIES<br
/> El primer número es el total de queries enviadas al servidor desde el último inicio o el último FLUSH STATUS. El segundo número es el número de queries que han tomado más tiempo que el la variable long_query_time</p><p>Cache Hit: Cache hit ratio<br
/> Esto es el porcentaje de tiempo que una lectura de key es accedida desde el key buffer cache.</p><p>Opened tables: tables opened<br
/> MySQL tiene cache para tablas abiertas. Si &#8216;opened tables&#8217; es algo alta, puede que tu cache sea demasiado pequeña.</p><p>RRN: Handler_read_rnd_next<br
/> Número de peticiones para lectura de la siguiente fila en el archivo de datos (datafile). Esto será alto si estás haciendo escaneo de tablas.  Generalmente esto sugiere que tus tablas no están siendo indexadas adecuadamente o que tus queries no están diseñadas para tomar ventaja de los índices.</p><p>TLW: Table_locks_waited<br
/> Número de veces que una table lock no pudo ser acceda inmediatamente y se tuvo que esperar. Si es alto, y tu tienes problemas de rendimiiento, debes optimizar primero tus queries y entonces partir tus tablas o usar replicación.</p><p>SFJ: Select_full_join<br
/> Número de joins sin keys (si esto no es 0, deberías comprobar adecuadamente los índices de tus tablas)</p><p>SMP: Sort_merge_passes<br
/> Número de &#8220;merge&#8221;<br
/> Number of merges passes the sort algoritm have had to do. Si este valor es alto deberías considerar incrementar el sort_buffer</p><p>QPS: Questions per second<br
/> El número total de comandos SQL  manejados por el servidor MySQL desde su inicio o el último FLUSH STATUS.</p><blockquote><p>mtop [--host={mysql_host}] [--dbuser={mysql_user}]<br
/> [--password={mysqluser_pw}] [--seconds={refresh}] [--[no]idle]<br
/> [--filter-user={regex}] [--filter-host={regex}] [--filter-db={regex}]<br
/> [--filter-command={regex}] [--filter-state={regex}] [--filter-info={{regex}}]<br
/> [--fold-select-columns]<br
/> [--user={user}] [--manualrefresh] [--slow={seconds}] [--vs|veryslow={seconds}]<br
/> [--vvs|veryveryslow={seconds}]</p><p>mtop &#8211;help</p><p>mtop &#8211;version</p></blockquote><p><strong>Links</strong></p><ul><li><a
href="http://mtop.sourceforge.net/">http://mtop.sourceforge.net/</a></li><li><a
href="http://sourceforge.net/projects/mtop/files/">http://sourceforge.net/projects/mtop/files/</a></li><li><a
href="http://downloads.sourceforge.net/project/mtop/mtop/v0.6.6/mtop-0.6.6.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmtop%2Ffiles%2Fmtop%2Fv0.6.6%2F&amp;ts=1304411062&amp;use_mirror=ignum">http://downloads.sourceforge.net/project/mtop/mtop/v0.6.6/mtop-0.6.6.tar.gz</a></li><li><a
href="http://opensourceit.blogspot.com/2008/06/how-to-install-mtop-for-mysql-on-rhel.html">http://opensourceit.blogspot.com/2008/06/how-to-install-mtop-for-mysql-on-rhel.html</a></li><li><a
href="http://www.howtolounge.com/555/how-to-install-mtop-on-centos/">http://www.howtolounge.com/555/how-to-install-mtop-on-centos/</a></li></ul> ]]></content:encoded> <wfw:commentRss>http://www.rubenortiz.es/2011/05/03/centos-5-instalar-mtop/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Linux &#8211; Regenerar RAID con mdadm</title><link>http://www.rubenortiz.es/2011/04/20/linux-regenerar-raid-con-mdadm/</link> <comments>http://www.rubenortiz.es/2011/04/20/linux-regenerar-raid-con-mdadm/#comments</comments> <pubDate>Wed, 20 Apr 2011 13:35:10 +0000</pubDate> <dc:creator>Rubén Ortiz</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[raid]]></category> <guid
isPermaLink="false">http://www.rubenortiz.es/?p=4369</guid> <description><![CDATA[Recibimos alerta de mdadm.conf, alertando de un fallo en el RAID Comprobamos estado del RAID por software 1&#60;strong&#62;# cat /proc/mdstat&#60;/strong&#62; 12md0 : active raid6 sda2[0] sdc2[2] sdd2[3] sde2[4] sdf2[5] 3839951872 blocks level 6, 256k chunk, algorithm 2 [6/5] [U_UUUU] El problema, como se ve, está en el volúmen md0. Hacemos consulta sobre ese volúmen más [...]]]></description> <content:encoded><![CDATA[<p>Recibimos alerta de mdadm.conf, alertando de un fallo en el RAID</p><p>Comprobamos estado del RAID por software</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;# cat /proc/mdstat&lt;/strong&gt;</div></td></tr></tbody></table></div><p><span
id="more-4369"></span></p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">md0 : active raid6 sda2[0] sdc2[2] sdd2[3] sde2[4] sdf2[5]<br
/> 3839951872 blocks level 6, 256k chunk, algorithm 2 [6/5] [U_UUUU]</div></td></tr></tbody></table></div><p>El problema, como se ve, está en el volúmen md0. Hacemos consulta sobre ese volúmen más a fondo</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;# mdadm --query --detail /dev/md0&lt;/strong&gt;</div></td></tr></tbody></table></div><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/>6<br
/>7<br
/>8<br
/>9<br
/>10<br
/>11<br
/>12<br
/>13<br
/>14<br
/>15<br
/>16<br
/>17<br
/>18<br
/>19<br
/>20<br
/>21<br
/>22<br
/>23<br
/>24<br
/>25<br
/>26<br
/>27<br
/>28<br
/>29<br
/>30<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/dev/md0:<br
/> &nbsp; &nbsp; &nbsp; &nbsp; Version : 0.90<br
/> &nbsp; Creation Time : Fri Nov 28 03:38:53 2008<br
/> &nbsp; &nbsp; &nbsp;Raid Level : raid6<br
/> &nbsp; &nbsp; &nbsp;Array Size : 3839951872 (3662.06 GiB 3932.11 GB)<br
/> &nbsp; Used Dev Size : 959987968 (915.52 GiB 983.03 GB)<br
/> &nbsp; &nbsp;Raid Devices : 6<br
/> &nbsp; Total Devices : 5<br
/> Preferred Minor : 0<br
/> &nbsp; &nbsp; Persistence : Superblock is persistent<br
/> <br
/> &nbsp; &nbsp; Update Time : Wed Apr 20 14:38:41 2011<br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; State : active, degraded<br
/> &nbsp;Active Devices : 5<br
/> Working Devices : 5<br
/> &nbsp;Failed Devices : 0<br
/> &nbsp; Spare Devices : 0<br
/> <br
/> &nbsp; &nbsp; &nbsp;Chunk Size : 256K<br
/> <br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UUID : 1fc20881:3dfc0349:86238ebd:efce0154<br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Events : 0.6445927<br
/> <br
/> &nbsp; &nbsp; Number &nbsp; Major &nbsp; Minor &nbsp; RaidDevice State<br
/> &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; 8 &nbsp; &nbsp; &nbsp; &nbsp;2 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp;active sync &nbsp; /dev/sda2<br
/> &lt;strong&gt; &nbsp; &nbsp; &nbsp; 1 &nbsp; &nbsp; &nbsp; 0 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; &nbsp;removed&lt;/strong&gt;<br
/> &nbsp; &nbsp; &nbsp; &nbsp;2 &nbsp; &nbsp; &nbsp; 8 &nbsp; &nbsp; &nbsp; 34 &nbsp; &nbsp; &nbsp; &nbsp;2 &nbsp; &nbsp; &nbsp;active sync &nbsp; /dev/sdc2<br
/> &nbsp; &nbsp; &nbsp; &nbsp;3 &nbsp; &nbsp; &nbsp; 8 &nbsp; &nbsp; &nbsp; 50 &nbsp; &nbsp; &nbsp; &nbsp;3 &nbsp; &nbsp; &nbsp;active sync &nbsp; /dev/sdd2<br
/> &nbsp; &nbsp; &nbsp; &nbsp;4 &nbsp; &nbsp; &nbsp; 8 &nbsp; &nbsp; &nbsp; 66 &nbsp; &nbsp; &nbsp; &nbsp;4 &nbsp; &nbsp; &nbsp;active sync &nbsp; /dev/sde2<br
/> &nbsp; &nbsp; &nbsp; &nbsp;5 &nbsp; &nbsp; &nbsp; 8 &nbsp; &nbsp; &nbsp; 82 &nbsp; &nbsp; &nbsp; &nbsp;5 &nbsp; &nbsp; &nbsp;active sync &nbsp; /dev/sdf2</div></td></tr></tbody></table></div><p>Podemos apreciar que /dev/sdb2 es el que está afectando al conjunto del RAID en el volúmen md0, de level Raid 6.</p><p>Comprobamos estado del disco duro /dev/sdb</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/>6<br
/>7<br
/>8<br
/>9<br
/>10<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;# sfdisk -l /dev/sdb&lt;/strong&gt;<br
/> <br
/> Disk /dev/sdb: 121601 cylinders, 255 heads, 63 sectors/track<br
/> Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0<br
/> <br
/> &nbsp; &nbsp;Device Boot Start &nbsp; &nbsp; End &nbsp; #cyls &nbsp; &nbsp;#blocks &nbsp; Id &nbsp;System<br
/> /dev/sdb1 &nbsp; * &nbsp; &nbsp; &nbsp;0+ &nbsp; 2087 &nbsp; &nbsp;2088- &nbsp;16771828+ &nbsp;82 &nbsp;Linux swap / Solaris<br
/> /dev/sdb2 &nbsp; &nbsp; &nbsp; 2088 &nbsp;121600 &nbsp;119513 &nbsp;959988172+ &nbsp;fd &nbsp;Linux raid autodetect<br
/> /dev/sdb3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp;0 &nbsp;Empty<br
/> /dev/sdb4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp;0 &nbsp;Empty</div></td></tr></tbody></table></div><p>Reañadimos la partición sdb2 al conjunto del RAID y comprobamos que se regenera el mirroring</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;# mdadm -a /dev/md0 /dev/sdb2&lt;/strong&gt;<br
/> mdadm: re-added /dev/sdb2</div></td></tr></tbody></table></div><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;# cat /proc/mdstat&lt;/strong&gt;<br
/> Personalities : [raid1] [raid6] [raid5] [raid4]<br
/> md0 : active raid6 sdb2[6] sda2[0] sdc2[2] sdd2[3] sde2[4] sdf2[5]<br
/> &nbsp; &nbsp; &nbsp; 3839951872 blocks level 6, 256k chunk, algorithm 2 [6/5] [U_UUUU]<br
/> &nbsp; &nbsp; &nbsp; [&gt;....................] &nbsp;recovery = &nbsp;0.5% (5185648/959987968) finish=426.8min speed=37279K/sec</div></td></tr></tbody></table></div><p>En este caso, tendremos que vigilar si el RAID se regenerá correctamente porque en caso contrario, será necesaria un reemplazo del disco físico.</p><p><strong>Links</strong><br
/> <a
href="http://systemadmin.es/2011/02/anadir-o-quitar-discos-en-fallo-de-un-raid-por-software">http://systemadmin.es/2011/02/anadir-o-quitar-discos-en-fallo-de-un-raid-por-software</a><br
/> <a
href="http://david.toribio.eu/2010/01/03/sustituir-un-disco-en-un-entorno-raid-linux/">http://david.toribio.eu/2010/01/03/sustituir-un-disco-en-un-entorno-raid-linux/</a></p> ]]></content:encoded> <wfw:commentRss>http://www.rubenortiz.es/2011/04/20/linux-regenerar-raid-con-mdadm/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Linux &#8211; límitar/aumentar velocidad resync en RAID</title><link>http://www.rubenortiz.es/2011/04/20/linux-limitar-aumentar-velocidad-resync-en-raid/</link> <comments>http://www.rubenortiz.es/2011/04/20/linux-limitar-aumentar-velocidad-resync-en-raid/#comments</comments> <pubDate>Wed, 20 Apr 2011 12:04:32 +0000</pubDate> <dc:creator>Rubén Ortiz</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[raid]]></category> <guid
isPermaLink="false">http://www.rubenortiz.es/?p=4361</guid> <description><![CDATA[En el caso de que tengamos que regenerar un raid por software, puede que esto nos afecte el rendimiento del servidor en producción, evidentemente a nivel de I/O. Podemos aumentar/limitar la velocidad con que el raid regenará la partición RAID, mediante 2 archivos que el kernel los tomará como valores a usar en el caso [...]]]></description> <content:encoded><![CDATA[<p>En el caso de que tengamos que regenerar un raid por software, puede que esto nos afecte el rendimiento del servidor en producción, evidentemente a nivel de I/O. Podemos aumentar/limitar la velocidad con que el raid regenará la partición RAID, mediante 2 archivos que el kernel los tomará como valores a usar en el caso de regeneración de RAID<br
/> <span
id="more-4361"></span><br
/> <strong>1. Vemos que partición se está regenerando</strong></p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;# cat /proc/mdstat&lt;/strong&gt;<br
/> Personalities : [raid1] [raid0] [raid10]<br
/> md2 : active raid0 sdf1[2] sde1[1] sdd1[0]<br
/> 30723840 blocks 256k chunks</div></td></tr></tbody></table></div><p>md0 : active raid10 sdf2[5] sdc2[2] sdb2[1] sda2[0]<br
/> 848159232 blocks 256K chunks 2 near-copies [6/4] [UUU__U]<br
/> [&gt;....................]  resync =  3.3% (28312384/848159232) finish=9125.4min speed=1497K/sec</p><p><strong>2. Limitamos la velocidad de regeneración de RAID</strong></p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;# cd &nbsp;/proc/sys/dev/raid<br
/> # cat speed_limit_max&lt;/strong&gt;<br
/> 500000<br
/> &lt;strong&gt;# vim /proc/sys/dev/raid/speed_limit_max&lt;/strong&gt;</div></td></tr></tbody></table></div><p>Los resultados son instántaneos</p><p><strong>Links</strong></p><ul><li><a
href="http://www.ducea.com/2006/06/25/increase-the-speed-of-linux-software-raid-reconstruction/">http://www.ducea.com/2006/06/25/increase-the-speed-of-linux-software-raid-reconstruction/</a></li><li><a
href="http://www.cyberciti.biz/tips/tag/procsysdevraidspeed_limit_max">http://www.cyberciti.biz/tips/tag/procsysdevraidspeed_limit_max</a></li></ul> ]]></content:encoded> <wfw:commentRss>http://www.rubenortiz.es/2011/04/20/linux-limitar-aumentar-velocidad-resync-en-raid/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>CentOS 5 &#8211; Instalar Nginx desde código fuente</title><link>http://www.rubenortiz.es/2011/04/18/centos-5-instalar-nginx-desde-codigo-fuente/</link> <comments>http://www.rubenortiz.es/2011/04/18/centos-5-instalar-nginx-desde-codigo-fuente/#comments</comments> <pubDate>Mon, 18 Apr 2011 10:57:06 +0000</pubDate> <dc:creator>Rubén Ortiz</dc:creator> <category><![CDATA[Centos]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[centos]]></category> <category><![CDATA[nginx]]></category> <guid
isPermaLink="false">http://www.rubenortiz.es/?p=4348</guid> <description><![CDATA[Vamos a ver como compilar e instalar Nginx (&#8220;engine x&#8221;) desde fuente en CentOS 5. Compilación e Instalación 1234567&#60;strong&#62;# yum install pcre pcre-devel openssl openssl-devel # cd /usr/local/src/ # wget http://nginx.org/download/nginx-1.0.0.tar.gz # tar xf nginx-1.0.0.tar.gz # cd nginx-1.0.0 # ./configure --prefix=/usr/local/nginx --without-http_autoindex_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --conf-path=/usr/local/nginx/etc/nginx.conf --with-http_stub_status_module # make &#38;&#38; make install&#60;/strong&#62; en este punto, [...]]]></description> <content:encoded><![CDATA[<p>Vamos a ver como compilar e instalar <a
href="http://nginx.org/">Nginx </a>(&#8220;engine x&#8221;) desde fuente en CentOS 5.<br
/> <span
id="more-4348"></span><br
/> <strong>Compilación e Instalación</strong></p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/>6<br
/>7<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;# yum install pcre pcre-devel openssl openssl-devel<br
/> # cd /usr/local/src/<br
/> # wget http://nginx.org/download/nginx-1.0.0.tar.gz<br
/> # tar xf nginx-1.0.0.tar.gz<br
/> # cd nginx-1.0.0<br
/> # ./configure --prefix=/usr/local/nginx --without-http_autoindex_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --conf-path=/usr/local/nginx/etc/nginx.conf --with-http_stub_status_module<br
/> # make &amp;&amp; make install&lt;/strong&gt;</div></td></tr></tbody></table></div><p>en este punto, tenemos instalado Nginx en el path /usr/local/nginx/ y su archivo de configuración está localizado en /usr/local/nginx/etc/nginx.conf.</p><p>Probaremos primero si Nginx funciona correctamente</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/>6<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;<br
/> # /usr/local/nginx/sbin/nginx<br
/> # ps axuf |grep nginx&lt;/strong&gt;<br
/> root &nbsp; &nbsp; 22291 &nbsp;0.0 &nbsp;0.1 &nbsp; 7204 &nbsp; 812 pts/0 &nbsp; &nbsp;S+ &nbsp; 12:27 &nbsp; 0:00 &nbsp; &nbsp; &nbsp;\_ grep nginx<br
/> root &nbsp; &nbsp; 21778 &nbsp;0.0 &nbsp;0.0 &nbsp;18600 &nbsp; 692 ? &nbsp; &nbsp; &nbsp; &nbsp;Ss &nbsp; 12:26 &nbsp; 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br
/> nobody &nbsp; 21779 &nbsp;0.0 &nbsp;0.1 &nbsp;18996 &nbsp;1424 ? &nbsp; &nbsp; &nbsp; &nbsp;S &nbsp; &nbsp;12:26 &nbsp; 0:00 &nbsp;\_ nginx: worker process</div></td></tr></tbody></table></div><p>Sólo queda que naveguemos por la ip para ver si vemos el mensaje de bienvenida</p><p><strong>Welcome to nginx!</strong></p><p>Seguidamente, sería útil tener en nuestro PATH la ruta de Nginx.</p><p><strong></p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># echo 'export PATH=$PATH:/usr/local/nginx/sbin/' &gt;&gt; /etc/profile.d/nginx.sh<br
/> # chmod a+x /etc/profile.d/nginx.sh<br
/> # export PATH=$PATH:/usr/local/nginx/sbin/</div></td></tr></tbody></table></div><p></strong></p><p>Un comando útil de nginx es el que nos comprueba si el archivo de configuración es correcto</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;# nginx -t&lt;/strong&gt;<br
/> nginx: the configuration file /usr/local/nginx/etc/nginx.conf syntax is ok<br
/> nginx: configuration file /usr/local/nginx/etc/nginx.conf test is successful</div></td></tr></tbody></table></div><p>Vamos a configurar brevemente Nginx con algunas opciones, este último paso, será diferente según sea el hardware donde correrá Nginx. Respecto al usuario, cambiaremos el usuario de nobody a nginx</p><p># useradd nginx<br
/> # mkdir -p /var/log/nginx<br
/> # touch /var/log/nginx/error.log<br
/> # mkdir -p  /usr/local/nginx/etc/vhosts<br
/> # cp /usr/local/nginx/etc/nginx.conf /usr/local/nginx/etc/nginx.conf.bak<br
/> # vim /usr/local/nginx/etc/nginx.conf</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/>6<br
/>7<br
/>8<br
/>9<br
/>10<br
/>11<br
/>12<br
/>13<br
/>14<br
/>15<br
/>16<br
/>17<br
/>18<br
/>19<br
/>20<br
/>21<br
/>22<br
/>23<br
/>24<br
/>25<br
/>26<br
/>27<br
/>28<br
/>29<br
/>30<br
/>31<br
/>32<br
/>33<br
/>34<br
/>35<br
/>36<br
/>37<br
/>38<br
/>39<br
/>40<br
/>41<br
/>42<br
/>43<br
/>44<br
/>45<br
/>46<br
/>47<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">user &nbsp;nginx;<br
/> worker_processes &nbsp;8;<br
/> worker_rlimit_nofile 32768;<br
/> error_log &nbsp; /var/log/nginx/error.log;<br
/> events {<br
/> &nbsp; &nbsp; worker_connections &nbsp;4096;<br
/> &nbsp; &nbsp; use epoll;<br
/> }<br
/> http {<br
/> &nbsp; &nbsp; include &nbsp; &nbsp; &nbsp; mime.types;<br
/> &nbsp; &nbsp; default_type &nbsp;application/octet-stream;<br
/> &nbsp; &nbsp; sendfile &nbsp; &nbsp; &nbsp; &nbsp;on;<br
/> &nbsp; &nbsp; tcp_nopush &nbsp; &nbsp; on;<br
/> &nbsp; &nbsp; server_tokens off;<br
/> &nbsp; &nbsp; keepalive_timeout &nbsp;5;<br
/> &nbsp; &nbsp; gzip &nbsp;on;<br
/> &nbsp; &nbsp; gzip_min_length 1100;<br
/> &nbsp; &nbsp; gzip_buffers 64 8k;<br
/> &nbsp; &nbsp; gzip_comp_level 3;<br
/> &nbsp; &nbsp; gzip_http_version 1.1;<br
/> &nbsp; &nbsp; gzip_proxied any;<br
/> &nbsp; &nbsp; gzip_types text/plain application/xml application/x-javascript text/css;<br
/> &nbsp; &nbsp; server {<br
/> &nbsp; &nbsp; &nbsp; &nbsp; listen &nbsp; &nbsp; &nbsp; 80;<br
/> &nbsp; &nbsp; &nbsp; &nbsp; server_name &nbsp;localhost;<br
/> &nbsp; &nbsp; &nbsp; &nbsp; #charset koi8-r;<br
/> &nbsp; &nbsp; &nbsp; &nbsp; #access_log &nbsp;logs/host.access.log &nbsp;main;<br
/> &nbsp; &nbsp; &nbsp; &nbsp; location / {<br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; root &nbsp; html;<br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; index &nbsp;index.html index.htm;<br
/> &nbsp; &nbsp; &nbsp; &nbsp; }<br
/> &nbsp; &nbsp; &nbsp; &nbsp; #error_page &nbsp;404 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/404.html;<br
/> &nbsp; &nbsp; &nbsp; &nbsp; # redirect server error pages to the static page /50x.html<br
/> &nbsp; &nbsp; &nbsp; &nbsp; #<br
/> &nbsp; &nbsp; &nbsp; &nbsp; error_page &nbsp; 500 502 503 504 &nbsp;/50x.html;<br
/> &nbsp; &nbsp; &nbsp; &nbsp; location = /50x.html {<br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; root &nbsp; html;<br
/> &nbsp; &nbsp; &nbsp; &nbsp; }<br
/> &nbsp; &nbsp; &nbsp; &nbsp; # deny access to .htaccess files, if Apache's document root<br
/> &nbsp; &nbsp; &nbsp; &nbsp; # concurs with nginx's one<br
/> &nbsp; &nbsp; &nbsp; &nbsp; #<br
/> &nbsp; &nbsp; &nbsp; &nbsp; #location ~ /\.ht {<br
/> &nbsp; &nbsp; &nbsp; &nbsp; # &nbsp; &nbsp;deny &nbsp;all;<br
/> &nbsp; &nbsp; &nbsp; &nbsp; #}<br
/> &nbsp; &nbsp; }<br
/> &nbsp; &nbsp; include &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /usr/local/nginx/etc/vhosts/*.conf;<br
/> }</div></td></tr></tbody></table></div><p>Comprobamos configuración y ordenamos a Nginx que recargue la misma (sin reiniciar)</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;# nginx -t<br
/> # nginx -s reload&lt;/strong&gt;</div></td></tr></tbody></table></div><p><strong>Creamos script de daemon de Nginx</strong></p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/>6<br
/>7<br
/>8<br
/>9<br
/>10<br
/>11<br
/>12<br
/>13<br
/>14<br
/>15<br
/>16<br
/>17<br
/>18<br
/>19<br
/>20<br
/>21<br
/>22<br
/>23<br
/>24<br
/>25<br
/>26<br
/>27<br
/>28<br
/>29<br
/>30<br
/>31<br
/>32<br
/>33<br
/>34<br
/>35<br
/>36<br
/>37<br
/>38<br
/>39<br
/>40<br
/>41<br
/>42<br
/>43<br
/>44<br
/>45<br
/>46<br
/>47<br
/>48<br
/>49<br
/>50<br
/>51<br
/>52<br
/>53<br
/>54<br
/>55<br
/>56<br
/>57<br
/>58<br
/>59<br
/>60<br
/>61<br
/>62<br
/>63<br
/>64<br
/>65<br
/>66<br
/>67<br
/>68<br
/>69<br
/>70<br
/>71<br
/>72<br
/>73<br
/>74<br
/>75<br
/>76<br
/>77<br
/>78<br
/>79<br
/>80<br
/>81<br
/>82<br
/>83<br
/>84<br
/>85<br
/>86<br
/>87<br
/>88<br
/>89<br
/>90<br
/>91<br
/>92<br
/>93<br
/>94<br
/>95<br
/>96<br
/>97<br
/>98<br
/>99<br
/>100<br
/>101<br
/>102<br
/>103<br
/>104<br
/>105<br
/>106<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#!/bin/sh<br
/> #<br
/> # nginx - this script starts and stops the nginx daemin<br
/> #<br
/> # chkconfig: &nbsp; - 85 15<br
/> # description: &nbsp;Nginx is an HTTP(S) server, HTTP(S) reverse \<br
/> # &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy and IMAP/POP3 proxy server<br
/> # processname: nginx<br
/> # config: &nbsp; &nbsp; &nbsp;/usr/local/nginx/conf/nginx.conf<br
/> # pidfile: &nbsp; &nbsp; /usr/local/nginx/logs/nginx.pid<br
/> <br
/> # Source function library.<br
/> . /etc/rc.d/init.d/functions<br
/> <br
/> # Source networking configuration.<br
/> . /etc/sysconfig/network<br
/> <br
/> # Check that networking is up.<br
/> [ &quot;$NETWORKING&quot; = &quot;no&quot; ] &amp;&amp; exit 0<br
/> <br
/> nginx=&quot;/usr/local/nginx/sbin/nginx&quot;<br
/> prog=$(basename $nginx)<br
/> <br
/> NGINX_CONF_FILE=&quot;/usr/local/nginx/etc/nginx.conf&quot;<br
/> <br
/> lockfile=/var/lock/subsys/nginx<br
/> <br
/> start() {<br
/> &nbsp; &nbsp; [ -x $nginx ] || exit 5<br
/> &nbsp; &nbsp; [ -f $NGINX_CONF_FILE ] || exit 6<br
/> &nbsp; &nbsp; echo -n $&quot;Starting $prog: &quot;<br
/> &nbsp; &nbsp; daemon $nginx -c $NGINX_CONF_FILE<br
/> &nbsp; &nbsp; retval=$?<br
/> &nbsp; &nbsp; echo<br
/> &nbsp; &nbsp; [ $retval -eq 0 ] &amp;&amp; touch $lockfile<br
/> &nbsp; &nbsp; return $retval<br
/> }<br
/> <br
/> stop() {<br
/> &nbsp; &nbsp; echo -n $&quot;Stopping $prog: &quot;<br
/> &nbsp; &nbsp; killproc $prog -QUIT<br
/> &nbsp; &nbsp; retval=$?<br
/> &nbsp; &nbsp; echo<br
/> &nbsp; &nbsp; [ $retval -eq 0 ] &amp;&amp; rm -f $lockfile<br
/> &nbsp; &nbsp; return $retval<br
/> }<br
/> <br
/> restart() {<br
/> &nbsp; &nbsp; configtest || return $?<br
/> &nbsp; &nbsp; stop<br
/> &nbsp; &nbsp; start<br
/> }<br
/> <br
/> reload() {<br
/> &nbsp; &nbsp; configtest || return $?<br
/> &nbsp; &nbsp; echo -n $&quot;Reloading $prog: &quot;<br
/> &nbsp; &nbsp; killproc $nginx -HUP<br
/> &nbsp; &nbsp; RETVAL=$?<br
/> &nbsp; &nbsp; echo<br
/> }<br
/> <br
/> force_reload() {<br
/> &nbsp; &nbsp; restart<br
/> }<br
/> <br
/> configtest() {<br
/> &nbsp; $nginx -t -c $NGINX_CONF_FILE<br
/> }<br
/> <br
/> rh_status() {<br
/> &nbsp; &nbsp; status $prog<br
/> }<br
/> <br
/> rh_status_q() {<br
/> &nbsp; &nbsp; rh_status &gt;/dev/null 2&gt;&amp;1<br
/> }<br
/> <br
/> case &quot;$1&quot; in<br
/> &nbsp; &nbsp; start)<br
/> &nbsp; &nbsp; &nbsp; &nbsp; rh_status_q &amp;&amp; exit 0<br
/> &nbsp; &nbsp; &nbsp; &nbsp; $1<br
/> &nbsp; &nbsp; &nbsp; &nbsp; ;;<br
/> &nbsp; &nbsp; stop)<br
/> &nbsp; &nbsp; &nbsp; &nbsp; rh_status_q || exit 0<br
/> &nbsp; &nbsp; &nbsp; &nbsp; $1<br
/> &nbsp; &nbsp; &nbsp; &nbsp; ;;<br
/> &nbsp; &nbsp; restart|configtest)<br
/> &nbsp; &nbsp; &nbsp; &nbsp; $1<br
/> &nbsp; &nbsp; &nbsp; &nbsp; ;;<br
/> &nbsp; &nbsp; reload)<br
/> &nbsp; &nbsp; &nbsp; &nbsp; rh_status_q || exit 7<br
/> &nbsp; &nbsp; &nbsp; &nbsp; $1<br
/> &nbsp; &nbsp; &nbsp; &nbsp; ;;<br
/> &nbsp; &nbsp; force-reload)<br
/> &nbsp; &nbsp; &nbsp; &nbsp; force_reload<br
/> &nbsp; &nbsp; &nbsp; &nbsp; ;;<br
/> &nbsp; &nbsp; status)<br
/> &nbsp; &nbsp; &nbsp; &nbsp; rh_status<br
/> &nbsp; &nbsp; &nbsp; &nbsp; ;;<br
/> &nbsp; &nbsp; condrestart|try-restart)<br
/> &nbsp; &nbsp; &nbsp; &nbsp; rh_status_q || exit 0<br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;;<br
/> &nbsp; &nbsp; *)<br
/> &nbsp; &nbsp; &nbsp; &nbsp; echo $&quot;Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}&quot;<br
/> &nbsp; &nbsp; &nbsp; &nbsp; exit 2<br
/> esac</div></td></tr></tbody></table></div><p>Probamos el script</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;<br
/> # /etc/init.d/nginx start<br
/> # /etc/init.d/nginx stop<br
/> # /etc/init.d/nginx restart<br
/> # /etc/init.d/nginx reload&lt;/strong&gt;</div></td></tr></tbody></table></div><p>Dejamos Nginx en el arranque del sistema</p><div
class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/></div></td><td><div
class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;# /sbin/chkconfig nginx on&lt;/strong&gt;</div></td></tr></tbody></table></div><p>Enjoy! <img
src='http://www.rubenortiz.es/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p><strong>Links</strong><br
/> <a
href="http://www.superstaradmin.co.uk/2010/12/compiling-nginx-on-centos/">http://www.superstaradmin.co.uk/2010/12/compiling-nginx-on-centos/</a><br
/> <a
href="http://articles.slicehost.com/2009/2/2/centos-adding-an-nginx-init-script">http://articles.slicehost.com/2009/2/2/centos-adding-an-nginx-init-script</a><br
/> <a
href="http://articles.slicehost.com/2009/2/2/centos-installing-nginx-from-source">http://articles.slicehost.com/2009/2/2/centos-installing-nginx-from-source</a><br
/> <a
href="http://systemadmin.es/2011/02/instalar-nginx-con-php-5-3-mediante-php-fpm-y-eaccelerator">http://systemadmin.es/2011/02/instalar-nginx-con-php-5-3-mediante-php-fpm-y-eaccelerator</a></p> ]]></content:encoded> <wfw:commentRss>http://www.rubenortiz.es/2011/04/18/centos-5-instalar-nginx-desde-codigo-fuente/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
<!-- Dynamic Page Served (once) in 1.480 seconds -->

