php https://www.keopx.net/ es Cómo instalar y configurar Redis en Drupal 8 https://www.keopx.net/blog/como-instalar-y-configurar-redis-en-drupal-8 <span>Cómo instalar y configurar Redis en Drupal 8</span> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Voy a explicar cómo <strong>instalar y configurar Redis en Drupal 8.</strong> </p> <p>Redis es una base de datos popular basado en key-value.</p> <p>En el caso de <a href="https://www.drupal.org">Drupal</a> se usa como sistema de cache para la parte (backend) de gestión de contenidos, donde el sistema de cachea "estático" de las paginas no es suficiente.</p> <p>Con Redis notaremos rápidamente la fluidez y rapidez con la que se puede gestionar toda la parte que requiere de usuarios autenticados.</p> <ol><li>Instalar <em>Redis</em>:<br /><pre> <code class="language-bash">sudo apt-get install redis-server</code></pre><p>También puedes ver <a href="https://github.com/keopx/docker-redis/blob/master/3.2/Dockerfile">Dockerfile</a></p> </li> <li>Instalar soporte de <em>Redis</em> para PHP:<br /><pre> <code class="language-bash">sudo apt-get install php7.0-redis sudo a2enmod php7.0-redis</code></pre><p>También puedes ver <a href="https://github.com/keopx/docker-apache-php/blob/master/7.0/Dockerfile">Dockerfile</a></p> </li> <li>Instalar el modulo <em>redis</em> de <em>Drupal</em>:<br /><pre> <code class="language-bash">composer require drupal/redis</code></pre><p>o</p> <pre> <code class="language-bash">drush dl redis</code></pre></li> <li> <p>Configurar <strong>redis</strong> para <strong>Drupal</strong>:</p> </li> </ol><p>En el <strong>settings.php</strong> o mejor en el drush añadir lo siguiente:</p> <pre> <code class="language-php">&lt;?php /** * Set redis configuration. */ /** @see: https://docs.platform.sh/frameworks/drupal8/redis.html */ if (extension_loaded('redis')) { // Set Redis as the default backend for any cache bin not otherwise specified. // $settings['cache']['default'] = 'cache.backend.redis'; $settings['redis.connection']['interface'] = 'PhpRedis'; // Can be "Predis". $settings['redis.connection']['host'] = 'redis'; $settings['redis.connection']['port'] = '6379'; // $settings['redis.connection']['password'] = "mypassword"; // If you are using passwords, otherwise, omit // Apply changes to the container configuration to better leverage Redis. // This includes using Redis for the lock and flood control systems, as well // as the cache tag checksum. Alternatively, copy the contents of that file // to your project-specific services.yml file, modify as appropriate, and // remove this line. $settings['container_yamls'][] = 'modules/contrib/redis/example.services.yml'; // Allow the services to work before the Redis module itself is enabled. $settings['container_yamls'][] = 'modules/contrib/redis/redis.services.yml'; // Manually add the classloader path, this is required for the container cache bin definition below // and allows to use it without the redis module being enabled. $class_loader-&gt;addPsr4('Drupal\\redis\\', 'modules/contrib/redis/src'); // Use redis for container cache. // The container cache is used to load the container definition itself, and // thus any configuration stored in the container itself is not available // yet. These lines force the container cache to use Redis rather than the // default SQL cache. $settings['bootstrap_container_definition'] = [ 'parameters' =&gt; [], 'services' =&gt; [ 'redis.factory' =&gt; [ 'class' =&gt; 'Drupal\redis\ClientFactory', ], 'cache.backend.redis' =&gt; [ 'class' =&gt; 'Drupal\redis\Cache\CacheBackendFactory', 'arguments' =&gt; ['@redis.factory', '@cache_tags_provider.container', '@serialization.phpserialize'], ], 'cache.container' =&gt; [ 'class' =&gt; '\Drupal\redis\Cache\PhpRedis', 'factory' =&gt; ['@cache.backend.redis', 'get'], 'arguments' =&gt; ['container'], ], 'cache_tags_provider.container' =&gt; [ 'class' =&gt; 'Drupal\redis\Cache\RedisCacheTagsChecksum', 'arguments' =&gt; ['@redis.factory'], ], 'serialization.phpserialize' =&gt; [ 'class' =&gt; 'Drupal\Component\Serialization\PhpSerialize', ], ], ]; /** Optional prefix for cache entries */ $settings['cache_prefix'] = 'any-text-you-want'; /** @see: https://pantheon.io/docs/redis/ */ // Always set the fast backend for bootstrap, discover and config, otherwise // this gets lost when redis is enabled. $settings['cache']['bins']['bootstrap'] = 'cache.backend.chainedfast'; $settings['cache']['bins']['discovery'] = 'cache.backend.chainedfast'; $settings['cache']['bins']['config'] = 'cache.backend.chainedfast'; /** @see: https://github.com/md-systems/redis */ // Use for all bins otherwise specified. $settings['cache']['default'] = 'cache.backend.redis'; // Use this to only use it for specific cache bins. $settings['cache']['bins']['render'] = 'cache.backend.redis'; // Use for all queues unless otherwise specified for a specific queue. $settings['queue_default'] = 'queue.redis'; // Or if you want to use reliable queue implementation. $settings['queue_default'] = 'queue.redis_reliable'; // Use this to only use Redis for a specific queue (aggregator_feeds in this case). $settings['queue_service_aggregator_feeds'] = 'queue.redis'; // Or if you want to use reliable queue implementation. $settings['queue_service_aggregator_feeds'] = 'queue.redis_reliable'; } </code></pre><p>Ver <a href="https://gist.github.com/keopx/7d5fe4d7a890c792c43bb79cf56718e0">https://gist.github.com/keopx/7d5fe4d7a890c792c43bb79cf56718e0</a></p> <p>Una ves hecho esto ir a la pagina de estado (<em>/admin/reports/status</em>) para comprobar que todo esta bien.</p> <p><img alt="Drupal Redis Setup" data-entity-type="file" data-entity-uuid="54abaecf-03e5-4c6e-8bfe-f1e23743c011" src="/sites/default/files/inline-images/Drupal_redis.png" width="587" height="68" /></p> <p>NOTA: si veis que cualquier parametrización es mejor, por favor comentadlo. Gracias.</p> <p>Referencias:</p> <ul><li><a href="https://gist.github.com/keopx/7d5fe4d7a890c792c43bb79cf56718e0">https://gist.github.com/keopx/7d5fe4d7a890c792c43bb79cf56718e0</a></li> <li><a href="https://docs.platform.sh/frameworks/drupal8/redis.html">https://docs.platform.sh/frameworks/drupal8/redis.html</a></li> <li><a href="https://pantheon.io/docs/redis/">https://pantheon.io/docs/redis/</a></li> <li><a href="https://github.com/md-systems/redis">https://github.com/md-systems/redis</a></li> <li><a href="https://github.com/keopx/docker-lamp">https://github.com/keopx/docker-lamp</a></li> </ul><p> </p> <p> </p> </div> <span><span>keopx</span></span> <span><time datetime="2017-06-18T17:25:35+02:00" title="Domingo, Junio 18, 2017 - 17:25">Dom, 18/06/2017 - 17:25</time> </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/drupal-8x" hreflang="es">Drupal 8.x</a></div> <div class="field__item"><a href="/categoria/redis" hreflang="es">Redis</a></div> <div class="field__item"><a href="/categoria/drupal" hreflang="es">Drupal</a></div> <div class="field__item"><a href="/categoria/drupal-planeta" hreflang="es">Drupal Planeta</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/drupal" hreflang="es">Drupal</a></div> <div class="field__item"><a href="/tag/drupal-8x" hreflang="es">Drupal 8.x</a></div> <div class="field__item"><a href="/tag/redis" hreflang="es">Redis</a></div> <div class="field__item"><a href="/tag/php" hreflang="es">php</a></div> </div> </div> <section data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comentarios</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=269&amp;2=field_comments&amp;3=comment" token="qCV33nxDY_ejWnQ4sUSyDpnaLr7joysNjRbFgsrijWE"></drupal-render-placeholder> </div> </div> </section> Sun, 18 Jun 2017 15:25:35 +0000 keopx 269 at https://www.keopx.net https://www.keopx.net/blog/como-instalar-y-configurar-redis-en-drupal-8#comments Herramientas de trabajo para entorno LAMP https://www.keopx.net/talk/herramientas-de-trabajo-para-entorno-lamp <span>Herramientas de trabajo para entorno LAMP</span> <span><span>keopx</span></span> <span><time datetime="2015-05-15T09:39:05+02:00" title="Viernes, Mayo 15, 2015 - 09:39">Vie, 15/05/2015 - 09:39</time> </span> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-hidden field__item"><p><a href="https://es.slideshare.net/keopx/herramientas-de-trabajo-para-entorno-lamp">Herramientas de trabajo para entorno LAMP</a></p> <p>Hablaremos de:</p> <ul><li>Gestión de proyectos</li> <li>Herramientas de desarrollo (IDE)</li> <li>Entorno: LAMP</li> <li>DevOps</li> <li>Repositorio de código</li> <li>Despliegue</li> </ul><p>Objetivo conocer qué partes están involucradas en el desarrollo de software. Si, hablamos de LAMP también. Todo es parte del mismo entorno de trabajo. Importancia de conocer qué áreas están implicadas el desarrollo de software.</p> <p class="text-align-center"> <iframe allowfullscreen="" frameborder="0" height="485" marginheight="0" marginwidth="0" scrolling="no" src="//www.slideshare.net/slideshow/embed_code/key/jyCuPbNI2kEhYA" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" width="595"></iframe></p> <div class="text-align-center" style="margin-bottom:5px"><strong><a href="//www.slideshare.net/keopx/herramientas-de-trabajo-para-entorno-lamp" target="_blank" title="Herramientas de trabajo para entorno LAMP">Herramientas de trabajo para entorno LAMP</a> </strong> de <strong><a href="https://www.slideshare.net/keopx" target="_blank">Keopx </a></strong></div> </div> <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/lamp" hreflang="es">LAMP</a></div> <div class="field__item"><a href="/categoria/drupal" hreflang="es">Drupal</a></div> <div class="field__item"><a href="/categoria/drupal-planeta" hreflang="es">Drupal Planeta</a></div> <div class="field__item"><a href="/categoria/wordpress" hreflang="es">WordPress</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/drupal" hreflang="es">Drupal</a></div> <div class="field__item"><a href="/tag/wordpress" hreflang="es">WordPress</a></div> <div class="field__item"><a href="/tag/lamp" hreflang="es">LAMP</a></div> <div class="field__item"><a href="/tag/php" hreflang="es">php</a></div> </div> </div> Fri, 15 May 2015 07:39:05 +0000 keopx 281 at https://www.keopx.net Pasar variales a un drupal_get_form() https://www.keopx.net/blog/pasar-variales-un-drupalgetform <span>Pasar variales a un drupal_get_form()</span> <div class="text-content clearfix 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/243/body/es/full"> <p>Pasar variales a un drupal_get_form()</p> <pre> <code class="language-php">drupal_get_form('avisame_form', $vars); function avisame_form($form, &amp;$form_state = NULL) { $args = $form_state['build_info']['args'][0]);</code></pre><p>Referencias:</p> <ul><li><a href="http://drupal.stackexchange.com/questions/10986/passing-arguments-to-drupal-get-form">http://drupal.stackexchange.com/questions/10986/passing-arguments-to-dr…</a></li> <li><a href="https://api.drupal.org/api/drupal/includes%21form.inc/group/form_api/7">https://api.drupal.org/api/drupal/includes!form.inc/group/form_api/7</a></li> </ul></div> </div> <span><span>keopx</span></span> <span><time datetime="2013-12-19T13:10:21+01:00" title="Jueves, Diciembre 19, 2013 - 13:10">Jue, 19/12/2013 - 13:10</time> </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/drupal" hreflang="es">Drupal</a></div> <div class="field__item"><a href="/categoria/programacion" hreflang="es">Programación</a></div> <div class="field__item"><a href="/categoria/php" hreflang="es">PHP</a></div> <div class="field__item"><a href="/categoria/drupal-planeta" hreflang="es">Drupal Planeta</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/drupal" hreflang="es">Drupal</a></div> <div class="field__item"><a href="/tag/programacion" hreflang="es">Programación</a></div> <div class="field__item"><a href="/tag/php" hreflang="es">php</a></div> </div> </div> <section data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comentarios</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=243&amp;2=field_comments&amp;3=comment" token="iWa6mCPr2rP8OEwRz4gDAwK3ReYydRGFC9PrwzDHiPU"></drupal-render-placeholder> </div> </div> </section> Thu, 19 Dec 2013 12:10:21 +0000 keopx 243 at https://www.keopx.net Diferencias entre empty y isset en PHP https://www.keopx.net/blog/diferencias-entre-empty-y-isset-en-php <span>Diferencias entre empty y isset en PHP</span> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Me ha resultado interesante ver las diferencias entre ambos.</p> <p>Os dejo un enlace donde se explica perfectamente:<a href="https://gist.github.com/juampynr/6029872"> https://gist.github.com/juampynr/6029872</a></p> <p>Una tabla descriptiva:</p> <p style="text-align: center;"><img alt="" src="/sites/default/files/is_null-empty-unset.jpg" style="width: 408px; height: 460px;" /></p> <p>Gracias a <a href="http://about.me/juampy">Juampy</a> y <a href="https://www.linkedin.com/pub/rodrigo-alfaro/15/771/57">Rodrigo Alfaro</a></p> </div> <span><span>keopx</span></span> <span><time datetime="2013-12-01T20:10:33+01:00" title="Domingo, Diciembre 1, 2013 - 20:10">Dom, 01/12/2013 - 20:10</time> </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> </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/programacion" hreflang="es">Programación</a></div> </div> </div> <section data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comentarios</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=241&amp;2=field_comments&amp;3=comment" token="nYtMCP_eeTEZ_3TEbZsmiqJ2sG5eq8EOjntVTpo3RVc"></drupal-render-placeholder> </div> </div> </section> Sun, 01 Dec 2013 19:10:33 +0000 keopx 241 at https://www.keopx.net Ver fichero de base de datos MySQL y Oracle en PHP https://www.keopx.net/blog/ver-fichero-de-base-de-datos-mysql-y-oracle-en-php <span>Ver fichero de base de datos MySQL y Oracle en PHP</span> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Este es el ejemplo de HTML donde ira incluida la imagen:</p> <p>Esta es tu imagen:</p> <pre> <code class="language-bash">&lt;img src="imagenscript.php?imname=casa_verano" /&gt;</code></pre><p>Ejemplo de imagen la imagen de verano.</p> <p>Ahora necesitas el script de PHP - llamado imagenscript.php en el directorio de ejemplo:</p> <pre> <code class="language-php">&lt;?php mysql_connect("localhost","user","password"); mysql_select_db("database"); $imagen = stripslashes($_REQUEST[imname]); $rs = mysql_query("select * from libreria_img where filename=\"". addslashes($imagen).".jpg\""); $row = mysql_fetch_assoc($rs); $imagebytes = $row[imgdata]; header("Content-type: image/jpeg"); print $imagebytes; ?&gt;</code></pre><p>Referencia:</p> <ul><li><a href="http://www.wellho.net/mouth/937_Display-an-image-from-a-MySQL-database-in-a-web-page-via-PHP.html">http://www.wellho.net/mouth/937_Display-an-image-from-a-MySQL-database-in-a-web-page-via-PHP.html</a></li> </ul></div> <span><span>keopx</span></span> <span><time datetime="2010-11-14T09:47:37+01:00" title="Domingo, Noviembre 14, 2010 - 09:47">Dom, 14/11/2010 - 09:47</time> </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> </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/oracle" hreflang="es">Oracle</a></div> </div> </div> <section data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comentarios</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=200&amp;2=field_comments&amp;3=comment" token="W36o2PSuo6jEW-GHgkJ5tJgFfM7whxoPfhRFX28anW8"></drupal-render-placeholder> </div> </div> </section> Sun, 14 Nov 2010 08:47:37 +0000 keopx 200 at https://www.keopx.net https://www.keopx.net/blog/ver-fichero-de-base-de-datos-mysql-y-oracle-en-php#comments Configuración de PHP 5.3 y xdebug https://www.keopx.net/blog/configuracion-de-php-53-y-xdebug <span>Configuración de PHP 5.3 y xdebug</span> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Tras un tiempo utilizando ambas herramientas en php5.2 ahora a tocado actualizar a la versión 5.3 de php.</p> <p>Realizando depuración de código me encuentro en que no me muestra los mensajes que me mostraba con php 5.2, no me los muestra en php 5.3.</p> <p>No solo eso sino que ni siquiera me los muestra. Parece ser que la nueva versión esta optimizada para un entorno de producción.</p> <p>Para ello php 5.3 nos proporciona una serie de fichero php.ini para poder configurar el entorno de desarrollo y el de producción.</p> <p><strong>php 5.3 para desarrollo</strong> Buscar fichero <em>php.ini-development</em> </p> <!--break--> <pre> <code class="language-bash">$ locate php.ini-development /usr/share/doc/php5-common/examples/php.ini-development</code></pre><p>Y ahora copiamos el fichero de desarrollo, realizando antes una copia del original:</p> <pre> <code class="language-bash">$ cd /etc/php5/apache2 $ sudo mv php.ini php.ini_original $ sudo cp /usr/share/doc/php5-common/examples/php.ini-development php.ini-development</code></pre><p>Buscamos y copiamos el de producción</p> <pre> <code>$ locate php.ini-production /usr/share/php5/php.ini-production /usr/share/php5/php.ini-production.cli</code></pre><p>Copiamos el del producción:</p> <pre> <code class="language-bash">$ sudo cp /usr/share/php5/php.ini-production php.ini-production</code></pre><p>Ahora copiamos el que nos interese segun el entorno.</p> <p>Desarrollo:</p> <pre> <code class="language-bash">$ sudo mv php.ini-development php.ini</code></pre><p>Producción:</p> <pre> <code class="language-bash">$ sudo mv php.ini-production php.ini</code></pre><p>Ahora ya reiniciamos el apache y listo:</p> <pre lang="bash" line="1" xml:lang="bash"> sudo /etc/init.d/apache2 restart</pre><p><strong>Xdebug para php 5.3</strong></p> <pre> <code class="language-bash">$ sudo nano /etc/php5/apache2/conf.d/xdebug.ini</code></pre><p>Y añadimos:</p> <pre> <code class="language-ini">zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so xdebug.remote_enable=On xdebug.remote_host="localhost" xdebug.remote_port=9000 xdebug.remote_handler="dbgp"</code></pre><p>* nueva ruta <em>zend_extension=/usr/lib/php5/20090626+lfs/</em> Reiniciamos apache:</p> <pre> <code class="language-bash">sudo /etc/init.d/apache2 restart</code></pre><p>Relacionado:</p> <ul><li><a href="https://www.keopx.net/blog/netbeans-php-y-xdebug">https://www.keopx.net/blog/netbeans-php-y-xdebug</a></li> </ul><p>Referencias:</p> <ul><li><a href="http://wiki.php.net/rfc/newinis">http://wiki.php.net/rfc/newinis</a></li> </ul></div> <span><span>keopx</span></span> <span><time datetime="2010-10-17T15:43:33+02:00" title="Domingo, Octubre 17, 2010 - 15:43">Dom, 17/10/2010 - 15:43</time> </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> </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/xdebug" hreflang="es">Xdebug</a></div> <div class="field__item"><a href="/tag/netbeans" hreflang="es">Netbeans</a></div> <div class="field__item"><a href="/tag/php" hreflang="es">php</a></div> </div> </div> <section data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comentarios</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=196&amp;2=field_comments&amp;3=comment" token="6atBXafYmezHMGVvYhfGcrsaGyBRagKIti1idGP7_ss"></drupal-render-placeholder> </div> </div> </section> Sun, 17 Oct 2010 13:43:33 +0000 keopx 196 at https://www.keopx.net https://www.keopx.net/blog/configuracion-de-php-53-y-xdebug#comments PHP 5.2 en Ubuntu Lucid (Downgrade) https://www.keopx.net/blog/php-52-en-ubuntu-lucid-downgrade <span>PHP 5.2 en Ubuntu Lucid (Downgrade)</span> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Tras la actualización a Ubuntu 10.04, nos ha traído algún que otra incompatibilidad en el código php de algunas aplicaciones, algunas de ellas relacionadas con Drupal. Vamos a ver como tener una versión anterior de php.</p> <pre> <code class="language-bash">#!/bin/sh # Script to install PHP 5.2 from 9.10 on 10.04 # And pin it so it does not get updated PKGS=`dpkg -l | grep php | awk '{print $2}'` apt-get remove $PKGS sed s/lucid/karmic/g /etc/apt/sources.list | tee /etc/apt/sources.list.d/karmic.list mkdir -p /etc/apt/preferences.d/ for PACKAGE in $PKGS do echo "Package: $PACKAGE Pin: release a=karmic Pin-Priority: 991 " | tee -a /etc/apt/preferences.d/php done apt-get update apt-get install $PKGS</code></pre><p>Hora ya tendremos los repositorios de karmic para la el php que contiene la version 5.2 Referencias:</p> <ul><li><a href="http://2bits.com/drupal-planet/various-ways-running-php-52-ubuntu-1004-lucid-lynx.html">http://2bits.com/drupal-planet/various-ways-running-php-52-ubuntu-1004-lucid-lynx.html</a></li> <li><a href="http://civicactions.com/blog/2010/may/26/ubuntu_1004_and_drupal">http://civicactions.com/blog/2010/may/26/ubuntu_1004_and_drupal</a></li> <li><a href="http://randyfay.com/node/63">http://randyfay.com/node/63</a></li> <li><a href="http://mrkandy.wordpress.com/2010/04/16/install-php-5-2-x-in-ubuntu-10-04-lucid/">http://mrkandy.wordpress.com/2010/04/16/install-php-5-2-x-in-ubuntu-10-04-lucid/</a></li> </ul></div> <span><span>keopx</span></span> <span><time datetime="2010-07-02T17:54:05+02:00" title="Viernes, Julio 2, 2010 - 17:54">Vie, 02/07/2010 - 17:54</time> </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/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/php" hreflang="es">php</a></div> <div class="field__item"><a href="/tag/php-53" hreflang="es">php 5.3</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 data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comentarios</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=190&amp;2=field_comments&amp;3=comment" token="-RlDJZY-Ed1asPAuCt6me5QCDLHjHESA-4SIDMydOIM"></drupal-render-placeholder> </div> </div> </section> Fri, 02 Jul 2010 15:54:05 +0000 keopx 190 at https://www.keopx.net https://www.keopx.net/blog/php-52-en-ubuntu-lucid-downgrade#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>Instalacion de php 5.2.x en Debian Testing (squeeze)</span> <div class="text-content clearfix 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><span>keopx</span></span> <span><time datetime="2010-06-01T15:17:26+02:00" title="Martes, Junio 1, 2010 - 15:17">Mar, 01/06/2010 - 15:17</time> </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 data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comentarios</h2> <div class="add-comment"> <div class="add-comment__form"> <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> </div> </div> </section> Tue, 01 Jun 2010 13:17:26 +0000 keopx 183 at https://www.keopx.net https://www.keopx.net/blog/instalacion-de-php-52x-en-debian-testing-squeeze#comments Instalar APC y Memcache para Drupal https://www.keopx.net/blog/instalar-apc-y-memcache-para-drupal <span>Instalar APC y Memcache para Drupal</span> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-hidden field__item"><h1 id="APC">APC</h1> <p>Instalamos el paquete de apc para php5</p> <pre lang="bash" line="1" xml:lang="bash"> $ sudo aptitude install php-apc</pre><h1 id="Memcache">Memcache</h1> <h2 id="Servidor-de-memcache">Servidor de memcache</h2> <pre lang="bash" xml:lang="bash"> $ sudo aptitude install memcached</pre><h2 id="Memcache-para-php5">Memcache para php5</h2> <p>El modulo por defecto del php5-memcache de fallos y parece que según el CVS para la siguiente versión va estar corregido. </p> <!--break--><p> Es necesario el compilarlo a pelo:</p> <pre lang="bash" line="1" xml:lang="bash"> $ wget http://pecl.php.net/get/memcache-2.2.5.tgz $ tar -zxvf memcached-2.2.5.tgz $ cd memcached-2.2.5 $ phpize &amp;&amp; ./configure --enable-memcache &amp;&amp; make $ sudo cp memcache.so /usr/lib/php5/20060613+lfs/ $ cd /etc/php5/apache2/conf.d/ $ sudo su $ echo 'extension=memcache.so' &gt; /etc/php.d/memcached.ini $ /etc/init.d/apache2 restart</pre><p>Ahora ya configuramos los parámetros.</p> <div id="change-2311"> <div id="journal-2311-notes"> <h1 id="phpini">php.ini</h1> <pre lang="bash" line="1" xml:lang="bash"> $ sudo nano /etc/php5/apache2/php.ini</pre><p>Y añadimos:</p> <pre lang="bash" line="1" xml:lang="bash"> ; Memcache memcache.hash_strategy="consistent"</pre><h1 id="settingsphp">settings.php</h1> <p>Configuración del cache para nuestro sitio. Esta sacado de <a href="http://www.lullabot.com/">lullabot</a>.</p> <pre lang="php" line="1" xml:lang="php"> <!--?php $conf = array( // The path to wherever memcache.inc is. The easiest is to simply point it // to the copy in your module's directory. //'cache_inc' =--> './sites/all/modules/memcache/memcache.inc', // or 'cache_inc' =&gt; './sites/all/modules/memcache/memcache.db.inc', 'memcache_servers' =&gt; array( 'localhost:11211' =&gt; 'default', 'localhost:11212' =&gt; 'content', 'localhost:11213' =&gt; 'filter', 'localhost:11214' =&gt; 'menu', 'localhost:11215' =&gt; 'page', 'localhost:11216' =&gt; 'views', ), 'memcache_bins' =&gt; array( 'cache' =&gt; 'default', 'cache_content' =&gt; 'content', 'cache_filter' =&gt; 'filter', 'cache_menu' =&gt; 'menu', 'cache_page' =&gt; 'page', 'cache_views' =&gt; 'views', ), ); ?&gt;</pre><h1 id="Servidor-de-memcache">Servidor de memcache</h1> <p>Editamos el fichero de memcache y lo configuramos con los siguientes parámetros personalizados.</p> <pre lang="bash" line="1" xml:lang="bash"> $ sudo nano /etc/init.d/memcache</pre><p>Estos parámetros variaran según el hardware y aplicación.</p> <pre lang="bash" line="1" xml:lang="bash"> #!/bin/bash prog="memcached" start() { echo -n $"Starting $prog " # Sessions cache. memcached -m 16 -l 0.0.0.0 -p 11211 -d -u nobody # Default cache. memcached -m 32 -l 0.0.0.0 -p 11212 -d -u nobody # Block cache. memcached -m 32 -l 0.0.0.0 -p 11213 -d -u nobody # Content cache. Holds fully loaded content type structures. memcached -m 16 -l 0.0.0.0 -p 11214 -d -u nobody # Filter cache. Usually the busiest cache after the default. memcached -m 32 -l 0.0.0.0 -p 11215 -d -u nobody # Form cache. memcached -m 32 -l 0.0.0.0 -p 11216 -d -u nobody # Menu cache. memcached -m 32 -l 0.0.0.0 -p 11217 -d -u nobody # Page cache. Bigger than most other caches. memcached -m 128 -l 0.0.0.0 -p 11218 -d -u nobody # Views definition cache. memcached -m 1 -l 0.0.0.0 -p 11219 -d -u nobody # Views data cache (may need to be increased if heavily used). memcached -m 32 -l 0.0.0.0 -p 11220 -d -u nobody # More caches that might be added later: # Users table. #/usr/bin/memcached -m 24 -l 0.0.0.0 -p 11219 -d -u nobody # Path source cache. #/usr/bin/memcached -m 4 -l 0.0.0.0 -p 11220 -d -u nobody # Path destination cache. #/usr/bin/memcached -m 6 -l 0.0.0.0 -p 11221 -d -u nobody RETVAL=$? echo return $RETVAL } stop() { if test "x`pidof memcached`" != x; then echo -n $"Stopping $prog " killall memcached echo fi RETVAL=$? return $RETVAL } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; condrestart) if test "x`pidof memcached`" != x; then stop start fi ;; *) echo $"Usage: $0 {start|stop|restart|condrestart}" exit 1 esac exit $RETVAL</pre><h1 id="Referencias">Referencias</h1> <ul><li><a href="http://www.lullabot.com/articles/setup-memcached-mamp-sandbox-environment">http://www.lullabot.com/articles/setup-memcached-mamp-sandbox-environment</a></li> <li><a href="http://www.lullabot.com/articles/how_install_memcache_debian_etch">http://www.lullabot.com/articles/how_install_memcache_debian_etch</a></li> <li><a href="http://drupal.org/project/memcache">http://drupal.org/project/memcache</a></li> <li><a href="http://www.lullabot.com/articles/a_beginners_guide_to_caching_data">http://www.lullabot.com/articles/a_beginners_guide_to_caching_data</a></li> <li><a href="http://www.howtoforge.com/installing-memcached-and-the-php5-memcache-module-on-debian-etch-apache2">http://www.howtoforge.com/installing-memcached-and-the-php5-memcache-module-on-debian-etch-apache2</a></li> <li><a href="http://livebookmark.net/journal/2008/05/21/memcachephp-stats-like-apcphp/">http://livebookmark.net/journal/2008/05/21/memcachephp-stats-like-apcphp/</a></li> <li><a href="http://de.php.net/manual/en/memcache.installation.php#95063">http://de.php.net/manual/en/memcache.installation.php#95063</a></li> <li><a href="http://blogofsysadmins.com/instalar-memcached-en-centos-5-3">http://blogofsysadmins.com/instalar-memcached-en-centos-5-3</a></li> </ul></div> </div> </div> <span><span>keopx</span></span> <span><time datetime="2010-04-29T12:23:50+02:00" title="Jueves, Abril 29, 2010 - 12:23">Jue, 29/04/2010 - 12:23</time> </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/gnu-linux" hreflang="es">GNU Linux</a></div> <div class="field__item"><a href="/categoria/drupal" hreflang="es">Drupal</a></div> <div class="field__item"><a href="/categoria/drupal-planeta" hreflang="es">Drupal Planeta</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/rendimiento" hreflang="es">Rendimiento</a></div> <div class="field__item"><a href="/tag/php" hreflang="es">php</a></div> <div class="field__item"><a href="/tag/memcache" hreflang="es">memcache</a></div> <div class="field__item"><a href="/tag/cache" hreflang="es">cache</a></div> </div> </div> <section data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comentarios</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=181&amp;2=field_comments&amp;3=comment" token="mjBtBpEleUb_ZMgTFheheRElvUgBOSg-e1vlPY3ZG74"></drupal-render-placeholder> </div> </div> </section> Thu, 29 Apr 2010 10:23:50 +0000 keopx 181 at https://www.keopx.net https://www.keopx.net/blog/instalar-apc-y-memcache-para-drupal#comments Instalación del modulo de Drupal Apachesolr https://www.keopx.net/blog/instalacion-del-modulo-de-drupal-apachesolr <span>Instalación del modulo de Drupal Apachesolr</span> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-hidden field__item"><h1>Instalación del modulo de Drupal Apachesolr</h1> <h2>Modulo apachesolr</h2> <p>Descargar y comprimir el modulo de apachesolr: <a href="http://drupal.org/project/apachesolr">http://drupal.org/project/apachesolr</a></p> <h2>Instalar JSON</h2> <pre> <code class="language-bash">$ sudo aptitude install php5-json</code></pre><p>En caso de no disponer en los repositorios, en necesario el instalarlo a mano.</p> <pre> <code class="language-bash">$ sudo pecl install json sudo nano /etc/php5/conf.d/json.ini</code></pre><p>Añadir el contenido "extension=json.so" (sin las comillas).</p> <h2>Librería solr-php-client</h2> <p>Obtener del siguiente proyecto la librería necesaria: <a href="http://code.google.com/p/solr-php-client/">http://code.google.com/p/solr-php-client/</a> Ir al directorio del modulo apachesolr y ejecutar el siguiente comando:</p> <pre> <code class="language-bash">$ svn checkout -r22 http://solr-php-client.googlecode.com/svn/trunk/ SolrPhpClient</code></pre><h2>Instalar Apache Solr</h2> <p>Se puede realizar la instalación de dos formas diferentes.</p> <p>Una opción puede ser el usar la aplicación del ejemplo con la configuración de Drupal y la otra basada en tomcat.</p> <p>Descargar Solr 1.4 de:</p> <p><a href="http://www.apache.org/dyn/closer.cgi/lucene/solr/">http://www.apache.org/dyn/closer.cgi/lucene/solr/</a></p> <p>Descomprimir el fichero en una ruta que no este visible y que tampoco sea la de Drupal.</p> <h2>Configuración de Solr basada en Example de Jetty</h2> <p>Vamos a la siguiente carpeta<strong> apache-solr-1.4.0/example</strong> donde esta un ejemplo del servidor que sirve como ejemplo, test, desarrollo y para pequeños sitios en producción.</p> <p>Entramos en la carpeta <strong>apache-solr-1.4.0/example/solr/conf/</strong> y renombramos los siguientes ficheros <strong>schema.xml</strong> y <strong>solrconfig.xml</strong> a <strong>schema.back</strong> y <strong>solrconfig.back</strong>.</p> <p>Ahora copiamos los ficheros <strong>schema.xml</strong> y <strong>solrconfig.xml</strong> del modulo <strong>apachesolr</strong> a la carpeta <strong>apache-solr-1.4.0/example/solr/conf/</strong>.</p> <p>Subimos un nivel en la carpeta a la ruta <strong>apache-solr-1.4.0/example</strong> y ejecutamos el siguiente comando:</p> <pre> <code class="language-bash">$ java -jar start.jar</code></pre><p>Accedemos a la siguiente ruta para comprobar que esta en marcha:</p> <p><a href="http://localhost:8983/solr/admin/">http://localhost:8983/solr/admin/</a></p> <h1>Configuración de Solr basada en Tomcat 6.0</h1> <p>Se puede instalar Tomcat de los repositorios o descargarlo de la web.</p> <pre> <code class="language-bash">$ sudo aptitude install tomcat6 tomcat6-admin</code></pre><p>O descargarlo de:</p> <p><a href="http://tomcat.apache.org/download-60.cgi#6.0.26">http://tomcat.apache.org/download-60.cgi#6.0.26</a></p> <p>Una vez realizado configuramos apachesolr:</p> <p>Vamos a la siguiente carpeta <strong>apache-solr-1.4.0/example</strong> donde esta un ejemplo del servidor que sirve como ejemplo, test, desarrollo y para pequeños sitios en producción.</p> <p>Entramos en la carpeta <strong>apache-solr-1.4.0/example/solr/conf/</strong> y renombramos los siguientes ficheros <strong>schema.xml</strong> y <strong>solrconfig.xml</strong> a <strong>schema.back</strong> y <strong>solrconfig.back</strong>.</p> <p>Ahora copiamos los ficheros <strong>schema.xml</strong> y <strong>solrconfig.xml</strong> del modulo <strong>apachesolr</strong> a la carpeta <strong>apache-solr-1.4.0/example/solr/conf/</strong>.<br /> Copiamos el war de la aplicación:</p> <pre> <code class="language-bash">$ sudo cp apache-solr-1.4.0/example/solr/ /nuestra_ruta/tomcat6/solr</code></pre><p>Ahora copiamos la carpeta <strong>solr</strong> de <strong>apache-solr-1.4.0/example/</strong> a nuestra carpeta tomcat6:</p> <pre> <code class="language-bash">$ sudo cp apache-solr-1.4.0/dist/apache-solr-1.4.0.war /nuestra_ruta/tomcat6/webapps/solr.war</code></pre><p>Creamos el fichero <strong>sorl.xml</strong> en la ruta <strong>/nuestra_ruta/tomcat6/conf/Catalina/localhost/solr.xml</strong>.</p> <pre> <code class="language-bash">$ sudo nano /nuestra_ruta/tomcat6/conf/Catalina/localhost/solr.xml</code></pre><p>Y añadimos lo siguiente:<context crosscontext="true" debug="0" docbase="/solr.war"></context></p> <p>Ahora accedemos a la ruta:</p> <p><a href="http://localhost:8080/solr/admin/">http://localhost:8080/solr/admin/</a></p> <h1>Poner en marcha el modulo apachesolr</h1> <p>Ahora tenemos que activar los siguiente módulos "Apache Solr framework" y "Apache Solr search". Ahora comprobamos que el nos podemos conectar en ?q=admin/setting/apachesolr a Solr. Para que indexe es necesario ejecutar cron. Se puede controlar el monitor de indexación en ?q=admin/settings/apachesolr/index</p> <p>Según el servidor que configuremos sera necesario el puerto <strong>8983</strong> o <strong>8080</strong>.</p> <h1>Referencias</h1> <ul><li><a href="http://drupal.org/project/apachesolr">http://drupal.org/project/apachesolr</a></li> <li><a href="http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/apachesolr/README.txt?view=markup&amp;pathrev=DRUPAL-6--1">http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/apachesolr/README.txt?view=markup&amp;pathrev=DRUPAL-6--1</a></li> <li><a href="http://19thstreetdesign.com/blog/2009.02.04/installing-apache-solr-drupal-6">http://19thstreetdesign.com/blog/2009.02.04/installing-apache-solr-drupal-6</a></li> <li><a href="http://xdeb.org/node/1213">http://xdeb.org/node/1213</a></li> </ul></div> <span><span>keopx</span></span> <span><time datetime="2010-04-28T12:07:33+02:00" title="Miércoles, Abril 28, 2010 - 12:07">Mié, 28/04/2010 - 12:07</time> </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/sorl" hreflang="es">Sorl</a></div> <div class="field__item"><a href="/categoria/drupal-7x" hreflang="es">Drupal 7.x</a></div> <div class="field__item"><a href="/categoria/drupal" hreflang="es">Drupal</a></div> <div class="field__item"><a href="/categoria/drupal-planeta" hreflang="es">Drupal Planeta</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/solr" hreflang="es">Solr</a></div> <div class="field__item"><a href="/tag/java" hreflang="es">Java</a></div> <div class="field__item"><a href="/tag/php" hreflang="es">php</a></div> <div class="field__item"><a href="/tag/drupal-7x" hreflang="es">Drupal 7.x</a></div> <div class="field__item"><a href="/tag/drupal" hreflang="es">Drupal</a></div> </div> </div> <section data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comentarios</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=180&amp;2=field_comments&amp;3=comment" token="AvesC6SMHC6sHNY1LaASNxmRuazOB7dhadZro2kazsg"></drupal-render-placeholder> </div> </div> </section> Wed, 28 Apr 2010 10:07:33 +0000 keopx 180 at https://www.keopx.net https://www.keopx.net/blog/instalacion-del-modulo-de-drupal-apachesolr#comments