Sistemas https://www.keopx.net/categoria/sistemas 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 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 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 https://www.keopx.net/blog/redimensionar-imagenes-de-forma-automatica-un-tamano-definido#comments 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 https://www.keopx.net/blog/controlar-el-disco-duro-con-smartmontools-en-debiabubuntu#comments Instalacion de php 5.2.x en Debian Testing (squeeze) https://www.keopx.net/blog/instalacion-de-php-52x-en-debian-testing-squeeze <span class="field field--name-title field--type-string field--label-hidden">Instalacion de php 5.2.x en Debian Testing (squeeze)</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Para poder funcionar correctamente con Drupal 6.x es necesario el tener una versión anterior a la existente en el repositorio. En este caso es necesario la instalación de la versión de 5.2.x de php. Para ello es necesario desactualizar o eliminar todos los paquetes de php que tengamos. Creamos el siguiente script.</p> <pre lang="bash" line="1" xml:lang="bash"> sudo nano quitar_php.sh</pre><!--break--><pre lang="bash" line="1" xml:lang="bash"> php_installed=`dpkg -l | grep php| awk '{print $2}' |tr "\n" " "` echo $php_installed sudo apt-get purge $php_installed</pre><p>Y ejecutamos.</p> <pre lang="bash" line="1" xml:lang="bash"> sudo sh quitar_php.sh</pre><p>Ahora procedemos a configurar las preferencias y repositorios para desacargar la nueva versión. <strong>/etc/apt/preferences.d/php</strong></p> <pre lang="bash" line="1" xml:lang="bash"> sudo nano /etc/apt/preferences.d/php</pre><p>Y pegamos:</p> <pre lang="bash" line="1" xml:lang="bash"> Package: php5 Pin: release a=lenny Pin-Priority: 991 Package: php5-exactimage Pin: release a=lenny Pin-Priority: 991 Package: php5-ffmpeg Pin: release a=lenny Pin-Priority: 991 Package: php5-gpib Pin: release a=lenny Pin-Priority: 991 Package: php5-lasso Pin: release a=lenny Pin-Priority: 991 Package: php5-mapscript Pin: release a=lenny Pin-Priority: 991 Package: php5-ming Pin: release a=lenny Pin-Priority: 991 Package: php5-uuid Pin: release a=lenny Pin-Priority: 991 Package: php5-adodb Pin: release a=lenny Pin-Priority: 991 Package: php5-auth-pam Pin: release a=lenny Pin-Priority: 991 Package: php5-clamav Pin: release a=lenny Pin-Priority: 991 Package: php5-geoip Pin: release a=lenny Pin-Priority: 991 Package: php5-idn Pin: release a=lenny Pin-Priority: 991 Package: php5-memcache Pin: release a=lenny Pin-Priority: 991 Package: php5-memcached Pin: release a=lenny Pin-Priority: 991 Package: php5-ps Pin: release a=lenny Pin-Priority: 991 Package: php5-radius Pin: release a=lenny Pin-Priority: 991 Package: php5-sasl Pin: release a=lenny Pin-Priority: 991 Package: php5-suhosin Pin: release a=lenny Pin-Priority: 991 Package: php5-svn Pin: release a=lenny Pin-Priority: 991 Package: php5-cgi Pin: release a=lenny Pin-Priority: 991 Package: php5-cli Pin: release a=lenny Pin-Priority: 991 Package: php5-curl Pin: release a=lenny Pin-Priority: 991 Package: php5-dbg Pin: release a=lenny Pin-Priority: 991 Package: php5-dev Pin: release a=lenny Pin-Priority: 991 Package: php5-enchant Pin: release a=lenny Pin-Priority: 991 Package: php5-gd Pin: release a=lenny Pin-Priority: 991 Package: php5-gmp Pin: release a=lenny Pin-Priority: 991 Package: php5-imap Pin: release a=lenny Pin-Priority: 991 Package: php5-interbase Pin: release a=lenny Pin-Priority: 991 Package: php5-intl Pin: release a=lenny Pin-Priority: 991 Package: php5-ldap Pin: release a=lenny Pin-Priority: 991 Package: php5-mcrypt Pin: release a=lenny Pin-Priority: 991 Package: php5-odbc Pin: release a=lenny Pin-Priority: 991 Package: php5-pgsql Pin: release a=lenny Pin-Priority: 991 Package: php5-pspell Pin: release a=lenny Pin-Priority: 991 Package: php5-recode Pin: release a=lenny Pin-Priority: 991 Package: php5-snmp Pin: release a=lenny Pin-Priority: 991 Package: php5-sqlite Pin: release a=lenny Pin-Priority: 991 Package: php5-sybase Pin: release a=lenny Pin-Priority: 991 Package: php5-tidy Pin: release a=lenny Pin-Priority: 991 Package: php5-xmlrpc Pin: release a=lenny Pin-Priority: 991 Package: php5-xsl Pin: release a=lenny Pin-Priority: 991 Package: php5-librdf Pin: release a=lenny Pin-Priority: 991 Package: php5-remctl Pin: release a=lenny Pin-Priority: 991 Package: php5-symfony1.0 Pin: release a=lenny Pin-Priority: 991 Package: php5-xapian Pin: release a=lenny Pin-Priority: 991 Package: php5-xcache Pin: release a=lenny Pin-Priority: 991 Package: php5-xdebug Pin: release a=lenny Pin-Priority: 991 Package: php5-common Pin: release a=lenny Pin-Priority: 991 Package: php5-mysql Pin: release a=lenny Pin-Priority: 991 Package: libapache2-mod-php5 Pin: release a=lenny Pin-Priority: 991 Package: libapache2-mod-php5filter Pin: release a=lenny Pin-Priority: 991 Package: php-pear Pin: release a=lenny Pin-Priority: 991</pre><p><strong>/etc/apt/sources.list</strong></p> <pre lang="bash" line="1" xml:lang="bash"> $ sudo nano /etc/apt/sources.list</pre><pre lang="bash" line="1" xml:lang="bash"> # deb cdrom:[Debian GNU/Linux testing _testing_ - Official Snapshot i386 CD Binary-1 20100416-11:48]/ testing main #deb cdrom:[Debian GNU/Linux testing _testing_ - Official Snapshot i386 CD Binary-1 20100416-11:48]/ testing main deb http://ftp.de.debian.org/debian/ testing main non-free contrib deb-src http://ftp.de.debian.org/debian/ testing main non-free contrib deb http://security.debian.org/ testing/updates main contrib non-free deb-src http://security.debian.org/ testing/updates main contrib non-free ### Chromium deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main ### Opera deb http://deb.opera.com/opera testing non-free ### VirtualBox deb http://download.virtualbox.org/virtualbox/debian lenny non-free ### Multimedia deb http://www.debian-multimedia.org stable main contrib non-free #deb http://www.debian-multimedia.org testing main contrib non-free</pre><p><strong>/etc/apt/sources.list.d/lenny.list</strong></p> <pre lang="bash" line="1" xml:lang="bash"> $ sudo nano /etc/apt/sources.list.d/lenny.list</pre><pre lang="bash" line="1" xml:lang="bash"> deb http://ftp.de.debian.org/debian/ lenny main non-free contrib deb-src http://ftp.de.debian.org/debian/ lenny main non-free contrib</pre><p><strong>/etc/apt/apt.conf</strong></p> <pre lang="bash" line="1" xml:lang="bash"> $ sudo nano /etc/apt/apt.conf</pre><pre lang="bash" line="1" xml:lang="bash"> APT::Default-Release "testing"; APT::Cache-Limit 100000000; Apt::Get::Purge; APT::Clean-Installed; APT::Get::Fix-Broken; APT::Get::Fix-Missing; APT::Get::Show-Upgraded "true"; </pre><p>Ahora actualizamos e instalamos los paquetes.</p> <pre lang="bash" line="1" xml:lang="bash"> $ sudo aptitude update</pre><pre lang="bash" line="1" xml:lang="bash"> $ sudo aptitude install -t lenny php5</pre><p>En este caso solo hemos instalado php5, pero podríamos instalar todos lo que necesitásemos. Nos mostrara un listado con las dependencias y deberemos ser cuidadosos a la hora de elegir que paquetes instalamos. Lo mismo sucederá cuando actualicemos el equipo.</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, 01/06/2010 - 15:17</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/php" hreflang="es">PHP</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/php" hreflang="es">php</a></div> <div class="field__item"><a href="/tag/sistemas" hreflang="es">Sistemas</a></div> <div class="field__item"><a href="/tag/php-53" hreflang="es">php 5.3</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=183&amp;2=field_comments&amp;3=comment" token="Gyam1J1DGHfJNpDFJFto-kWbSc3LSNuIucmZQA7tNbM"></drupal-render-placeholder> </section> Tue, 01 Jun 2010 13:17:26 +0000 keopx 183 at https://www.keopx.net