Sistemas https://www.keopx.net/ es Instalar certificados de Let's Encrypt - Free SSL/TLS Certificates en Debian / Ubuntu https://www.keopx.net/blog/instalar-certificados-de-lets-encrypt-free-ssltls-certificates-en-debian-ubuntu <span class="field field--name-title field--type-string field--label-hidden">Instalar certificados de Let&#039;s Encrypt - Free SSL/TLS Certificates en Debian / Ubuntu</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Activamos ssl para apache:</p> <pre> <code class="language-bash">a2enmod ssl</code></pre><p>Añadimos a nuestro site la configuración correcta:</p> <pre> <code class="language-apache">... &lt;VirtualHost *:443&gt; ServerAdmin keopx@keopx.net ServerName www.keopx.net DocumentRoot /var/www/keopx.net/docroot &lt;Directory /var/www/keopx.net/docroot/&gt; # Options FollowSymLinks Options SymLinksIfOwnerMatch AllowOverride All Require all granted &lt;/Directory&gt; ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined ServerSignature On SSLCertificateFile /etc/letsencrypt/live/www.keopx.net/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/www.keopx.net/privkey.pem Include /etc/letsencrypt/options-ssl-apache.conf &lt;/VirtualHost&gt; &lt;VirtualHost *:80&gt; ServerName keopx.net Redirect 301 / http://www.keopx.net/ &lt;/VirtualHost&gt; ....</code></pre><p>Procedemos a instalar <strong>letsencrypt:</strong></p> <pre> <code class="language-bash">cd /opt git clone https://github.com/certbot/certbot.git letsencrypt</code></pre><p>Configuramos <strong>letsencrypt</strong>:</p> <pre> <code class="language-bash">nano /etc/letsencrypt/keopx.ini</code></pre><pre> <code class="language-ini">authenticator = webroot webroot-path = /var/www/keopx.net/docroot renew-by-default agree-dev-preview agree-tos email = keopx@keopx.net</code></pre><p>Procedemos a crear el certificado (duran 3 meses):</p> <pre> <code class="language-bash">/opt/letsencrypt/certbot-auto --config /etc/letsencrypt/keopx.ini --user-agent letsencrypt-ubuntu-webroo -d www.keopx.net certonly</code></pre><p>Ahora es necesario reiniciar apache:</p> <pre> <code class="language-bash">service apache2 reload</code></pre><h2>Automatizar renovaciones automáticas:</h2> <p>crontab -e</p> <pre> <code class="language-bash">6 0 1 * * /opt/letsencrypt/certbot-auto --config /etc/letsencrypt/phpmyadmin.isarea.ini --user-agent letsencrypt-ubuntu-webroot -d phpmyadmin.isarea.com certonly &amp;&amp; service apache2 reload</code></pre><p> </p> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/keopx" typeof="schema:Person" property="schema:name" datatype="">keopx</span></span> <span class="field field--name-created field--type-created field--label-hidden">Vie, 09/12/2016 - 19:41</span> <div class="field field--name-field-tax-cat field--type-entity-reference field--label-above"> <div class="field__label">Categoria</div> <div class="field__items"> <div class="field__item"><a href="/categoria/letsencrypt" hreflang="es">letsencrypt</a></div> <div class="field__item"><a href="/categoria/sistemas" hreflang="es">Sistemas</a></div> <div class="field__item"><a href="/categoria/gnu-linux" hreflang="es">GNU Linux</a></div> <div class="field__item"><a href="/categoria/apache2" hreflang="es">Apache2</a></div> <div class="field__item"><a href="/categoria/debian" hreflang="es">Debian</a></div> <div class="field__item"><a href="/categoria/ubuntu" hreflang="es">Ubuntu</a></div> </div> </div> <div class="field field--name-field-tax-tag field--type-entity-reference field--label-above"> <div class="field__label">Tag</div> <div class="field__items"> <div class="field__item"><a href="/tag/ssl" hreflang="es">SSL</a></div> <div class="field__item"><a href="/tag/apache" hreflang="es">apache</a></div> <div class="field__item"><a href="/tag/sistemas" hreflang="es">Sistemas</a></div> <div class="field__item"><a href="/tag/gnu-linux" hreflang="es">GNU Linux</a></div> <div class="field__item"><a href="/tag/debian" hreflang="es">Debian</a></div> <div class="field__item"><a href="/tag/ubuntu" hreflang="es">Ubuntu</a></div> </div> </div> <section class="field field--name-field-comments field--type-comment field--label-above comment-wrapper"> <h2 class="title">Comentarios</h2> <article role="article" data-comment-user-id="0" id="comment-2406" about="/comment/2406" typeof="schema:Comment" class="comment js-comment by-anonymous clearfix"> <span class="hidden" data-comment-timestamp="1481529425"></span> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__author"><span rel="schema:author"><a rel="nofollow" href="http://front.id" lang="" typeof="schema:Person" property="schema:name" datatype="" class="username">Capy (no verificado)</a></span> </p> <p class="comment__time">Sáb, 10/12/2016 - 15:43 <span property="schema:dateCreated" content="2016-12-10T14:43:06+00:00" class="rdf-meta hidden"></span> </p> <p class="comment__permalink"><a href="/comment/2406#comment-2406" hreflang="es">Enlace permanente</a></p> </footer> <div class="comment__content"> <h3 property="schema:name" datatype=""><a href="/comment/2406#comment-2406" class="permalink" rel="bookmark" hreflang="es">Muy bueno</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>Gracias tenía agendado hacer esto en mi web y todavía no lo había buscado. A los favoritos!</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=2406&amp;1=default&amp;2=es&amp;3=" token="XKZRmaQE02eOBhDwVf2FSfXRCPk_vEfNYu7q-LsQSy4"></drupal-render-placeholder> </div> </article> <h2 class="title comment-form__title">Añadir nuevo comentario</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=268&amp;2=field_comments&amp;3=comment" token="ViRdZ4E193bGeokwU7Vx3JhRTMv5dcCOesVVnXH3wco"></drupal-render-placeholder> </section> Fri, 09 Dec 2016 18:41:34 +0000 keopx 268 at https://www.keopx.net Limpiar memoria cache en Linux sin reiniciar https://www.keopx.net/blog/limpiar-memoria-cache-en-linux-sin-reiniciar <span class="field field--name-title field--type-string field--label-hidden">Limpiar memoria cache en Linux sin reiniciar</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Cuando un sistema lleva mucho tiempo iniciado y este genera mucha carga suele estar bien limpiar la memoria cache para que no comience a "swapear".</p> <p>El comando en si es sencillo y no excesivamente intrusivo. Al comienzo ira un poco más lento pero a la larga se agradecerá.</p> <p><em>Es necesario ser root</em></p> <pre> <code># sync; echo 3 &gt; /proc/sys/vm/drop_caches</code> </pre><p>Podemos crear un script para que lo realice automáticamente:</p> <pre> <code>$ sudo su</code></pre><pre> <code># nano /root/limpiar_cache.sh</code></pre><pre> <code class="language-bash">#!/bin/sh sync; echo 3 &gt; /proc/sys/vm/drop_caches</code></pre><p>Ahora ponemos permisos de ejecución:</p> <pre><code>chmod +x /root/limpiar_cache.sh</code></pre><p>Ahora creamos una tarea para el se ejecute cada x tiempo:</p> <pre> <code>0 * * * * /root/limpiar_cache.sh</code> </pre><p>Con esto ya tenemos la limpieza automatizada.</p> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/keopx" typeof="schema:Person" property="schema:name" datatype="">keopx</span></span> <span class="field field--name-created field--type-created field--label-hidden">Sáb, 10/11/2012 - 20:38</span> <div class="field field--name-field-tax-cat field--type-entity-reference field--label-above"> <div class="field__label">Categoria</div> <div class="field__items"> <div class="field__item"><a href="/categoria/gnu-linux" hreflang="es">GNU Linux</a></div> <div class="field__item"><a href="/categoria/debian" hreflang="es">Debian</a></div> <div class="field__item"><a href="/categoria/ubuntu" hreflang="es">Ubuntu</a></div> <div class="field__item"><a href="/categoria/sistemas" hreflang="es">Sistemas</a></div> </div> </div> <div class="field field--name-field-tax-tag field--type-entity-reference field--label-above"> <div class="field__label">Tag</div> <div class="field__items"> <div class="field__item"><a href="/tag/sistemas" hreflang="es">Sistemas</a></div> <div class="field__item"><a href="/tag/gnu-linux" hreflang="es">GNU Linux</a></div> <div class="field__item"><a href="/tag/terminal" hreflang="es">Terminal</a></div> <div class="field__item"><a href="/tag/consola" hreflang="es">consola</a></div> <div class="field__item"><a href="/tag/cache" hreflang="es">cache</a></div> </div> </div> <section class="field field--name-field-comments field--type-comment field--label-above comment-wrapper"> <h2 class="title">Comentarios</h2> <article role="article" data-comment-user-id="0" id="comment-3090" about="/comment/3090" typeof="schema:Comment" class="comment js-comment by-anonymous clearfix"> <span class="hidden" data-comment-timestamp="1537770811"></span> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__author"><span rel="schema:author"><span lang="" typeof="schema:Person" property="schema:name" datatype="">carlos rojas (no verificado)</span></span> </p> <p class="comment__time">Dom, 23/09/2018 - 09:17 <span property="schema:dateCreated" content="2018-09-23T07:17:11+00:00" class="rdf-meta hidden"></span> </p> <p class="comment__permalink"><a href="/comment/3090#comment-3090" hreflang="es">Enlace permanente</a></p> </footer> <div class="comment__content"> <h3 property="schema:name" datatype=""><a href="/comment/3090#comment-3090" class="permalink" rel="bookmark" hreflang="es">buena información, si…</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>buena información, si funciona</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=3090&amp;1=default&amp;2=es&amp;3=" token="et0BUf_2372ZLL6LWPJDYUkXR_7ZT3JfcXaDUfOLRVk"></drupal-render-placeholder> </div> </article> <article role="article" data-comment-user-id="0" id="comment-3102" about="/comment/3102" typeof="schema:Comment" class="comment js-comment by-anonymous clearfix"> <span class="hidden" data-comment-timestamp="1570687448"></span> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__author"><span rel="schema:author"><a rel="nofollow" href="https://www.veikel.com" lang="" typeof="schema:Person" property="schema:name" datatype="" class="username">Diego (no verificado)</a></span> </p> <p class="comment__time">Jue, 29/08/2019 - 02:24 <span property="schema:dateCreated" content="2019-08-29T00:24:15+00:00" class="rdf-meta hidden"></span> </p> <p class="comment__permalink"><a href="/comment/3102#comment-3102" hreflang="es">Enlace permanente</a></p> </footer> <div class="comment__content"> <h3 property="schema:name" datatype=""><a href="/comment/3102#comment-3102" class="permalink" rel="bookmark" hreflang="es">Exelente documento</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>Muchas gracias, me sirvio, solo le agrego un chmod +x /root/limpiar_cache.sh</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=3102&amp;1=default&amp;2=es&amp;3=" token="K_Hz91YLrGCw_eFdoKpk4Bcyz6YBwBcISbB-TWuq8Pc"></drupal-render-placeholder> </div> </article> <div class="indented"><article role="article" data-comment-user-id="3" id="comment-3103" about="/comment/3103" typeof="schema:Comment" class="comment js-comment by-node-author clearfix"> <span class="hidden" data-comment-timestamp="1570687791"></span> <footer class="comment__meta"> <article typeof="schema:Person" about="/users/keopx" class="profile"> </article> <p class="comment__author"><span rel="schema:author"><span lang="" about="/users/keopx" typeof="schema:Person" property="schema:name" datatype="">keopx</span></span> </p> <p class="comment__time">Jue, 10/10/2019 - 08:09 <span property="schema:dateCreated" content="2019-10-10T06:09:51+00:00" class="rdf-meta hidden"></span> </p> <p class="comment__permalink"><a href="/comment/3103#comment-3103" hreflang="es">Enlace permanente</a></p> <p class="visually-hidden">En respuesta a <a href="/comment/3102#comment-3102" class="permalink" rel="bookmark" hreflang="es">Exelente documento</a> por <a rel="nofollow" href="https://www.veikel.com" lang="" typeof="schema:Person" property="schema:name" datatype="" class="username">Diego (no verificado)</a></p> </footer> <div class="comment__content"> <h3 property="schema:name" datatype=""><a href="/comment/3103#comment-3103" class="permalink" rel="bookmark" hreflang="es">Gracias Diego, añadido</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>Gracias Diego, añadido</p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=3103&amp;1=default&amp;2=es&amp;3=" token="IWoTG7Bomcm3uUzUdem6bm-F5qnSAgCSpy3AgSwgsng"></drupal-render-placeholder> </div> </article> </div> <h2 class="title comment-form__title">Añadir nuevo comentario</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=235&amp;2=field_comments&amp;3=comment" token="ktuwQOuIymAe_e9mWDggSNOSoIBqnz0uBEAaS0I_BJc"></drupal-render-placeholder> </section> Sat, 10 Nov 2012 19:38:16 +0000 keopx 235 at https://www.keopx.net X11 con root para ciertas tareas https://www.keopx.net/blog/x11-con-root-para-ciertas-tareas <span class="field field--name-title field--type-string field--label-hidden">X11 con root para ciertas tareas</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Hoy me he encontrado en una situación un tanto inusual. Necesitaba instalar una aplicación con permisos de root, para ello he intentado hacerlo mediante <em>sudo</em> y como <em>root</em> y me tiraba un fallo. La aplicación necesita de java para la instalarse de forma visual y al arrancar este me decía que no era posible. Para instalar una aplicación como root que tiraba de Java y que necesita las <em>X</em> no me dejaba, me daba un fallo al no poder ejecutar la instalación, el fallo me daba en java al intentar interactuar con las <em>X</em>. En mis sistemas procuro en la medida de lo posible evitar el uso de root y también para las X, pero este caso no quedaba más remedio. Para ello he tenido que seguir los siguientes pasos.</p> <pre lang="bash" line="1" xml:lang="bash"> keopx@localhost:~$ su - root@localhost:~# xauth merge ~keopx/.Xauthority root@localhost:~# export DISPLAY=:0.0 root@localhost:~# xterm # o cualquier programa Xwindows que desees ejecutar. root@localhost:~# ./setup</pre></div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/keopx" typeof="schema:Person" property="schema:name" datatype="">keopx</span></span> <span class="field field--name-created field--type-created field--label-hidden">Lun, 27/12/2010 - 17:28</span> <div class="field field--name-field-tax-cat field--type-entity-reference field--label-above"> <div class="field__label">Categoria</div> <div class="field__items"> <div class="field__item"><a href="/categoria/sistemas" hreflang="es">Sistemas</a></div> <div class="field__item"><a href="/categoria/gnu-linux" hreflang="es">GNU Linux</a></div> </div> </div> <div class="field field--name-field-tax-tag field--type-entity-reference field--label-above"> <div class="field__label">Tag</div> <div class="field__items"> <div class="field__item"><a href="/tag/gnu-linux" hreflang="es">GNU Linux</a></div> <div class="field__item"><a href="/tag/sistemas" hreflang="es">Sistemas</a></div> <div class="field__item"><a href="/tag/consola" hreflang="es">consola</a></div> <div class="field__item"><a href="/tag/terminal" hreflang="es">Terminal</a></div> </div> </div> <section class="field field--name-field-comments field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Añadir nuevo comentario</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=207&amp;2=field_comments&amp;3=comment" token="5khDBy-ckIvAUEKX6XfZl3QHmd4sUn2jSB81wcCxHYo"></drupal-render-placeholder> </section> Mon, 27 Dec 2010 16:28:36 +0000 keopx 207 at https://www.keopx.net Eliminar las claves obsoletas de APT https://www.keopx.net/blog/eliminar-las-claves-obsoletas-de-apt <span class="field field--name-title field--type-string field--label-hidden">Eliminar las claves obsoletas de APT</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Si trabajamos con repositorios diferentes a los que el sistema nos proporciona, suele ser necesario añadir nuevos repositorios e importar sus respectivas claves. Puede que dicho repositorio cambie las claves, o simplemente estemos interesados en eliminar las que tenemos o que nos de un error del tipo: <strong>The following signatures were invalid: BADSIG</strong> </p> <!--break--><p> Entonces podemos seguir los siguientes pasos:</p> <pre lang="bash" line="1" xml:lang="bash"> $ sudo -s -H # aptitude clean # rm /var/lib/apt/lists/* # rm /var/lib/apt/lists/partial/* # aptitude clean # aptitude update</pre></div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/keopx" typeof="schema:Person" property="schema:name" datatype="">keopx</span></span> <span class="field field--name-created field--type-created field--label-hidden">Sáb, 25/12/2010 - 13:12</span> <div class="field field--name-field-tax-cat field--type-entity-reference field--label-above"> <div class="field__label">Categoria</div> <div class="field__items"> <div class="field__item"><a href="/categoria/gnu-linux" hreflang="es">GNU Linux</a></div> <div class="field__item"><a href="/categoria/sistemas" hreflang="es">Sistemas</a></div> </div> </div> <div class="field field--name-field-tax-tag field--type-entity-reference field--label-above"> <div class="field__label">Tag</div> <div class="field__items"> <div class="field__item"><a href="/tag/sistemas" hreflang="es">Sistemas</a></div> <div class="field__item"><a href="/tag/gnu-linux" hreflang="es">GNU Linux</a></div> <div class="field__item"><a href="/tag/consola" hreflang="es">consola</a></div> <div class="field__item"><a href="/tag/terminal" hreflang="es">Terminal</a></div> </div> </div> <section class="field field--name-field-comments field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Añadir nuevo comentario</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=205&amp;2=field_comments&amp;3=comment" token="pBkp91ZUL-dcgxx-9TFwUXddX3nTNhjPrUDTZ4pxei8"></drupal-render-placeholder> </section> Sat, 25 Dec 2010 12:12:07 +0000 keopx 205 at https://www.keopx.net Control de acceso para root por SSH en Debian https://www.keopx.net/blog/control-de-acceso-para-root-por-ssh-en-debian <span class="field field--name-title field--type-string field--label-hidden">Control de acceso para root por SSH en Debian </span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>En el post anterior comentábamos la necesidad de <strong>permitir el acceso root vía SSH</strong>, pero considero esto muy seguro de cara a los intentos de acceso remoto. Para ello vamos vamos habilitar el control por ip para el acceso root SSH. Lo primero es editar el siguiente fichero <em>/etc/pam.d/sshd</em></p> <pre lang="bash" line="1" xml:lang="bash"> $ sudo nano /etc/pam.d/sshd</pre><p>Buscamos y descomentamos la siguiente linea: </p> <!--break--> <pre lang="bash" line="1" xml:lang="bash"> account required pam_access.so</pre><p>Una vez echo esto procedemos a realizar el control de ip en el siguiente fichero <em>/etc/security/access.conf</em></p> <pre lang="bash" line="1" xml:lang="bash"> $ sudo nano /etc/security/access.conf</pre><p>Y añadimos:</p> <pre lang="bash" line="1" xml:lang="bash"> #Denied ALL EXCEPT - : root : ALL EXCEPT 10.10.24.101</pre><p>Con esto prohibimos el acceso desde todos los puntos como root a excepción de la ip 10.10.24.101. Si se revisa el documento que editamos existen múltiples configuraciones que se adaptan perfectamente a casi cualquier necesidad.</p> <h2>Referencias</h2> <ul> <li><a href="http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/sag-pam_access.html">http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/sag-pam_access.html</a></li> <li><a href="http://www.keopx.net/gnulinux/administrar-un-servidor-kvm-de-forma-remota-en-debian-squeeze/">http://www.keopx.net/gnulinux/administrar-un-servidor-kvm-de-forma-remota-en-debian-squeeze/</a></li> </ul> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/keopx" typeof="schema:Person" property="schema:name" datatype="">keopx</span></span> <span class="field field--name-created field--type-created field--label-hidden">Mar, 16/11/2010 - 18:11</span> <div class="field field--name-field-tax-cat field--type-entity-reference field--label-above"> <div class="field__label">Categoria</div> <div class="field__items"> <div class="field__item"><a href="/categoria/sistemas" hreflang="es">Sistemas</a></div> <div class="field__item"><a href="/categoria/gnu-linux" hreflang="es">GNU Linux</a></div> </div> </div> <div class="field field--name-field-tax-tag field--type-entity-reference field--label-above"> <div class="field__label">Tag</div> <div class="field__items"> <div class="field__item"><a href="/tag/ssh" hreflang="es">ssh</a></div> <div class="field__item"><a href="/tag/sistemas" hreflang="es">Sistemas</a></div> <div class="field__item"><a href="/tag/gnu-linux" hreflang="es">GNU Linux</a></div> </div> </div> <section class="field field--name-field-comments field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Añadir nuevo comentario</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=202&amp;2=field_comments&amp;3=comment" token="LwfyNSpem-F7vgAqkTc1qePM9hGs_mg_U6FCHZOGC48"></drupal-render-placeholder> </section> Tue, 16 Nov 2010 17:11:05 +0000 keopx 202 at https://www.keopx.net Añadir usuario al grupo de administración de impresora en Debian Squeeze (testing) https://www.keopx.net/blog/anadir-usuario-al-grupo-de-administracion-de-impresora-en-debian-squeeze-testing <span class="field field--name-title field--type-string field--label-hidden">Añadir usuario al grupo de administración de impresora en Debian Squeeze (testing)</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Para administrar las impresoras desde la web de CUPS, <a href="http://localhost:631">http://localhost:631</a> es necesario el añadir el usuario al grupo de administración de impresoras, siempre y cuando el usuario ya exista.</p> <pre lang="bash" line="1" xml:lang="bash"> sudo usermod -a -G lpadmin keopx</pre></div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/keopx" typeof="schema:Person" property="schema:name" datatype="">keopx</span></span> <span class="field field--name-created field--type-created field--label-hidden">Vie, 17/09/2010 - 09:54</span> <div class="field field--name-field-tax-cat field--type-entity-reference field--label-above"> <div class="field__label">Categoria</div> <div class="field__items"> <div class="field__item"><a href="/categoria/debian" hreflang="es">Debian</a></div> <div class="field__item"><a href="/categoria/sistemas" hreflang="es">Sistemas</a></div> <div class="field__item"><a href="/categoria/ubuntu" hreflang="es">Ubuntu</a></div> </div> </div> <div class="field field--name-field-tax-tag field--type-entity-reference field--label-above"> <div class="field__label">Tag</div> <div class="field__items"> <div class="field__item"><a href="/tag/debian" hreflang="es">Debian</a></div> <div class="field__item"><a href="/tag/sistemas" hreflang="es">Sistemas</a></div> <div class="field__item"><a href="/tag/ubuntu" hreflang="es">Ubuntu</a></div> </div> </div> <section class="field field--name-field-comments field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Añadir nuevo comentario</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=194&amp;2=field_comments&amp;3=comment" token="5EQxVjZgOSAS5DEI7td-HAwujynd2AzBoLjPj5cTZOs"></drupal-render-placeholder> </section> Fri, 17 Sep 2010 07:54:47 +0000 keopx 194 at https://www.keopx.net Convertir videos flv a ogg o mp3 en Debian/Ubuntu https://www.keopx.net/blog/convertir-videos-flv-ogg-o-mp3-en-debianubuntu <span class="field field--name-title field--type-string field--label-hidden">Convertir videos flv a ogg o mp3 en Debian/Ubuntu</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Lo primero que tenemos que realizar es posiblemente la descarga del vídeo. Para ello existe un plugin muy interesante para firefox/iceweasel que facilita dicha descarga, <em>download helper</em>: <a href="https://addons.mozilla.org/es-ES/firefox/addon/3006/">https://addons.mozilla.org/es-ES/firefox/addon/3006/</a> Instalar ffmpeg:</p> <pre lang="bash" line="1" xml:lang="bash"> sudo apt-get install ffmpeg</pre><p>Ahora pasamos a la compresión a ogg:</p> <pre lang="bash" line="1" xml:lang="bash"> ffmpeg -i video_descargado.flv -vn -ar 44100 -ac 2 -ab 160k -f ogg nombre.ogg</pre><p>Compresión en mp3:</p> <pre lang="bash" line="1" xml:lang="bash"> ffmpeg -i video_descargado.flv -vn -ar 44100 -ac 2 -ab 160k -f mp3 nombre.mp3</pre><p>Para cambiar las preferencias, mirar el man ffmpeg.</p> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/keopx" typeof="schema:Person" property="schema:name" datatype="">keopx</span></span> <span class="field field--name-created field--type-created field--label-hidden">Vie, 03/09/2010 - 09:05</span> <div class="field field--name-field-tax-cat field--type-entity-reference field--label-above"> <div class="field__label">Categoria</div> <div class="field__items"> <div class="field__item"><a href="/categoria/sistemas" hreflang="es">Sistemas</a></div> <div class="field__item"><a href="/categoria/gnu-linux" hreflang="es">GNU Linux</a></div> <div class="field__item"><a href="/categoria/debian" hreflang="es">Debian</a></div> <div class="field__item"><a href="/categoria/ubuntu" hreflang="es">Ubuntu</a></div> </div> </div> <div class="field field--name-field-tax-tag field--type-entity-reference field--label-above"> <div class="field__label">Tag</div> <div class="field__items"> <div class="field__item"><a href="/tag/video" hreflang="es">Video</a></div> <div class="field__item"><a href="/tag/sistemas" hreflang="es">Sistemas</a></div> <div class="field__item"><a href="/tag/gnu-linux" hreflang="es">GNU Linux</a></div> <div class="field__item"><a href="/tag/consola" hreflang="es">consola</a></div> <div class="field__item"><a href="/tag/terminal" hreflang="es">Terminal</a></div> </div> </div> <section class="field field--name-field-comments field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Añadir nuevo comentario</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=193&amp;2=field_comments&amp;3=comment" token="M53g2sKctriktsdrzAE_fHwUK1yER2jrEohaJoD6G_Q"></drupal-render-placeholder> </section> Fri, 03 Sep 2010 07:05:40 +0000 keopx 193 at https://www.keopx.net https://www.keopx.net/blog/convertir-videos-flv-ogg-o-mp3-en-debianubuntu#comments Redimensionar imagenes de forma automatica a un tamaño definido https://www.keopx.net/blog/redimensionar-imagenes-de-forma-automatica-un-tamano-definido <span class="field field--name-title field--type-string field--label-hidden">Redimensionar imagenes de forma automatica a un tamaño definido</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Script para redimensionar imágenes de forma automática.</p> <pre lang="bash" line="1" xml:lang="bash"> #! /bin/sh # ------------------------------------------------------------------------- # GNU GENERAL PUBLIC LICENSE # Version 3, 29 June 2007 # # Copyright (C) 2007 Free Software Foundation, Inc. # Everyone is permitted to copy and distribute verbatim copies # of this license document, but changing it is not allowed. # ------------------------------------------------------------------------- # Datos fijos TAMAINAMAX=1024 TAMAINAX=1024x TAMAINAY=x1024 NOW=$(date +"%Y-%m-%d") # Formato yyyy-mm-dd CARPETA="/var/www/imagenes" # Carpeta de imagenes BAK="/backups_aiaraldea/${NOW}" # Primero las copias de seguridad cp -r $CARPETA $BAK # Cambiamos al tamaño máximo definido, en este caso 1024px cd $KARPETA # JPG for img in `ls *.jpg` do # Obtener anchura y altura: TAMAINA_ZABALERA=`identify -format "%w" $img` TAMAINA_ALTUERA=`identify -format "%h" $img` # Compara que es mayor si altula o la achura if [ $TAMAINA_ALTUERA -gt $TAMAINA_ZABALERA ]; then # Altura if [ $TAMAINA_ALTUERA -gt $TAMAINAMAX ]; then convert -resize $TAMAINAY $img $img fi else # Anchura if [ $TAMAINA_ZABALERA -gt $TAMAINAMAX ]; then convert -resize $TAMAINAX $img $img fi fi done </pre></div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/keopx" typeof="schema:Person" property="schema:name" datatype="">keopx</span></span> <span class="field field--name-created field--type-created field--label-hidden">Mié, 30/06/2010 - 16:21</span> <div class="field field--name-field-tax-cat field--type-entity-reference field--label-above"> <div class="field__label">Categoria</div> <div class="field__items"> <div class="field__item"><a href="/categoria/gnu-linux" hreflang="es">GNU Linux</a></div> <div class="field__item"><a href="/categoria/sistemas" hreflang="es">Sistemas</a></div> </div> </div> <div class="field field--name-field-tax-tag field--type-entity-reference field--label-above"> <div class="field__label">Tag</div> <div class="field__items"> <div class="field__item"><a href="/tag/bash" hreflang="es">bash</a></div> <div class="field__item"><a href="/tag/sistemas" hreflang="es">Sistemas</a></div> <div class="field__item"><a href="/tag/consola" hreflang="es">consola</a></div> </div> </div> <section class="field field--name-field-comments field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Añadir nuevo comentario</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=188&amp;2=field_comments&amp;3=comment" token="A3JPE0EH0GiTJXPOWFgs9KRAO13wAwErZ2-yUYPjXkA"></drupal-render-placeholder> </section> Wed, 30 Jun 2010 14:21:59 +0000 keopx 188 at https://www.keopx.net Redimensionar imagenes en Debian/Ubuntu https://www.keopx.net/blog/redimensionar-imagenes-en-debianubuntu <span class="field field--name-title field--type-string field--label-hidden">Redimensionar imagenes en Debian/Ubuntu</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Lo primero es necesario el instalar el programa para tratar las imagenes:</p> <pre lang="bash" line="1" xml:lang="bash"> sudo apt-get install imagemagick</pre><p>Redimensionar en base a la altura:</p> <pre lang="bash" line="1" xml:lang="bash"> convert foto1.jpg -resize 400x resultado.jpg</pre><p>Redimensionar en base a la anchura:</p> <pre lang="bash" line="1" xml:lang="bash"> convert foto1.jpg -resize x300 resultado.jpg</pre><p>Para más opciones consultar el man de imagemagick.</p> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/keopx" typeof="schema:Person" property="schema:name" datatype="">keopx</span></span> <span class="field field--name-created field--type-created field--label-hidden">Mar, 29/06/2010 - 16:29</span> <div class="field field--name-field-tax-cat field--type-entity-reference field--label-above"> <div class="field__label">Categoria</div> <div class="field__items"> <div class="field__item"><a href="/categoria/ubuntu" hreflang="es">Ubuntu</a></div> <div class="field__item"><a href="/categoria/debian" hreflang="es">Debian</a></div> <div class="field__item"><a href="/categoria/sistemas" hreflang="es">Sistemas</a></div> <div class="field__item"><a href="/categoria/gnu-linux" hreflang="es">GNU Linux</a></div> </div> </div> <div class="field field--name-field-tax-tag field--type-entity-reference field--label-above"> <div class="field__label">Tag</div> <div class="field__items"> <div class="field__item"><a href="/tag/gnu-linux" hreflang="es">GNU Linux</a></div> <div class="field__item"><a href="/tag/debian" hreflang="es">Debian</a></div> <div class="field__item"><a href="/tag/ubuntu" hreflang="es">Ubuntu</a></div> <div class="field__item"><a href="/tag/sistemas" hreflang="es">Sistemas</a></div> </div> </div> <section class="field field--name-field-comments field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Añadir nuevo comentario</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=187&amp;2=field_comments&amp;3=comment" token="2Ehw6JFSSBDZy29OB_YrlIlpw43Ok9ntwe6iWqQk5Rs"></drupal-render-placeholder> </section> Tue, 29 Jun 2010 14:29:58 +0000 keopx 187 at https://www.keopx.net https://www.keopx.net/blog/redimensionar-imagenes-en-debianubuntu#comments Controlar el disco duro con smartmontools en Debiab/Ubuntu https://www.keopx.net/blog/controlar-el-disco-duro-con-smartmontools-en-debiabubuntu <span class="field field--name-title field--type-string field--label-hidden">Controlar el disco duro con smartmontools en Debiab/Ubuntu</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item quickedit-field" data-quickedit-field-id="node/185/body/es/full"> <p>Si se detecta un posible fallo en el disco duro (HD) que nos pudiera dar más fallos tenemos la posibilidad de saber del estado del HD para cambiarlo antes de que se nos termine de "morir".</p> <p>Para ello es necesario instalar smartmontools:</p> <pre> <code class="language-bash">sudo aptitude install smartmontools</code></pre><p>Activamos la monitorización de discos:</p> <pre> <code class="language-bash">sudo smartctl -s on /dev/sda</code></pre><p><em>Deberás cambiar </em><strong>sda</strong><em> por el nombre de tu dispositivo.</em></p> <p>Controlar el estado de salud actual:</p> <pre> <code class="language-bash">smartctl -H /dev/sda</code></pre><p>Para obtener toda la información del disco:</p> <pre> <code class="language-bash">smartctl -a /dev/sda</code></pre><p>Estado del disco:</p> <pre> <code class="language-bash">smartctl -l selftest /dev/sda</code></pre><p>Referencia:</p> <ul> <li><a href="http://www.esdebian.org/articulos/24191/smartmontools-controlemos-nuestro-hd">http://www.esdebian.org/articulos/24191/smartmontools-controlemos-nuestro-hd</a></li> </ul> </div> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/keopx" typeof="schema:Person" property="schema:name" datatype="">keopx</span></span> <span class="field field--name-created field--type-created field--label-hidden">Dom, 27/06/2010 - 15:55</span> <div class="field field--name-field-tax-cat field--type-entity-reference field--label-above"> <div class="field__label">Categoria</div> <div class="field__items"> <div class="field__item"><a href="/categoria/gnu-linux" hreflang="es">GNU Linux</a></div> <div class="field__item"><a href="/categoria/sistemas" hreflang="es">Sistemas</a></div> </div> </div> <div class="field field--name-field-tax-tag field--type-entity-reference field--label-above"> <div class="field__label">Tag</div> <div class="field__items"> <div class="field__item"><a href="/tag/bash" hreflang="es">bash</a></div> <div class="field__item"><a href="/tag/consola" hreflang="es">consola</a></div> </div> </div> <section class="field field--name-field-comments field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Añadir nuevo comentario</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=185&amp;2=field_comments&amp;3=comment" token="8BL2DWF7t4CnH9BS_z3Bv8Ig1hdiV9EpM6CaSH4bz4Y"></drupal-render-placeholder> </section> Sun, 27 Jun 2010 13:55:32 +0000 keopx 185 at https://www.keopx.net