tag:blogger.com,1999:blog-51852042515363571862024-03-14T02:09:03.328+01:00Amazing the wayIntentaré publicar mis experiencias con Alfresco, GNU/Linux y otras cosas que me parezcan interesantesMikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.comBlogger21125tag:blogger.com,1999:blog-5185204251536357186.post-50404551453550545422015-06-19T14:07:00.002+02:002015-06-19T14:42:25.697+02:00Un vistazo a DockerHace mucho tiempo que llevo pensando en retomar el blog, llevo algún tiempo bastante liado en el trabajo y he sido padre, una experiencia tan bonita y excitante como absorbente jejeje<br />
Sin embargo sigo teniendo las mismas ganas de compartir muchas cosas que he estado haciendo con Alfresco, y también sin Alfresco, así que después de mucho tiempo, aquí va maculi33 reloaded<br />
<br />
Docker es simplemente genial, no me voy a extender en detalles, su <a href="http://docker.com/" target="_blank">página Web</a> ya es muy extensa en documentación. Es muy fácil e intuitivo acercarse a la comunidad y empezar a crear tus propias imágenes a partir de un <a href="https://docs.docker.com/reference/builder/" target="_blank">Dockerfile</a><br />
<br />
Mi intención ha sido seguir las buenas practicas para crear una imagen Docker de Alfresco Community (5.0.d). Para ello primero he creado una imagen con todos los componentes en el mismo Tomcat, algo que puede ser útil para demos, pruebas de concepto, etc<br />
En una segunda aproximación he creado tres imágenes para separar los componentes de Alfresco (alfresco-repo, alfresco-share. alfresco-solr4). Veamos como va la cosa<br />
<br />
Ambas aproximaciones requieren de un servicio Postgresql con los siguientes datos de conexión<br />
<br />
db.url=jdbc:postgresql://postgres:5432/alfresco<br />
db.user=alfresco<br />
db.name=alfresco<br />
db.password=alfresco<br />
<br />
Para ello podemos ejecutar el siguiente comando docker<br />
<br />
docker run --name postgres -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco -e POSTGRES_PASSWORD=alfresco -d postgres<br />
<br />
Alfresco Standalone<br />
<br />
<a href="https://registry.hub.docker.com/u/mikelasla/alfresco-standalone/">https://registry.hub.docker.com/u/mikelasla/alfresco-standalone/</a><br />
<br />
podemos ejecutar la imagen de la siguiente forma<br />
<br />
docker run --name alfresco-standalone --link postgres:postgres -p 8080:8080 -d mikelasla/alfresco-standalone<br />
<br />
Para ver los logs del proceso<br />
<br />
docker logs -f alfresco-standalone<br />
<br />
Si necesitamos cambiar cosas antes de arrancar Alfresco, podemos ejecutar la imagen de la siguiente forma<br />
<br />
docker run --name alfresco-standalone --link postgres:postgres -p 8080:8080 -it mikelasla/alfresco-standalone /bin/bash<br />
<br />
Realizar los cambios necesarios y finalmente arrancar el servicio Tomcat<br />
<br />
/usr/local/alfresco/tomcat/bin/startup.sh<br />
<br />
Una vez arrancado podemos acceder como si estuviera corriendo en local (gracias a la opción -p)<br />
<br />
http://localhost:8080/share<br />
<br />
Como se puede observar, postgres no ha expuesto ningún puerto al host, el contenedor alfresco esta directamente linkado a postgres a través del comando docker run y la opción --link. Esta es otra característica muy interesante de docker, mas info <a href="https://docs.docker.com/docker/userguide/dockerlinks/" target="_blank">aquí</a><br />
<br />
Alfresco Distributed deployment<br />
<br />
<a href="https://registry.hub.docker.com/u/mikelasla/alfresco-repo/">https://registry.hub.docker.com/u/mikelasla/alfresco-repo/</a><br />
<div>
<br /></div>
<br />
<br />Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0tag:blogger.com,1999:blog-5185204251536357186.post-46650320061789856342012-11-13T19:01:00.001+01:002012-11-13T19:01:16.269+01:00Parcheando Liferay 6.1.1-ce-ga2<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;">Juan Gonzalez, integrante activo de la comunidad<span style="font-size: small;"> <span style="font-size: small;">de Life<span style="font-size: small;">ray</span></span></span>, publicó el pasado Octubre un parche que resuelve una lista largísima de bugs en Liferay 6.1.1-ce-ga2, aqui podeís consultar el post de la wiki, y descargaros el zip que contiene el parche.</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;"><a href="http://www.liferay.com/community/forums/-/message_boards/message/17664338">http://www.liferay.com/community/forums/-/message_boards/message/17664338</a></span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;"><span></span></span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;">Voy a describir los pasos que he seguido para parchear Liferay 6.1.1-ce-ga2 en un CentOS 6.3.</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;"><span>Primero <span style="font-size: small;">me he </span>descar<span style="font-size: small;">gado</span> el liferay-portal-tomcat y el liferay-portal-src de la versión</span></span></span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;"><a href="http://www.liferay.com/downloads/"><span>http://www.liferay.com/downloads</span></a></span></span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;"><span>Después instalamos algunas dependencias que vamos a necesitar </span></span></span><br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">yum install patch dos2unix ant ant-apache-regexp.x86_64</span></span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;">Ahora preparamos las fuentes para ejecutar el parche</span></span><br />
<span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"> </span></span></span></span></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">cd /usr/src<br />unzip ~/liferay-portal-src-6.1.1-ce-ga2-20120731132656558.zip -d .<br />cd liferay-portal-src-6.1.1-ce-ga2<br />unzip ~/patch_6.1.1_juan.zip -d .<br />find . -type f -regex ".*.\(properties\|xml\|jsp?f?\|java\|css\)"<span style="font-size: small;"> \</span></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">-exec dos2unix {} \;</span></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"><br /><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;">Y ejecutamos el parche</span></span></span><br />
<span style="font-size: small;"><span style="font-size: x-small;"><span style="font-size: x-small;"> </span></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">patch -p0 < patch_6.1.1_juan.diff</span></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"><br /><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;">Para que funcione el target "zip-portal-war" debemos primero de hacer esto</span></span></span></span><br />
<span style="font-size: small;"><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;"> </span></span></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">mkdir dist<br />mkdir ../bundles<br />cp -R /opt/liferay-portal-src-6.1.1-ce-ga2/tomcat-7.0.27 ../bundles</span></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;">Ahora si<span style="font-size: small;">, contruimos e<span style="font-size: small;">l WAR</span></span></span></span></span><br />
<span style="font-size: small;"><span style="font-size: small;"><br /></span></span>
<span style="font-size: small;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">ant -buildfile build-dist.xml zip-portal-war</span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;">Ahora copiamos el <span style="font-size: small;">bundle de Liferay como Liferay<span style="font-size: small;">-pat<span style="font-size: small;">ched, la razón es mantener el b<span style="font-size: small;">undle original<span style="font-size: small;">.</span></span></span></span></span></span></span></span></span><br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">cp -R /opt/liferay-portal-src-6.1.1-ce-ga2 /opt/liferay-portal-src-6.1.1-ce-ga2-patched</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">cd /opt/liferay-portal-src-6.1.1-ce-ga2-patched/tomcat-7.0.27</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">rm -rf webapps/ROOT/* </span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">unzip /usr/src/liferay-portal-src-6.1.1-ce-ga2/dist/liferay-portal-6.1.0.war \ <br />-d /opt/liferay-portal-6.1.1-ce-ga2-patched/tomcat-7.0.27/webapps/ROOT/</span></span><span style="font-size: 0.8em;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span></span><br />
<span style="font-size: 0.8em;"><br /></span>
<span style="font-size: 0.8em;"><span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: small;">Ya podemos arranca<span style="font-size: small;">r el tomcat del bundle<span style="font-size: small;">-pat<span style="font-size: small;">ched<span style="font-size: small;">, p<span style="font-size: small;">rimero<span style="font-size: small;"> tal vez queramos configurar las propiedades básicas en un <span style="font-size: small;">portal<span style="font-size: small;">-ex<span style="font-size: small;">t.propert<span style="font-size: small;">ies para<span style="font-size: small;"> conectar con base d<span style="font-size: small;">e datos, correo, etc.</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br />
<br />
<span style="font-size: 0.8em;"><span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br />
<span style="font-size: 0.8em;"><br /></span>Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com1tag:blogger.com,1999:blog-5185204251536357186.post-23411628295426735632012-11-12T19:54:00.001+01:002012-11-12T19:58:29.348+01:00Instalación de Liferay 6.1.1-ce-ga2 en Weblogic 10.3 con JRockt 1.6 (64bits)<br />
La instalación es bastante sencilla, yo lo he probado en Open Suse 10.3 pero debe de ser igual en cualquier distribución de Unix/Linux<br />
Weblogic tiene asistentes en modo consola intuitivos que no nos darán problemas<br />
<br />
1- Descarga de Weblogic Server 10.3.6 Generic Installer<br />
<br />
wget <a href="http://download.oracle.com/otn/nt/middleware/11g/wls/1036/wls1036_generic.jar">http://download.oracle.com/otn/nt/middleware/11g/wls/1036/wls1036_generic.jar</a><br />
<br />
2- Descarga e instalación de JRockit<br />
<br />
wget <a href="http://download.oracle.com/otn/bea/jrockit/jrockit-jdk1.6.0_37-R28.2.5-4.1.0-linux-x64.bin">http://download.oracle.com/otn/bea/jrockit/jrockit-jdk1.6.0_37-R28.2.5-4.1.0-linux-x64.bin</a><br />
sh jrockit-jdk1.6.0_37-R28.2.5-4.1.0-linux-x64.bin<br />
<br />
3- Instalación de Weblogic Server<br />
<br />
Para instalar Weblogic seguimos los pasos del asistente<br />
/usr/java/jrockit16/bin/java -d64 -jar wls1036_generic.jar -mode=console<br />
<br />
4- Configuración del dominio<br />
<br />
Creamos un dominio (lfry_domain) que albergará el servidor de aplicaciones para Liferay<br />
/opt/Oracle/Middleware/wlserver_10.3/common/bin/config.sh -mode=console<br />
(Basic WebLogic Server Domain - 10.3.6.0)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6w3i4vmLcUZP_dgCWcYBMrXqhKZ9H6VPm9UD3mgkxIMtcPvXTKFL8T06tfQkPaBX7twQdct8VPc_JYN_ve3Ue00kG0vsj0oiQEuk0_cSDHiGFv2Y2IOIuEGH0-UeF5vduiewtyjxS7wvo/s1600/weblogic_domain.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6w3i4vmLcUZP_dgCWcYBMrXqhKZ9H6VPm9UD3mgkxIMtcPvXTKFL8T06tfQkPaBX7twQdct8VPc_JYN_ve3Ue00kG0vsj0oiQEuk0_cSDHiGFv2Y2IOIuEGH0-UeF5vduiewtyjxS7wvo/s1600/weblogic_domain.PNG" height="404" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT01tAIQ_4MmKcgbcGhiQBCF90t__sI87TSuSP39E-AgYBRsBb6AgmlZg2YWOmD91Kglvuv0Pr4VQnF3QroN60ludmpiqdzYYO1mmQihyaekmU9u3g6dJomvenyzqH4CcrW3EOA2WaMwXB/s1600/weblogic_jrockit.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT01tAIQ_4MmKcgbcGhiQBCF90t__sI87TSuSP39E-AgYBRsBb6AgmlZg2YWOmD91Kglvuv0Pr4VQnF3QroN60ludmpiqdzYYO1mmQihyaekmU9u3g6dJomvenyzqH4CcrW3EOA2WaMwXB/s1600/weblogic_jrockit.PNG" height="190" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC5mWpB8KJ5BMVOarXm2_MVJhM34ZSw7fcv4pcsvvXFAp7zRCPKvgJ1pvGnJtJKBSd6FZowG5SlDFCbOPtJEcTVa_G9xi-zNocSrUuBG2_oGcOYMPstmkIdR0BzmQTVRcbLaotIXVxKfYl/s1600/weblogic_domain2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC5mWpB8KJ5BMVOarXm2_MVJhM34ZSw7fcv4pcsvvXFAp7zRCPKvgJ1pvGnJtJKBSd6FZowG5SlDFCbOPtJEcTVa_G9xi-zNocSrUuBG2_oGcOYMPstmkIdR0BzmQTVRcbLaotIXVxKfYl/s1600/weblogic_domain2.PNG" height="182" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
Este será el $LFRY_DOMAIN_HOME en mi caso<br />
/opt/Oracle/Middleware/user_projects/domains/lfry_domain<br />
<br />
Por lo tanto $LIFERAY_HOME por defecto será<br />
/opt/Oracle/Middleware/user_projects/domains<br />
<br />
5- Dependencias de Liferay<br />
<br />
Descargamos las dependencias de la 6.1.1-ce-ga2 y las colocamos en $LFRY_DOMAIN_HOME/lib<br />
<br />
<a href="http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.1.1%20GA2/liferay-portal-dependencies-6.1.1-ce-ga2-20120731132656558.zip/download">http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.1.1%20GA2/liferay-portal-dependencies-6.1.1-ce-ga2-20120731132656558.zip/download</a><br />
<br />
6- Configuración de Liferay<br />
<br />
Creamos el ficheros portal-ext.properties en $LIFERAY_HOME con el siguiente contenido<br />
jdbc.default.jndi.name=jdbc/LiferayPool<br />
mail.session.jndi.name=mail/MailSession<br />
setup.wizard.enabled=false<br />
<br />
Levantamos el servidor Weblogic<br />
$LFRY_DOMAIN_HOME/startWebLogic.sh<br />
<br />
7- Consola de administración de Weblogic<br />
<br />
Accedemos a la consola con los datos del usuario que configuramos en el proceso de instalación<br />
http://localhost:7001/console<br />
weblogic_user / weblogic_pass<br />
<br />
Configuramos el Origen de datos y la Sesión de correo de acuerdo a nuestro entorno,<br />
sin olvidar el JDBC Driver en $LFRY_DOMAIN_HOME/lib<br />
<br />
Estos son los pasos en la Consola de Administración <br />
<br />
1- Nos vamos a Servicios - Orígenes de Datos<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi37kVGMCinuhbvWWcp2cg19Am6dY5TmYciumPYq9KOIxHO0BFfYfwGKSYJc0tFzwLfnr5_hmw2DCQAHbd2DuXnHtMRUFWNEgNUtRLuPIK4uy2oYVw0RbfLanuIx3hBlgu4qJCQjjAloA4n/s1600/welogic_jdbc1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi37kVGMCinuhbvWWcp2cg19Am6dY5TmYciumPYq9KOIxHO0BFfYfwGKSYJc0tFzwLfnr5_hmw2DCQAHbd2DuXnHtMRUFWNEgNUtRLuPIK4uy2oYVw0RbfLanuIx3hBlgu4qJCQjjAloA4n/s1600/welogic_jdbc1.PNG" width="200" /></a></div>
<br />
2- Añadimos los datos básicos del tipo de Orígen de Datos que vayamos a crear<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHWYOQ_xAfEwtA3r5MCe57w2krpykkEW6uPMObxPIoq2V9mqoEKOsfXqgMjutrVBCynP03JVFvk1Ir3vx0cJNlvsQk1ndEgxjCRnUEmZSI2QBOGO32L56sAetSURe7oRh7yUmt6pj_H-xI/s1600/welogic_jdbc2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="537" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHWYOQ_xAfEwtA3r5MCe57w2krpykkEW6uPMObxPIoq2V9mqoEKOsfXqgMjutrVBCynP03JVFvk1Ir3vx0cJNlvsQk1ndEgxjCRnUEmZSI2QBOGO32L56sAetSURe7oRh7yUmt6pj_H-xI/s1600/welogic_jdbc2.PNG" width="640" /></a></div>
<br />
3- Seleccionamos la versión del Driver JDBC <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg16fJp6k7eyCKSx7UalfO7sdOzq1CRtmoxCHgIYwTu36FGAtmVl2hcFkrGWxsZTZ4ketjCdurADCM8oSgwiclsYrCnhpHo-ZAQbBvmyUCCjpYiQLTGp_ODk0S_IYB6pzNYkj3u5VjQqoXB/s1600/welogic_jdbc3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="222" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg16fJp6k7eyCKSx7UalfO7sdOzq1CRtmoxCHgIYwTu36FGAtmVl2hcFkrGWxsZTZ4ketjCdurADCM8oSgwiclsYrCnhpHo-ZAQbBvmyUCCjpYiQLTGp_ODk0S_IYB6pzNYkj3u5VjQqoXB/s1600/welogic_jdbc3.PNG" width="640" /></a></div>
<br />
4- Definimos los datos de conexión a la base de datos de Liferay <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg83S7ofWBpDXFcJSBcwwwKmeu_3iWkFAhZ_A2whRty1asFgGeiRcNWtkCSwLKNVt-15KsYqkCGDY1HRpVKWtSI-PM0MQiaOjhUjx2QjdXq4YePGqm0KuJTx_1vNm4A89eGzcG_WU4RgGNz/s1600/welogic_jdbc4.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="516" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg83S7ofWBpDXFcJSBcwwwKmeu_3iWkFAhZ_A2whRty1asFgGeiRcNWtkCSwLKNVt-15KsYqkCGDY1HRpVKWtSI-PM0MQiaOjhUjx2QjdXq4YePGqm0KuJTx_1vNm4A89eGzcG_WU4RgGNz/s1600/welogic_jdbc4.PNG" width="640" /></a></div>
<br />
5 - Probamos la configuración<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGXi-tHAWEADlW5O-5dc_SiO0CaJOpnf0eObZ5erel7a3V3bHHunQ8rVCExbXlitOplcmrOmTE9xkjGXCncnrJBokgiNKMIamvo9OJkfk46AS65V3Pi6M0TcIhrUc9xjnbQ0ii3GOGducK/s1600/welogic_jdbc5.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGXi-tHAWEADlW5O-5dc_SiO0CaJOpnf0eObZ5erel7a3V3bHHunQ8rVCExbXlitOplcmrOmTE9xkjGXCncnrJBokgiNKMIamvo9OJkfk46AS65V3Pi6M0TcIhrUc9xjnbQ0ii3GOGducK/s1600/welogic_jdbc5.PNG" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc8uTrkvOpH_yfDojeeBny2DVriXsahFI39bJIf6MFJsZSJTLKr5bTygqkdZFZBkJclqNh-ImSB25GtTrZVvOR373h9bQJP0XGl5l3-MSXVy1F87xpdEN6HqBQ2C4u7gfszm8f_cAuXtsn/s1600/welogic_jdbc6.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="56" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc8uTrkvOpH_yfDojeeBny2DVriXsahFI39bJIf6MFJsZSJTLKr5bTygqkdZFZBkJclqNh-ImSB25GtTrZVvOR373h9bQJP0XGl5l3-MSXVy1F87xpdEN6HqBQ2C4u7gfszm8f_cAuXtsn/s1600/welogic_jdbc6.PNG" width="200" /></a></div>
6 - Selecionamos el destino de despliegue del recurso <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWIxznrwSA_dWem_PWKaC0AOo-9UK5_6D9Dl9fU9rPfV308XIveZeeec657Ws128XFXahcTgrPKy7J5upukDS43-bsTvy0vwtR3jNxMKQ7XKTGdYb63QKibprzFDlZV0vQsmb82JpBbTU7/s1600/welogic_jdbc7.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWIxznrwSA_dWem_PWKaC0AOo-9UK5_6D9Dl9fU9rPfV308XIveZeeec657Ws128XFXahcTgrPKy7J5upukDS43-bsTvy0vwtR3jNxMKQ7XKTGdYb63QKibprzFDlZV0vQsmb82JpBbTU7/s1600/welogic_jdbc7.PNG" width="640" /></a></div>
<br />
7 - El Orígen de Datos esta listo para usarse <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgtN-PQg40hhcxg7MIXTBaC1gb4I6IJNtU_O-BLnNyq8psVWwqn5WEDJZfAEBvqulBQ4maCSLRpCeYRX0giQyYodlVdE51Lpn5neK5TTFPdZf6CKZfMrWhnzqeQV7_v9CwR_tKh-MFFz3h/s1600/welogic_jdbc8.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="232" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgtN-PQg40hhcxg7MIXTBaC1gb4I6IJNtU_O-BLnNyq8psVWwqn5WEDJZfAEBvqulBQ4maCSLRpCeYRX0giQyYodlVdE51Lpn5neK5TTFPdZf6CKZfMrWhnzqeQV7_v9CwR_tKh-MFFz3h/s1600/welogic_jdbc8.PNG" width="640" /></a></div>
<br />
<br />
8- Despliegue<br />
<br />
Primero debemos desplegar jsf-1.2.war como librería<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfhFUZ40XDOm6i519Qj35n7C4e7Zz2bws78h3_OXlBeUSs6MuntTOqRjuZ2j3NNipsRd6PF4J2D6GwcYJ45xybCp02ibDxVvk4X-ftqoCcv2yc84xm6NZYRxHN-Cs7PtDc9VfRl39WJT2K/s1600/welogic_jsf.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfhFUZ40XDOm6i519Qj35n7C4e7Zz2bws78h3_OXlBeUSs6MuntTOqRjuZ2j3NNipsRd6PF4J2D6GwcYJ45xybCp02ibDxVvk4X-ftqoCcv2yc84xm6NZYRxHN-Cs7PtDc9VfRl39WJT2K/s1600/welogic_jsf.PNG" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguf5Qt4Qs1kmfsL_SvSzsI2foFGBuEEJQYMv-XnZnc2PyIQpjn2CGCHM0ucBgoBPomQCJYOcRlC0Q25Vg_Iavrf2ZmXR_wGMjBazopWa9obfvQNNMPf370C2_dXVVk830VGqcRs5Pydh-y/s1600/welogic_jsf2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="168" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguf5Qt4Qs1kmfsL_SvSzsI2foFGBuEEJQYMv-XnZnc2PyIQpjn2CGCHM0ucBgoBPomQCJYOcRlC0Q25Vg_Iavrf2ZmXR_wGMjBazopWa9obfvQNNMPf370C2_dXVVk830VGqcRs5Pydh-y/s1600/welogic_jsf2.PNG" width="640" /></a></div>
<br />
<br />
Después deplegamos Liferay-6.1.1-ce-ga2.war como aplicación<br />
<br />
<br />
<br />
<a href="http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.1.1%20GA2/liferay-portal-6.1.1-ce-ga2-20120731132656558.war/download">http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.1.1%20GA2/liferay-portal-6.1.1-ce-ga2-20120731132656558.war/download</a><br />
<br />
El asistente es igual que en el paso anterior, la única diferencia es que lo desplegamos como aplicación.<br />
<br />
<br />
9- Accedemos a Liferay<br />
<br />
http://localhost:7001/<br />
test@liferay.com / test<br />
<br />
<br />
<br />
<br />Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com1tag:blogger.com,1999:blog-5185204251536357186.post-48733882135761620782012-10-23T19:21:00.002+02:002012-10-24T09:35:24.581+02:00Consumiendo Servicios de Alfresco desde WSO2ESB<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5THJnOrIbCm8GenE1T5z3e2U3cA9XCm7sd8hJ9KdGGOhL1hBILokmeK83x7gvvZyXc-0DxFzrWQJzrKHWrQ3Voe3x57tjb0ICd0frTjK4CBJGj1iu3WxV7hJg0qenwk-43CowrZ7IpMeB/s1600/Selecci%C3%B3n_005.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5THJnOrIbCm8GenE1T5z3e2U3cA9XCm7sd8hJ9KdGGOhL1hBILokmeK83x7gvvZyXc-0DxFzrWQJzrKHWrQ3Voe3x57tjb0ICd0frTjK4CBJGj1iu3WxV7hJg0qenwk-43CowrZ7IpMeB/s1600/Selecci%C3%B3n_005.png" height="73" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="margin-bottom: 0cm;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS_7UWT8vItgNglmL-o3fYeLVwS4hpQGQr3Bf83bQDSzNYw41KmnzdpyLTXoVmiVsTL91usK57yUaCidzhsCedF4Jqzt0ZujxvgAdjKH8b8enI0WgYc8DCB_8aAnsA5j2eN3K1GOy64Rel/s1600/Selecci%25C3%25B3n_004.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0WcNmHJrP3PiynBY1GPn7-6SdTijeCmKSK40mJk1KXevZAht1uVJOsS1YQctJKUcbLCRwuD1PjTxA7di7jiGZOuJcahzuoo2gFrhfrEt-tAFIDGEJSpDehOrreEPQzHrK3PbeSv9e0L3P/s1600/Selecci%25C3%25B3n_003.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdobOVdtTiSXkeJDBJvG3-gXXCcqU74JG_TcwIZyLktCRGbZ24QqwTbFlwgbcrJ69f1axyg6abmHASUYM-3cVSwHAJZ3A0M3eEJNPX_AgYDWW0xsRfLPOpMrGSrWc2s68uoAoGC_0CL3ZZ/s1600/Selecci%25C3%25B3n_002.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_zdNNN8FCHvFSbRSxsxkMHmyla35-TN7LUu0csOh-mXhYrj5ECT6VdDa2cmmBNUFnw53Ad1ZEzQKYw_XEdT9AcJ-vrVixsPYKFSxCIwCK2lj_HBvi5Z32sr_HbKbUnmRGyT_VK-7p7A0h/s1600/Selecci%25C3%25B3n_001.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_zdNNN8FCHvFSbRSxsxkMHmyla35-TN7LUu0csOh-mXhYrj5ECT6VdDa2cmmBNUFnw53Ad1ZEzQKYw_XEdT9AcJ-vrVixsPYKFSxCIwCK2lj_HBvi5Z32sr_HbKbUnmRGyT_VK-7p7A0h/s1600/Selecci%25C3%25B3n_001.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS_7UWT8vItgNglmL-o3fYeLVwS4hpQGQr3Bf83bQDSzNYw41KmnzdpyLTXoVmiVsTL91usK57yUaCidzhsCedF4Jqzt0ZujxvgAdjKH8b8enI0WgYc8DCB_8aAnsA5j2eN3K1GOy64Rel/s1600/Selecci%25C3%25B3n_004.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0WcNmHJrP3PiynBY1GPn7-6SdTijeCmKSK40mJk1KXevZAht1uVJOsS1YQctJKUcbLCRwuD1PjTxA7di7jiGZOuJcahzuoo2gFrhfrEt-tAFIDGEJSpDehOrreEPQzHrK3PbeSv9e0L3P/s1600/Selecci%25C3%25B3n_003.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdobOVdtTiSXkeJDBJvG3-gXXCcqU74JG_TcwIZyLktCRGbZ24QqwTbFlwgbcrJ69f1axyg6abmHASUYM-3cVSwHAJZ3A0M3eEJNPX_AgYDWW0xsRfLPOpMrGSrWc2s68uoAoGC_0CL3ZZ/s1600/Selecci%25C3%25B3n_002.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_zdNNN8FCHvFSbRSxsxkMHmyla35-TN7LUu0csOh-mXhYrj5ECT6VdDa2cmmBNUFnw53Ad1ZEzQKYw_XEdT9AcJ-vrVixsPYKFSxCIwCK2lj_HBvi5Z32sr_HbKbUnmRGyT_VK-7p7A0h/s1600/Selecci%25C3%25B3n_001.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_zdNNN8FCHvFSbRSxsxkMHmyla35-TN7LUu0csOh-mXhYrj5ECT6VdDa2cmmBNUFnw53Ad1ZEzQKYw_XEdT9AcJ-vrVixsPYKFSxCIwCK2lj_HBvi5Z32sr_HbKbUnmRGyT_VK-7p7A0h/s1600/Selecci%25C3%25B3n_001.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a> WSO2 ESB es un Bus de integración muy
flexible y Open Source, podemos registrar en él los servicios que
ofrecen las aplicaciones empresariales que componen nuestro
ecosistema TI y aprovechar sus capacidades de mediación,
transformación, orquestación, etc</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
A modo de ejemplo voy a usar el
servicio de autenticación de Alfresco por WS, su endpoint se
encuentra en</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<a href="http://localhost:8080/alfresco/api/AuthenticationService?wsdl">http://localhost:8080/alfresco/api/AuthenticationService?wsdl</a><br />
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS_7UWT8vItgNglmL-o3fYeLVwS4hpQGQr3Bf83bQDSzNYw41KmnzdpyLTXoVmiVsTL91usK57yUaCidzhsCedF4Jqzt0ZujxvgAdjKH8b8enI0WgYc8DCB_8aAnsA5j2eN3K1GOy64Rel/s1600/Selecci%25C3%25B3n_004.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0WcNmHJrP3PiynBY1GPn7-6SdTijeCmKSK40mJk1KXevZAht1uVJOsS1YQctJKUcbLCRwuD1PjTxA7di7jiGZOuJcahzuoo2gFrhfrEt-tAFIDGEJSpDehOrreEPQzHrK3PbeSv9e0L3P/s1600/Selecci%25C3%25B3n_003.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdobOVdtTiSXkeJDBJvG3-gXXCcqU74JG_TcwIZyLktCRGbZ24QqwTbFlwgbcrJ69f1axyg6abmHASUYM-3cVSwHAJZ3A0M3eEJNPX_AgYDWW0xsRfLPOpMrGSrWc2s68uoAoGC_0CL3ZZ/s1600/Selecci%25C3%25B3n_002.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_zdNNN8FCHvFSbRSxsxkMHmyla35-TN7LUu0csOh-mXhYrj5ECT6VdDa2cmmBNUFnw53Ad1ZEzQKYw_XEdT9AcJ-vrVixsPYKFSxCIwCK2lj_HBvi5Z32sr_HbKbUnmRGyT_VK-7p7A0h/s1600/Selecci%25C3%25B3n_001.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_zdNNN8FCHvFSbRSxsxkMHmyla35-TN7LUu0csOh-mXhYrj5ECT6VdDa2cmmBNUFnw53Ad1ZEzQKYw_XEdT9AcJ-vrVixsPYKFSxCIwCK2lj_HBvi5Z32sr_HbKbUnmRGyT_VK-7p7A0h/s1600/Selecci%25C3%25B3n_001.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a>El primer paso es registrar el servicio en WSO2ESB como Proxy
Service<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZrDNpDYfXU3HGD_xMb5vLZttxtrg2SGPafa3nA3Qgk4SyxBCl7ziQnXhcMv8O9UkpInLMKg4AaG2SlMn1yKrXXe_EmDeltIIFdLtN4UfIiaIHgC7avgn1DMdrGuo1OG0mQqq_4bg1qvTa/s1600/Selecci%25C3%25B3n_001.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZrDNpDYfXU3HGD_xMb5vLZttxtrg2SGPafa3nA3Qgk4SyxBCl7ziQnXhcMv8O9UkpInLMKg4AaG2SlMn1yKrXXe_EmDeltIIFdLtN4UfIiaIHgC7avgn1DMdrGuo1OG0mQqq_4bg1qvTa/s1600/Selecci%25C3%25B3n_001.png" width="640" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_zdNNN8FCHvFSbRSxsxkMHmyla35-TN7LUu0csOh-mXhYrj5ECT6VdDa2cmmBNUFnw53Ad1ZEzQKYw_XEdT9AcJ-vrVixsPYKFSxCIwCK2lj_HBvi5Z32sr_HbKbUnmRGyT_VK-7p7A0h/s1600/Selecci%25C3%25B3n_001.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_zdNNN8FCHvFSbRSxsxkMHmyla35-TN7LUu0csOh-mXhYrj5ECT6VdDa2cmmBNUFnw53Ad1ZEzQKYw_XEdT9AcJ-vrVixsPYKFSxCIwCK2lj_HBvi5Z32sr_HbKbUnmRGyT_VK-7p7A0h/s1600/Selecci%25C3%25B3n_001.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdobOVdtTiSXkeJDBJvG3-gXXCcqU74JG_TcwIZyLktCRGbZ24QqwTbFlwgbcrJ69f1axyg6abmHASUYM-3cVSwHAJZ3A0M3eEJNPX_AgYDWW0xsRfLPOpMrGSrWc2s68uoAoGC_0CL3ZZ/s1600/Selecci%25C3%25B3n_002.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0WcNmHJrP3PiynBY1GPn7-6SdTijeCmKSK40mJk1KXevZAht1uVJOsS1YQctJKUcbLCRwuD1PjTxA7di7jiGZOuJcahzuoo2gFrhfrEt-tAFIDGEJSpDehOrreEPQzHrK3PbeSv9e0L3P/s1600/Selecci%25C3%25B3n_003.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS_7UWT8vItgNglmL-o3fYeLVwS4hpQGQr3Bf83bQDSzNYw41KmnzdpyLTXoVmiVsTL91usK57yUaCidzhsCedF4Jqzt0ZujxvgAdjKH8b8enI0WgYc8DCB_8aAnsA5j2eN3K1GOy64Rel/s1600/Selecci%25C3%25B3n_004.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a></div>
<br />
<br />
<br />
Ahora en el listado de servicios tenemos uno nuevo, si entramos al
Dashboard, en la parte superior derecha observamos la sección
“Client Operations”<br />
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbfXUBoqxpn9lDsgDswjG2fkrh9yit5xbkOyHQNTloRwiM8VyXvOXPfx5qT3Iof3S6ePv4_DsN7ZYq8rbwDjpN3peLGtd5GAd6qQEB8B3NfwuGX-U02SVzCIXwbRD3x9HO-Hu_xCszlmD-/s1600/Selecci%25C3%25B3n_002.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbfXUBoqxpn9lDsgDswjG2fkrh9yit5xbkOyHQNTloRwiM8VyXvOXPfx5qT3Iof3S6ePv4_DsN7ZYq8rbwDjpN3peLGtd5GAd6qQEB8B3NfwuGX-U02SVzCIXwbRD3x9HO-Hu_xCszlmD-/s1600/Selecci%25C3%25B3n_002.png" width="640" /></a></div>
<br /></div>
<br />
<div style="margin-bottom: 0cm;">
Copiamos la url al Enpoint HTTP y lo
registramos como un nuevo proyecto en Soapui</div>
<div style="margin-bottom: 0cm;">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfsU2Q7TtLGHknYH_x_-B38a0NCR8-eIHomXXQzxAMQfJWO9lJvWGHmxvcwHdeFFTYTTQh80N9WiO4qWacrJrArYVDUYS4YHNgnhsaE7MSMJZPIZlsZLJfAgDUNJZQcLhriCgFqxs4eYYj/s1600/Selecci%25C3%25B3n_003.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="296" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfsU2Q7TtLGHknYH_x_-B38a0NCR8-eIHomXXQzxAMQfJWO9lJvWGHmxvcwHdeFFTYTTQh80N9WiO4qWacrJrArYVDUYS4YHNgnhsaE7MSMJZPIZlsZLJfAgDUNJZQcLhriCgFqxs4eYYj/s1600/Selecci%25C3%25B3n_003.png" width="640" /></a></div>
<br /></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
</div>
<div style="margin-bottom: 0cm;">
Si hacemos doble click sobre “Request
1” en la operación startSession, Soapui nos crea un mensaje SOAP
que podemos ejecutar contra WSO2ESB.
</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN8Hy1Ps_k-RHAUNCax4sEA9FhkcQ6b7OL-k7e_RSd-wRWWNvYk3-vJxh2W6LfQxX2Pfl8GEaghL6fka2O-ftK6Bu-3KG9Bkm6LKOqI_1Zms552i_99btqZBjTtXOwjm0c68YgYj7JZJW3/s1600/Selecci%25C3%25B3n_004.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="132" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN8Hy1Ps_k-RHAUNCax4sEA9FhkcQ6b7OL-k7e_RSd-wRWWNvYk3-vJxh2W6LfQxX2Pfl8GEaghL6fka2O-ftK6Bu-3KG9Bkm6LKOqI_1Zms552i_99btqZBjTtXOwjm0c68YgYj7JZJW3/s1600/Selecci%25C3%25B3n_004.png" width="640" /></a></div>
<br /></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
La respuesta es exactamente igual que
si hubiéramos hecho la petición directamente a Alfresco, en este
ejemplo tan sencillo WSO2ESB no esta haciendo ningún trabajo extra
sobre el mensaje pero podríamos complicarlo todo lo que se nos
ocurra.</div>
<br />Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0tag:blogger.com,1999:blog-5185204251536357186.post-49740701898955169592012-10-05T09:28:00.005+02:002012-10-08T09:44:12.655+02:00Monitorización de Sistemas con herramientas Open Source<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Muy buenas! En esta ocasión he creado este vídeo para presentaros 3 herramientas Open Source que nos pueden ayudar a securizar (OSSEC HIDS) y monitorizar (Icinga) nuestra red Corporativa, así como poder analizar todas las trazas de los logs más relevantes en un sistema centralizado (Graylog2), Espero que os guste!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div style="text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/G4LljUPZBvc?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Por tratarse de mi primer vídeo, hay algunos errores sobre todo con el audio...<br />
Un saludo!<br />
Tengo muchas cosas pendientes de mostraros, se acerca un invierno movidito por este blog... :PMikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0tag:blogger.com,1999:blog-5185204251536357186.post-47980690627044733382012-09-18T11:34:00.000+02:002012-11-06T19:44:04.722+01:00Registro Centralizado con WSO2 Governance Registry<br />
<div style="margin-bottom: 0cm;">
<span style="font-family: Courier 10 Pitch;">En
cualquier escenario que se nos ocurra con WSO2, normalmente tendremos
varios productos de la suite trabajando. Data Services, Enterprise
Service Bus, Api Manager, Identity Server, Application Server, …
etc, tienen todos la necesidad de trabajar de forma orquestada.</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Courier 10 Pitch;">Para
explotar las características del WSO2 Governance Registry debemos de
configurar los demás componentes que requiera nuestra solución para
que usen el Governance Registry tal y como veremos a continuación.</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Courier 10 Pitch;">En
este ejemplo usaremos un base de datos Mysql en localhost.</span></div>
<ol>
<div style="margin-bottom: 0cm;">
</div>
</ol>
<div style="margin-bottom: 0cm;">
<span style="font-family: Courier 10 Pitch;">El
primer paso es configurar Governance Registry para que use Mysql en
vez de H2 como base de datos. No es un paso absolutamente necesario,
pero resulta conveniente entenderlo para poder abordar entornos más
complejos en cluster.</span></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Courier 10 Pitch;">Necesitamos
editar el archivo </span>
</div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Courier 10 Pitch;">${CARBON_HOME}/repositoy/conf/registry.xml</span></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Courier 10 Pitch;">En
la parte de configuración de la base de datos tenemos esto</span></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="border: 1px solid #000000; margin-bottom: 0cm; padding: 0.04cm 0.14cm;">
<span style="font-family: Courier 10 Pitch;"><span style="font-size: small;"><span lang="en-US"><currentDBConfig>wso2registry</currentDBConfig><br />
<readOnly>false</readOnly><br />
<enableCache>true</enableCache><br />
<registryRoot>/</registryRoot><br /><br /> <dbConfig
name="wso2registry"><br />
<url>jdbc:h2:repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000</url><br />
<userName>wso2carbon</userName><br />
<password>wso2carbon</password><br />
<driverName>org.h2.Driver</driverName><br />
<maxActive>50</maxActive><br />
<maxWait>60000</maxWait><br /> <minIdle>5</minIdle><br />
</dbConfig></span></span></span></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm; page-break-before: always;">
<span style="font-family: Arial, sans-serif;">Lo
cambiamos para que quede así</span></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="border: 1px solid #000000; margin-bottom: 0cm; padding: 0.04cm 0.14cm;">
<span style="font-family: Courier 10 Pitch;"><span style="font-size: small;"><span lang="en-US"><currentDBConfig>wso2registry</currentDBConfig><br />
<readOnly>false</readOnly><br />
<enableCache>true</enableCache><br />
<registryRoot>/</registryRoot><br /><br /> <dbConfig
name="wso2registry"><br />
<url>jdbc:mysql://localhost:3306/registryDB</url><br />
<userName>wso2_reg_user</userName><br />
<password>wso2_reg_pass</password><br />
<driverName>com.mysql.jdbc.Driver</driverName><br />
<maxActive>50</maxActive><br />
<maxWait>60000</maxWait><br /> <minIdle>5</minIdle><br />
</dbConfig></span></span></span></div>
<div style="margin-bottom: 0cm; page-break-before: always;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;">El
segundo paso es configurar WSO2 ESB para que use este registro tanto
para la configuración de ESB, como para el Governance.</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;">El
primero de ellos nos provee una manera sencilla de distribuir la
configuración en un cluster de varios nodos WSO2 ESB. El segundo de
ellos es el catalogo de servicios que queremos que sea único. El
fichero a editar es el mismo del punto anterior.</span></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;">Para
la configuración del Registry centralizado necesitamos por un lado
mantener un currentDBConfig local que guarde información relativa a
la instancia. Por otro lado necesitamos declarar otro dbConfig que
apunte a la base de datos del Governance Registry, y un
remoteInstance apuntanto al carbon del Governance Registry y
vinculado a su dbConfig. Por ultimo necesitamos establecer los puntos
de montaje de estos recursos externos al ESB. Así quedaría el
fichero completo</span><br />
<br />
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="border: 1px solid rgb(0, 0, 0); margin-bottom: 0cm; padding: 0.04cm 0.14cm;">
<br />
<span style="font-family: "Courier New",Courier,monospace;"><wso2registry></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><currentDBConfig>wso2registry</currentDBConfig></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <readOnly>false</readOnly></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <enableCache>true</enableCache></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <registryRoot>/</registryRoot></span><br />
<br />
<span style="font-family: Arial, sans-serif;"><span style="font-family: Courier 10 Pitch;"><span style="font-size: small;"><span lang="en-US"><dbConfig
name="wso2registry"><br />
<url>jdbc:mysql://localhost:3306/esbDB</url><br />
<userName>wso2_esb_user</userName><br />
<password>wso2_esb_pass</password><br />
<driverName>com.mysql.jdbc.Driver</driverName><br />
<maxActive>50</maxActive><br />
<maxWait>60000</maxWait><br /> <minIdle>5</minIdle><br />
</dbConfig></span></span></span> </span><br />
<span style="font-family: Arial, sans-serif;"><br /></span>
<span style="font-family: "Courier New",Courier,monospace;"><dbConfig name="configgovregistry"></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <url>jdbc:mysql://localhost:3306/registrydb</url></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <userName>regadmin</userName></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <password>regadmin</password></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <driverName>com.mysql.jdbc.Driver</driverName></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <maxActive>50</maxActive></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <maxWait>60000</maxWait></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <minIdle>5</minIdle></span><br />
<span style="font-family: "Courier New",Courier,monospace;"></dbConfig></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><br /><remoteInstance url="https://localhost:9443/registry"></span>
<br />
<span style="font-family: "Courier New",Courier,monospace;"> <id>configgov</id></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <dbConfig>configgovregistry</dbConfig></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <readOnly>false</readOnly></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <enableCache>true</enableCache></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <registryRoot>/</registryRoot></span><br />
<span style="font-family: "Courier New",Courier,monospace;"></remoteInstance></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><br /><mount path="/_system/config" overwrite="true"></span>
<br />
<span style="font-family: "Courier New",Courier,monospace;"> <instanceId>configgov</instanceId></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <targetPath>/_system/config</targetPath></span><br />
<span style="font-family: "Courier New",Courier,monospace;"></mount></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><br /><mount path="/_system/governance" overwrite="true"></span>
<br />
<span style="font-family: "Courier New",Courier,monospace;"> <instanceId>configgov</instanceId></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <targetPath>/_system/governance</targetPath></span><br />
<span style="font-family: "Courier New",Courier,monospace;"></mount></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><br /><!—esta configuración son valores por defecto que ya existen en el archive --></span>
<br />
<span style="font-family: "Courier New",Courier,monospace;"><versionResourcesOnChange>true</versionResourcesOnChange></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><br />
<staticConfiguration></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <versioningProperties>true</versioningProperties></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <versioningComments>true</versioningComments></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <versioningTags>true</versioningTags></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <versioningRatings>true</versioningRatings></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> </staticConfiguration></span><br />
<span style="font-family: "Courier New",Courier,monospace;"></wso2registry></span></div>
<br />
<br />
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;">Una
vez tenemos configurados los dos productos, tenemos que crear las base
de datos Mysql para Governance Registry y para el ESB, así como los usurarios con
permisos a ambos esquemas. Para el ESB, renombramos la carpeta
${APP_HOME}/repository/database.</span></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;">Ahora
hay que decirle a los productos de WSO2 que necesitamos crear las
tablas de nuevo en ambas bases de datos, para ello le añadimos el
parámetro –Dsetup al script de inicio de cada producto</span></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;">Arrancamos
los dos productos, primero el Governance Registry y después el ESB</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;">Nos
logamos en el ESB, y en el apartado “Browse” deberíamos de ver
las carpetas montadas (config y governance), obsérvese las flechas
azules de los recursos montados.</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9Uc3miAGGHVC33CpBCSia01Tz6_tfNMNv6XH441Gck0RoW7v_Mxd_vFwvPrZHPwp05i8w9VsWqm9CHEi5jHHj_EGmlLETCo7-yBD1FWoC2weCAW1RuPKqiVjplaoppVzXHVQoHFFMTOvj/s1600/Selecci%25C3%25B3n_002.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9Uc3miAGGHVC33CpBCSia01Tz6_tfNMNv6XH441Gck0RoW7v_Mxd_vFwvPrZHPwp05i8w9VsWqm9CHEi5jHHj_EGmlLETCo7-yBD1FWoC2weCAW1RuPKqiVjplaoppVzXHVQoHFFMTOvj/s1600/Selecci%25C3%25B3n_002.png" height="288" width="640" /></a></div>
<span style="font-family: Arial, sans-serif;"><br /></span>
<br />
<span style="font-family: Arial, sans-serif;">Si
ahora creamos un nuevo “Proxy Service” de ejemplo en WSO2 ESB,
podremos consultar el catalogo centralizado.</span></div>
<div lang="zxx" style="margin-bottom: 0cm;">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIVfy1lYgG83fajoOifw2xynNKEdVfC8_-3nN2xxEYqUftRcXRFMSUIhN5mz-2N81_KPi50iGp-5S8QecRiTGXhm6EEZrefZ9nkZSLpf2wiToZlH_c-89ikN8_rYzIHtP62panNUPNp-MT/s1600/Selecci%25C3%25B3n_003.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIVfy1lYgG83fajoOifw2xynNKEdVfC8_-3nN2xxEYqUftRcXRFMSUIhN5mz-2N81_KPi50iGp-5S8QecRiTGXhm6EEZrefZ9nkZSLpf2wiToZlH_c-89ikN8_rYzIHtP62panNUPNp-MT/s1600/Selecci%25C3%25B3n_003.png" height="327" width="640" /></a></div>
<a href="https://www.blogger.com/blogger.g?blogID=5185204251536357186" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIVfy1lYgG83fajoOifw2xynNKEdVfC8_-3nN2xxEYqUftRcXRFMSUIhN5mz-2N81_KPi50iGp-5S8QecRiTGXhm6EEZrefZ9nkZSLpf2wiToZlH_c-89ikN8_rYzIHtP62panNUPNp-MT/s1600/Selecci%25C3%25B3n_003.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9Uc3miAGGHVC33CpBCSia01Tz6_tfNMNv6XH441Gck0RoW7v_Mxd_vFwvPrZHPwp05i8w9VsWqm9CHEi5jHHj_EGmlLETCo7-yBD1FWoC2weCAW1RuPKqiVjplaoppVzXHVQoHFFMTOvj/s1600/Selecci%25C3%25B3n_002.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><br /></div>
<div lang="zxx" style="margin-bottom: 0cm;">
<a href="https://www.blogger.com/blogger.g?blogID=5185204251536357186" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIVfy1lYgG83fajoOifw2xynNKEdVfC8_-3nN2xxEYqUftRcXRFMSUIhN5mz-2N81_KPi50iGp-5S8QecRiTGXhm6EEZrefZ9nkZSLpf2wiToZlH_c-89ikN8_rYzIHtP62panNUPNp-MT/s1600/Selecci%25C3%25B3n_003.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9Uc3miAGGHVC33CpBCSia01Tz6_tfNMNv6XH441Gck0RoW7v_Mxd_vFwvPrZHPwp05i8w9VsWqm9CHEi5jHHj_EGmlLETCo7-yBD1FWoC2weCAW1RuPKqiVjplaoppVzXHVQoHFFMTOvj/s1600/Selecci%25C3%25B3n_002.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a>más info <a href="http://wso2.org/library/tutorials/2010/04/sharing-registry-space-across-multiple-product-instances" target="_blank">aquí</a></div>
Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0tag:blogger.com,1999:blog-5185204251536357186.post-57097366521112611342012-09-17T11:37:00.000+02:002012-09-17T11:37:22.180+02:00ModSecurity: Analizando archivos subidos con ClamAV<br />
Un Operador muy interesante de ModSecurity es
<b>@inspectFile</b>, nos permite pasar cada archivo interceptado a un script
que decida si aceptamos o no la petición.<br />
<div class="western">
Lo vamos a usar para analizar los archivos subidos
vía POST con ClamAV, antivirus libre que podemos encontrar en todas
las distribuciones de GNU/Linux.<br />
Con esto podemos rechazar archivos infectados entrantes en la misma transacción HTTP, impidiendo así que llegue a nuestra aplicación de backend.<br />
<br />
Empezamos instalando el software antivirus</div>
<div style="background-position: initial initial; background-repeat: initial initial; border: 1px solid rgb(0, 128, 0); margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">yum install clamav.x86_64 –enablerepo=epel</span></div>
<div class="western">
<br /></div>
<div class="western">
Después creamos un sencillo script que Devuelva
una cadena cualquiera si el archivo procesado esta infectado, la
salida de clamsacan se redirige a /dev/null para no confundir a
ModSecurity, ya que solo entiende que la cosa ha ido bien si el
script no devuelve nada.</div>
<div style="background-position: initial initial; background-repeat: initial initial; border: 1px solid rgb(0, 128, 0); margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">vi /etc/httpd/scripts/filescan.sh<br />#!/bin/sh
<br />/usr/bin/clamscan $1 > /dev/null 2>&1 <br />if [ "$?"
-eq "1" ]; then <br />echo "An infected file was found!"
<br />fi </span>
</div>
<div class="western">
<br /></div>
<div class="western">
Para poder interceptar los ficheros subidos vía
POST, tenemos que definir primero estas tres directivas de
configuración global de modsecurity.
</div>
<div style="background-position: initial initial; background-repeat: initial initial; border: 1px solid rgb(0, 128, 0); margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">RequestBodyBuffering on <br />SecUploadDir /tmp/modsec
urity<br />SecTmpDir /tmp/modsec urity</span></div>
<div class="western">
Después definimos una nueva regla
</div>
<div style="background-position: initial initial; background-repeat: initial initial; border: 1px solid rgb(0, 128, 0); margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">SecRule FILES_TMPNAMES "@inspectFile
/etc/httpd/scripts/filescan.sh" "phase:2,deny,status:418"</span></div>
<div class="western">
Con esto nos aseguramos de que la regla esta
funcionando al poderla diferenciar de otros códigos de estado de
respuesta.<br />
Podéis echar un ojo más profundamente a ModSecurity en este <a href="http://maculi33.blogspot.com.es/2012/08/mod-security.html" target="_blank">post</a>.<br />
<br /></div>
Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0tag:blogger.com,1999:blog-5185204251536357186.post-44483381901848749072012-09-14T20:30:00.001+02:002012-09-15T20:00:10.812+02:00Log Monitoring with Graylog2<h1 class="western">
</h1>
<h2 class="western">
Introducción</h2>
<div class="western">
Graylog2 es un sistema Open Source (GPLv3) que nos
permite centralizar los logs de sistemas afines para facilitar el
análisis en tiempo real de nuestros sistemas.
</div>
<div class="western">
Esta compuesto de un servidor Java que recibe y
almacena los logs, y una interfaz web construida sobre el framework
<a href="http://rubyonrails.org/">Ruby On Rails</a>.</div>
<div class="western">
En las guías existentes en la <a href="https://github.com/Graylog2/graylog2-server/wiki">wiki</a>
de hithub se hace uso de <a href="http://www.modrails.com/">Passenger</a>
para exponer la aplicación Web bien a través de Apache, bien usando
Nginx. Yo he preferido usar el Apache que ya tenía funcionando en
localhost.</div>
<div class="western">
Una vez tenemos el sistema funcionando tenemos que
redirigir los logs de los sistemas críticos de todos nuestros
servidores al graylog2-server, este los va almacenando en una base de
datos (MonogoDB NoSQL). Por otro lado la aplicación web se contecta
directamente a la base de datos, y muestra los registros uno a uno,
como si de un solo log se tratára. También nos provee de
herramientas suficientes para hacer búsquedas muy flexibles
(elasticsearch).
</div>
<div class="western">
Otra cosa que cabe destacar son los “streams”,
o búsquedas guardadas, de las que podemos recibir alertas,
sindicarnos, y dar a acceso a otros.
</div>
<div class="western">
Por ejemplo podríamos crear un stream
“Errores_Apache” que buscará la cadena “Error” en todos los
mensajes provenientes del servidor Apache, cuya facility sea
“local1”, suponiendo que es esa la que hemos configurado. Después
prodríamos crear un usuario con acceso solo a la consulta de ese
“stream”.
</div>
<div class="western">
Basta ya de dejar a los developers tocar tu
servidor! :P</div>
<div class="western">
Estos son los pasos que he seguido para instalarlo
en un CentOS 6.3 x86_64.<br />
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtwSzk-6iKCq7xVSy0SxSgozlxN0TpYrntsBkAAp8kJEmwDqeK6-CoZuljmEZIo91Rg3tqflyW8KGA8t-ku76V2Kb-6pVMckYPTRkJPSTcbTbR7gJHwlE4QmrEFgXhrox7y6KvowTtg79W/s1600/Selecci%C3%B3n_005.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="403" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtwSzk-6iKCq7xVSy0SxSgozlxN0TpYrntsBkAAp8kJEmwDqeK6-CoZuljmEZIo91Rg3tqflyW8KGA8t-ku76V2Kb-6pVMckYPTRkJPSTcbTbR7gJHwlE4QmrEFgXhrox7y6KvowTtg79W/s640/Selecci%C3%B3n_005.png" width="640" /></a></div>
<h2 class="western">
</h2>
<h2 class="western">
Instalación de elasticsearch</h2>
<div class="western">
Graylog usa elasticsearch para dotar al sistema de
un potente sistema de búsqueda. Como casi siempre es nuestro amigo
lucene el que esta debajo...</div>
<div class="western">
En el momento de redactar esto la versión estable
es 0.19.9</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-family: Times,"Times New Roman",serif;"><span style="font-size: small;"><code class="western">c</code><code class="western">d
/opt</code><code class="western"><br />curl
<a href="http://cloud.github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz">http://cloud.github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.1</a></code><code class="western"><a href="http://cloud.github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz">9</a></code><code class="western"><a href="http://cloud.github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz">.</a></code><code class="western"><a href="http://cloud.github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz">9</a></code><code class="western"><a href="http://cloud.github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz">.tar.gz</a>
| tar zxv<br />ln -s elasticsearch-0.18.7/ elasticsearch</code></span></span></div>
<div class="western">
<code class="western"><span style="font-family: Courier 10 Pitch;">Después nos
descargamos su service wrapper y lo instalamos</span></code></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><code class="western">curl
-k -L
</code><a href="https://github.com/elasticsearch/elasticsearch-servicewrapper/zipball/master">https://github.com/elasticsearch/elasticsearch-servicewrapper/zipball/master</a><br /><span style="font-size: small;">cp
-R service/
/opt/elasticsearch/bin/</span></span></span><br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span><br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><code class="western">/opt/elasticsearch/bin/service/elasticsearch
install</code></span></span></div>
<div class="western">
Editamos el archivo de configuración y cambiamos cluster.name</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><code class="western">/opt/elasticsearch/config/elasticsearch.yml</code><code class="western"><br /></code><code class="western">cluster.name:
graylog2</code></span></span></div>
<div class="western">
Arrancamos y registramos el servicio</div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">/etc/init.d/elasticsearch start<br />chkconfig
elasticsearch on</span></div>
<div class="western">
Comprobaciones</div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">netstat -lpnt | grep :9200<br />cp 0 0 :::9200
:::* LISTEN 1383/java</span></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">curl
-XGET '<a href="http://localhost:9200/_cluster/health?pretty=true">http://localhost:9200/_cluster/health?pretty=true</a>'
<br />{<br /> "cluster_name" : "graylog2", <br />
"status" : "yellow", <br /> "timed_out"
: false, <br /> "number_of_nodes" : 1, <br />
"number_of_data_nodes" : 1, <br /> "active_primary_shards"
: 5, <br /> "active_shards" : 5, <br /> "relocating_shards"
: 0, <br /> "initializing_shards" : 0, <br />
"unassigned_shards" : 5 </span></code></span>
</div>
<h2 class="western">
<code class="western"><span style="font-family: Courier 10 Pitch;">Instalación de
MongoDB</span></code></h2>
<div class="western">
Para la persistencia usaremos una base de datos
MonogoDB, para ello primero necesitamos añadir el repositorio de
10gen, tranqui solo tiene dos paquetes :)
</div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">vi /etc/yum.repos.d/10gen.repo<br />[10gen] <br />name=10gen
Repository
<br />baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
<br />gpgcheck=0 <br />enabled=1 </span>
</div>
<div class="western">
Instalamos el servidor
</div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">yum install mongo-10gen-server.x86_64</span></div>
<div class="western">
Y configuramos lo básico, así queda mi archivo
de configuración</div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">vi /etc/mongod.conf<br />logpath=/var/log/mongo/mongod.log
<br />logappend=true <br />fork = true <br />port = 27017
<br />dbpath=/var/lib/mongo <br />pidfilepath =
/var/run/mongodb/mongod.pid <br />auth = true <br />nohttpinterface =
false </span>
</div>
<div class="western">
Levantamos el servicio y lo registramos</div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">service mongod start<br />chkconfig mongod on</span></div>
<div class="western">
Por último creamos la base de datos que usará
graylog2</div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">mongo<br />> use admin<br />> db.addUser('admin',
'admin_password')<br />> db.auth('admin', 'admin_password')<br />>
use graylog2<br />> db.addUser(“login”, “password”)<br /><code class="western"><span style="font-family: Courier 10 Pitch;">>
exit</span></code></span></div>
<div class="western">
<br />
<br /></div>
<div class="western">
TIP: Comprobar usuario de mongoDB</div>
<div class="western">
> db.system.users.find()</div>
<div class="western">
<code class="western"><a href="http://www.mongodb.org/display/DOCS/Home"><span style="font-family: Courier 10 Pitch;">http://www.mongodb.org/display/DOCS/Home</span></a></code></div>
<h2 class="western">
<code class="western">Instalación de
graylog2-server y graylog2-web</code></h2>
<div class="western">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><code class="western">Desacargamos
el servidor graylog. En el momento de escribir esto la última
versión es la 0.9.6p1</code></span></span></div>
<div class="western">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><code class="western">Estos
sencillos pasos para instalar los dos componentes</code></span></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">cd
/opt</span></code><code class="western"><span style="font-family: Courier 10 Pitch;">curl
<a href="https://github.com/downloads/Graylog2/graylog2-server/graylog2-server-0.9.6p1.tar.gz">https://github.com/downloads/Graylog2/graylog2-</a><a href="https://github.com/downloads/Graylog2/graylog2-server/graylog2-server-0.9.6p1.tar.gz">server/graylog2-server-0.9.6p1.tar.gz</a>
| tar xvf<br />ln -s /opt/graylog2-server-0.9.6p1/ graylog2-server
<br />curl
<a href="http://cloud.github.com/downloads/Graylog2/graylog2-web-interface/graylog2-web-interface-0.9.6p1.tar.gz">http://cloud.github.com/downloads/Graylog2/graylog2-web-interface/graylog2-web-interface-0.9.6p1.tar.gz</a>
| tar zxv <br />ln -s /opt/graylog2-web-interface-0.9.6p1/
graylog2-web-interface </span></code></span>
</div>
<div class="western">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">Copiamos
el archivo de configuración de ejemplo a /etc y lo editamos, este es
el contenido del mio (menos la password pájaro)</span></code></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">cp
/</span></code><code class="western"><span style="font-family: Courier 10 Pitch;">opt/graylog2-server/</span></code><code class="western"><span style="font-family: Courier 10 Pitch;">graylog2.conf.example
/etc/graylog2.conf</span></code><code class="western"><span style="font-family: Courier 10 Pitch;">vi
/etc/graylog2.conf</span></code></span></div>
<div class="western">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">Este
es el contenido de mi fichero</span></code></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">syslog_listen_port
= 514 <br />syslog_protocol = udp <br />elasticsearch_url =
http://localhost:9200/ <br />elasticsearch_index_name = graylog2
<br />force_syslog_rdns = false <br />allow_override_syslog_date = true
<br />mongodb_useauth = true <br />mongodb_user = graylog2
<br />mongodb_password = graylog_password <br />mongodb_host = localhost
<br />mongodb_database = graylog2 <br />mongodb_port = 27017
<br />mq_batch_size = 4000 <br />mq_poll_freq = 1 <br />mq_max_size = 0
<br />mongodb_max_connections = 100
<br />mongodb_threads_allowed_to_block_multiplier = 5 <br />use_gelf =
true <br />gelf_listen_address = 0.0.0.0 <br />gelf_listen_port = 12201
<br />amqp_enabled = false <br />amqp_subscribed_queues =
somequeue1:gelf,somequeue2:gelf,somequeue3:syslog <br />amqp_host =
localhost <br />amqp_port = 5672 <br />amqp_username = guest
<br />amqp_password = guest <br />amqp_virtualhost = /
<br />forwarder_loggly_timeout = 3 </span></code></span>
</div>
<div class="western">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">También
necesitamos un script de inicio </span></code></span>
</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">vi /etc/init.d/graylog2-server</span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">#!/bin/sh</span></code><code class="western"><span style="font-family: Courier 10 Pitch;">#<br />#
graylog2-server: graylog2 message collector<br />#<br /># chkconfig: -
98 02<br /># description: This daemon listens for syslog and GELF
messages and stores them in mongodb<br />#<br />CMD=$1<br />NOHUP=`which
nohup`<br />JAVA_HOME=/usr/java/latest<br />JAVA_CMD=$JAVA_HOME/bin/java<br />GRAYLOG2_SERVER_HOME=/opt/graylog2-server<br /><br />start()
{<br /> echo "Starting graylog2-server …"<br />
$NOHUP $JAVA_CMD -jar $GRAYLOG2_SERVER_HOME/graylog2- server.jar >
/var/log/graylog2.log 2>&1 &<br />}<br /><br />stop() {<br />
PID=`cat /tmp/graylog2.pid`<br /> echo "Stopping
graylog2-server ($PID) …"<br /> kill $PID<br />}<br /><br />restart()
{<br /> echo "Restarting graylog2-server …"<br /> stop<br />
start<br />}<br /><br />case "$CMD" in<br /> start)<br />
start<br /> ;;<br /> stop)<br /> stop<br /> ;;<br />
restart)<br /> restart<br /> ;;<br /> *)<br /> echo
"Usage $0 {start|stop|restart}"<br /> RETVAL=1<br />esac</span></code></span></div>
<div class="western">
<span style="font-size: small;">Y como siempre, registramos y arrancamos el
servicio</span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">chmod +x /etc/init.d/graylog2-server<br />chkconfig –add
graylog2-server<br />chkconfig graylog2-server on<br />service
graylog2-server start</span></div>
<h2 class="western">
<span style="font-size: small;">
Instalación de Ruby on Rails</span></h2>
<div class="western">
<span style="font-size: small;">Primero necesitamos algunos paquetes
</span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">yum
install -y gcc-c++ patch readline readline-devel zlib zlib-devel
libyaml-devel libffi-devel openssl-devel curl-devel</span></code></span></div>
<div class="western">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">Después
nos descargamos RVM, lo podemos instalar a partir de este script</span></code></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;"><a href="https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer">https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer</a>)</span></code></span></div>
<div class="western">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">Ya
podemos instalar Ruby, en concreto la versión 1.9.2</span></code></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">rvm
install 1.9.2</span></code></span></div>
<div class="western">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">Y
preparamos la interfaz web para su ejecución</span></code></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">chown
-R graylog2:graylog2 /opt/graylog2-web-interface*<br />usermod -G rvm
root<br />rvm use 1.9.2<br />cd /opt/graylog2-web-interface<br />gem
install bundler<br />bundle install</span></code></span></div>
<div class="western">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">También
tenemos que configurar la conexión a la base de datos en la
configuración de graylog2-web</span></code></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">vim
/opt/graylog2-web-interface/config/mongoid.yml<br />production:<br />
host: localhost<br /> port: 27017<br /> username: </span></code><code class="western"><span style="font-family: Courier 10 Pitch;">graylog2_user</span></code><code class="western"><span style="font-family: Courier 10 Pitch;">
password: </span></code><code class="western"><span style="font-family: Courier 10 Pitch;">graylog2_password</span></code><code class="western"><span style="font-family: Courier 10 Pitch;">
database: graylog2</span></code></span></div>
<div class="western">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">Si
queremos probar con Nginx podemos usar estos comandos</span></code></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">Arranque
con Nginx</span></code><code class="western"><span style="font-family: Courier 10 Pitch;">su
– graylog2<br />rvm use 1.9.2<br />RAILS_ENV=production script/rails
server</span></code><code class="western"><a href="http://localhost:3000/"><span style="font-family: Courier 10 Pitch;">http://localhost:3000</span></a></code></span></div>
<div class="western">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">Finalmente
instalamos passenger, y passenger-install-apache2</span></code></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">yum
-y install curl-devel</span></code><code class="western"><span style="font-family: Courier 10 Pitch;">rvm
use 1.9.2<br />gem install passenger<br />gem install
file-tail</span></code><code class="western"><span style="font-family: Courier 10 Pitch;">passenger-install-apache2-module</span></code></span></div>
<div class="western">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">Ahora
en el vhost que consideremos adecuado metemos esto, lógicamente solo
me ocupo de lo básico, se puede complicar todo lo que se quiera...</span></code></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;"><VirtualHost
*:80><br /> ServerName graylog2_server <br />
DocumentRoot "/opt/graylog2-web-interface/public" <br />
LoadModule passenger_module
/usr/local/rvm/gems/ruby-1.9.2-p320/gems/passenger-3.0.17/ext/apache2/mod_passenger.so
<br /> PassengerRoot
/usr/local/rvm/gems/ruby-1.9.2-p320/gems/passenger-3.0.17 <br />
PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.2-p320/ruby <br /><br />
<Directory "/opt/graylog2-web-interface/public">
<br /> AllowOverride all <br /> Options
-MultiViews <br /> Order deny,allow <br />
Allow from all <br /> </Directory> <br /></VirtualHost>
</span></code></span>
</div>
<div class="western">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">Con
esto tenemos el sistema preparado para recibir los registros de todos
los logs de nuestra infraestructura, una vez nuestro firewall lo
permita.</span></code></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">iptables
-A INPUT -m state --state NEW -m udp -p udp --dport 514 -j ACCEPT</span></code></span></div>
<div class="western">
<span style="font-size: small;"><br /></span>
<span style="font-size: small;"><br /></span></div>
<h2 class="western">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">Forward
de syslog</span></code></span></h2>
<div class="western">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">Ahora
en los servidores tenemos que configurar rsyslog para que reenvíe
todo al graylog2-server. </span></code></span>
</div>
<div class="western">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">En
</span></code><code class="western"><span style="font-family: Courier 10 Pitch;">/etc/rsyslog.conf
</span></code><code class="western"><span style="font-family: Courier 10 Pitch;">añadimos
esto al final del fichero</span></code></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">$WorkDirectory
/var/spppl/rsyslog<br />$ActionQueueFileName fwdRule1
<br />$ActionQueueMaxDiskSpace 1g <br />$ActionQueueSaveOnShutdown on
<br />$ActionQueueType LinkedList <br />$ActionResumeRetryCount -1
<br />*.* @graylog</span></code><code class="western"><span style="font-family: Courier 10 Pitch;">2-</span></code><code class="western"><span style="font-family: Courier 10 Pitch;">server:514
</span></code></span>
</div>
<div class="western">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">Podríamos
</span></code><code class="western"><span style="font-family: Courier 10 Pitch;">poner
solo la ultima linea, pero así perderíamos los registros cuando
graylog2-server este parado. De esta forma almacenamos hasta un
máximo de 1GB que se enviarán asíncronamente cuando el servicio
este de nuevo disponible. Después de ese giga, los mensajes siguen
la lógica de LILO</span></code></span></div>
<div class="western">
<span style="font-size: small;"><br /></span>
<span style="font-size: small;"><br /></span></div>
<div class="western">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">TIP</span></code></span></div>
<div class="western">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;">(*.*
@@graylog2-server para TCP)</span></code></span></div>
<h2 class="western">
<span style="font-size: small;">
Apache Logs to Syslog</span></h2>
<div class="western">
<span style="font-size: small;">Una de las primeras cosas que deberemos hacer es
configurar nuestro(s) Apache para que registre los Errores y Accesos
en syslog, de forma que terminen en graylog2-server.+</span></div>
<div class="western">
<span style="font-size: small;"><br /></span>
<span style="font-size: small;"><br /></span></div>
<div class="western">
<span style="font-size: small;">Para el ErrorLog lo tenemos fácil, solo hay que
adaptar la directiva de esta manera</span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">ErrorLog syslog:local1</span></div>
<div class="western">
<span style="font-size: small;">En este caso hemos seleccionado local1 como
facility</span></div>
<div class="western">
<span style="font-size: small;">Para los accesos podemos usar un scritp en Perl
que se encuentra fácil por internet, no somos los primeros que
hacemos esto :(</span></div>
<div class="western">
<span style="font-size: small;"><a href="http://www.oreillynet.com/pub/a/sysadmin/2006/10/12/httpd-syslog.html">http://www.oreillynet.com/pub/a/sysadmin/2006/10/12/httpd-syslog.html</a></span></div>
<div class="western">
<span style="font-size: small;"><br /></span>
<span style="font-size: small;"><br /></span></div>
<div class="western">
<span style="font-size: small;">vi /etc/httpd/scripts/apache_syslog</span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">#!/usr/bin/perl <br /> use Sys::Syslog qw( :DEFAULT
setlogsock ); <br /> setlogsock('unix'); <br /> openlog('apache',
'cons', 'pid', 'local2'); <br /><br /> while ($log = <STDIN>) {
<br /> syslog('notice', $log); <br /> } <br />
closelog </span>
</div>
<div class="western">
<span style="font-size: small;">La linea en el Apache queda así
</span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">CustomLog “| /etc/httpd/scripts/apache_syslog”
combined</span></div>
<div class="western">
<span style="font-size: small;">Lógicamente podemos usar cualquier formato, en
este caso he elegido el más común combined.</span></div>
<div class="western">
<span style="font-size: small;"><br /></span>
<span style="font-size: small;"><br /></span></div>
<div class="western">
<span style="font-size: small;">Para que funcione el script necesitamos Perl y el
módulo Sys:Syslog, lo podemos instalar con CPAN</span></div>
<div class="western">
<span style="font-size: small;"><br /></span>
<span style="font-size: small;"><br /></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">yum install perl-CPAN.x86_64<br />pan[1]> install
Sys:Syslog <br />pan[1]> install YAML</span></div>
<div class="western">
<span style="font-size: small;"><br /></span>
<span style="font-size: small;"><br /></span></div>
<div class="western">
<span style="font-size: small;">Si todo ha ido bien tendremos las entradas de los
logs de Apache en graylog2-server, aquí podemos ver los robots de
google trackendo la web de Konosys.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmCiPeSbEDOYYWMube9uwEubK_h7bLgZ5TGRViNStiCq3GOurAfRcII0HAhnuJdIAGjIkgLKU-2eaOZWXacqGOUvhjCR1ZhAwvxVSAxmm60IP5nJxefE-OzO9We68gEGArhoiT8MSIwKgb/s1600/Selecci%25C3%25B3n_004.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmCiPeSbEDOYYWMube9uwEubK_h7bLgZ5TGRViNStiCq3GOurAfRcII0HAhnuJdIAGjIkgLKU-2eaOZWXacqGOUvhjCR1ZhAwvxVSAxmm60IP5nJxefE-OzO9We68gEGArhoiT8MSIwKgb/s640/Selecci%25C3%25B3n_004.png" width="640" /></a></span></div>
<div class="western">
<span style="font-size: small;"><br /></span>
<span style="font-size: small;"><br /></span></div>
<div class="western">
<span style="font-size: small;">Recordar que se puede elegir añadir un log más
al proceso de Apache, para registrar en syslog y de esa manera lo
tendremos en ambos sitios. También podemos reemplazar uno por otro y
solo tenerlo en syslog. Up to you!</span></div>
<div class="western">
<span style="font-size: small;">Queda pendiente redactar como he configurado
Apache Tomcat para registrar también en syslog, y también exponer
un poco la potencia de los streams.
</span></div>
Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0tag:blogger.com,1999:blog-5185204251536357186.post-77538526861184625972012-09-07T12:52:00.002+02:002012-09-07T13:01:56.379+02:00Instalación de los portlets de Konakart en Liferay 6.1.1 sobre Websphere 7<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
H1 { margin-bottom: 0.21cm }
H1.western { font-family: "Liberation Sans", sans-serif; font-size: 16pt }
H1.cjk { font-family: "WenQuanYi Zen Hei Sharp"; font-size: 16pt }
H1.ctl { font-family: "Lohit Devanagari"; font-size: 16pt }
H2 { margin-bottom: 0.21cm }
H2.western { font-family: "Liberation Sans", sans-serif; font-size: 14pt; font-style: italic }
H2.cjk { font-family: "WenQuanYi Zen Hei Sharp"; font-size: 14pt; font-style: italic }
H2.ctl { font-family: "Lohit Devanagari"; font-size: 14pt; font-style: italic }
PRE.cjk { font-family: "WenQuanYi Zen Hei", monospace }
A:link { so-language: zxx }
-->
</style>
<br />
<h2 class="western">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__2302_1787311003"></a>Generar
el WAR del portlet
</h2>
Ejecutamos la siguiente instrucción ant<br />
<div style="margin-bottom: 0cm;">
<br /></div>
<pre class="western">${KONAKART_HOME}\custom\bin\ant.bat make_liferay_portlet_war
</pre>
<h2 class="western">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__2304_1787311003"></a>Crear
proyecto en Eclipse</h2>
Importamos el WAR en un Eclipse JEE
<br />
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
Instalamos la JRE embebida del WAS en
"Instaled JREs" y la asociamos al proyecto.
</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm; page-break-before: always;">
Cambiamos el
nivel de java a 1.6 en Java Facets, dentro de las propiedades del
proyecto.
</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
También seguimos las instrucciones de
este enlace para evitar un bug de eclipse en la validación jquery
</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<a href="http://imwill.com/eclipse-java-ee-jquery-validation-error-workaround/#.UD8rt6BqGZk">http://imwill.com/eclipse-java-ee-jquery-validation-error-workaround/#.UD8rt6BqGZk</a>
</div>
<div style="margin-bottom: 0cm;">
</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<h2 class="western">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__2306_1787311003"></a>Web.xml
</h2>
<div style="margin-bottom: 0cm;">
El web.xml lo debemos de adaptar para
el correcto funcionamiento del portlet, primero cambiamos la cabecera
</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<pre class="western"><?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4"></pre>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
</div>
<div style="margin-bottom: 0cm;">
Después definimos un context-param y
un listener</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<pre class="western"><context-param>
<param-name>com.ibm.websphere.portletcontainer.PortletDeploymentEnabled</param-name>
<param-value>false</param-value>
</context-param>
<listener>
<listener-class>com.liferay.portal.kernel.servlet.PortletContextListener</listener-class>
</listener></pre>
<div style="margin-bottom: 0cm;">
</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
Por último debemos de englobar todos
los taglib en una etiqueta jsp-config, quedando así</div>
<pre class="western"><jsp-config>
<taglib>
<taglib-uri>/tags/app</taglib-uri>
<taglib-location>/WEB-INF/app.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-html</taglib-uri>
<taglib-location>/WEB-INF/struts-portlet-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-logic</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-nested</taglib-uri>
<taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-tiles</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-layout</taglib-uri>
<taglib-location>/WEB-INF/struts-layout.tld</taglib-location>
</taglib>
</jsp-config></pre>
<pre class="western"> </pre>
A modo de guía esta es el orden en el que Websphere espera
encontrarse las etiquetas<br />
<div style="margin-bottom: 0cm;">
<br /></div>
<pre class="western"><!ELEMENT web-app (icon?, display-name?, description?, distributable?, context-param*, filter*,
filter-mapping*, listener*, servlet*, servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?,
error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*, login-config?,
security-role*, env-entry*, ejb-ref*, ejb-local-ref*)>
</pre>
<h2 class="western" style="page-break-before: always;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__2416_1787311003"></a>Configuración del
Portlet</h2>
Este Portlet lo estamos desplegando como ejemplo de como acceder a
los servicios de Konakart desde Liferay, sin embargo tal y como viene
preparado levanta un Konakart Storefront completo, lo que quiere
decir que es una tienda autónoma de por si.<br />
Dentro del WEB-INF/classes tenemos 3 archivos que editar<br />
1 - konakat.properties<br />
<pre class="western"></pre>
2 - konakart_axis_client.properties<br />
3 - server-config.wsdd<br />
<br />
<h2 class="western">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__2310_1787311003"></a>Despliegue
del Portlet en Liferay</h2>
<div class="western">
Para que funcione el hot-deploy de Liferay seguimos este <a href="http://maculi33.blogspot.com.es/2012/09/configuracion-del-hot-deploy-de-liferay.html" target="_blank">post</a>. </div>
Botón derecho sobre el proyecto y exportamos el WAR. Una vez
termine copiamos el WAR en
<br />
<div style="margin-bottom: 0cm;">
<br /></div>
<pre class="western">${LIFERAY_HOME}/deploy
</pre>
<div style="margin-bottom: 0cm;">
Esperamos unos minutos hasta que termine de desplegarse, el progreso
del mismo lo podemos ver en
</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<pre class="western">${WAS_PROFILE_HOME}/logs/server1/SystemOut.log</pre>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisT05ll-mtfn7p3gYGsO288JbCHHG0OrB1yZb7LWGh7wEQez0bmiXeEphuJaVJR-brxWRsv7vChyTt_2obI3aaf2zzkG9zvip1pVT3Ndq5Zfix2LGUdFYpSWMnEZT2ZhJ1m6rYpRfSwRK1/s1600/Selecci%25C3%25B3n_001.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="328" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisT05ll-mtfn7p3gYGsO288JbCHHG0OrB1yZb7LWGh7wEQez0bmiXeEphuJaVJR-brxWRsv7vChyTt_2obI3aaf2zzkG9zvip1pVT3Ndq5Zfix2LGUdFYpSWMnEZT2ZhJ1m6rYpRfSwRK1/s640/Selecci%25C3%25B3n_001.png" width="640" /></a></div>
<br />
<div style="margin-bottom: 0cm;">
<br /></div>
Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0tag:blogger.com,1999:blog-5185204251536357186.post-89803889387537848652012-09-07T12:48:00.004+02:002012-11-19T20:29:07.080+01:00Instalación de Konakart 6.3.0.0 sobre Websphere 7<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
H1 { margin-bottom: 0.21cm }
H1.western { font-family: "Liberation Sans", sans-serif; font-size: 16pt }
H1.cjk { font-family: "WenQuanYi Zen Hei Sharp"; font-size: 16pt }
H1.ctl { font-family: "Lohit Devanagari"; font-size: 16pt }
H2 { margin-bottom: 0.21cm }
H2.western { font-family: "Liberation Sans", sans-serif; font-size: 14pt; font-style: italic }
H2.cjk { font-family: "WenQuanYi Zen Hei Sharp"; font-size: 14pt; font-style: italic }
H2.ctl { font-family: "Lohit Devanagari"; font-size: 14pt; font-style: italic }
PRE.cjk { font-family: "WenQuanYi Zen Hei", monospace }
H3 { margin-bottom: 0.21cm }
H3.western { font-family: "Liberation Sans", sans-serif }
H3.cjk { font-family: "WenQuanYi Zen Hei Sharp" }
H3.ctl { font-family: "Lohit Devanagari" }
A:link { so-language: zxx }
</style>
-->
<br />
<h2 style="margin-bottom: 0cm; page-break-before: always;">
Introducción</h2>
<div style="margin-bottom: 0cm; page-break-before: always;">
<br /></div>
<div style="margin-bottom: 0cm; page-break-before: always;">
Konakart es una plataforma E-commerce que en su versión libre ofrece muchas funciones que la hacen una buena elección para construir portales comerciales.</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<h2 class="western">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__125_399326845"></a>Descarga
del producto</h2>
<br />
<br />
<pre class="western"><a href="http://www.konakart.com/">http://www.konakart.com</a></pre>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
Descargamos la distribución en formato zip para hacer una
instalación manual , Konakart dispone de un instalador pero no esta
preparado para WAS, actualmente la versión es 6.3.0.0</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<h2 class="western">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__127_399326845"></a>Preparación
de Konakart</h2>
<h2 class="western">
</h2>
<div style="margin-bottom: 0cm;">
Descomprimimos el ZIP en un directorio
que a partir de ahora llamaremos
</div>
<div style="margin-bottom: 0cm;">
${KONAKART_HOME}</div>
<div style="margin-bottom: 0cm;">
</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
Dentro de la carpeta custom tenemos las
herramientas necesarias para montar los WAR, el EAR y los Portlets de
Konakart para Liferay. Podemos examinar el
</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<pre class="western">${KONAKART_HOME}/custom/build.xml </pre>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
para una primera impresión de lo que
podemos hacer.</div>
<h2 class="western">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__129_399326845"></a>Base de
datos de konakart
</h2>
<div style="margin-bottom: 0cm;">
Para propósito de test ejecutamos
${KONAKART_HOME}/database/Oracle/script konakart_demo.sql sobre el
esquema KONAKART, esto nos crea la estructura necesaria con una
tienda de ejemplo para probar la plataforma sin necesidad de montar
la tienda.</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<h2 class="western">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__131_399326845"></a>Construcción
del EAR</h2>
<h3 class="western">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__133_399326845"></a>JARs
duplicados</h3>
<div style="margin-bottom: 0cm;">
Al tratarse de varios WARS, para que el
ZIP de la distribución sea más ligero Konakart solo incluye un
copia de algunos JARs que se requieren en más de un sitio, por lo
tanto debemos de ejecutar el script copyDuplicates para copiar estos
JARS en los sitios que se requiere.</div>
<h3 class="western">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__135_399326845"></a>Pre-configuraciones
</h3>
Como ya hemos dicho el directorio custom contiene todo lo
necesario para construir lo que necesitamos, pero hay que adaptar
primero la configuración por defecto de la aplicación en
<br />
<pre class="western">${KONAKART_HOME}/webapps</pre>
<pre class="western"> </pre>
<div style="margin-bottom: 0cm;">
A continuación se enumeran los archivos a editar para configurar puertos y conexión a la base de datos.</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<pre class="western"><span style="font-family: inherit;"><span style="font-size: small;">1- ${KONAKART_HOME}\webapps\konakart\WEB-INF\classes\konakart.properties
</span></span></pre>
<pre class="western">2 - ${KONAKART_HOME}\webapps\konakartadmin\WEB-INF\classes\konakartadmin.properties
3 - ${KONAKART_HOME}\webapps\konakart\WEB-INF\classes\konakart_axis_client.properties </pre>
<span style="font-size: small;"><span style="font-family: inherit;"></span></span><br />
<div style="margin-bottom: 0cm;">
</div>
<pre class="western"></pre>
<div style="margin-bottom: 0cm;">
<br /></div>
<pre class="western">4 - ${KONAKART_HOME}\webapps\konakartadmin\WEB-INF\classes\konakartadmin_axis_client.properties </pre>
<div style="margin-bottom: 0cm;">
</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<pre class="western">5 - ${KONAKART_HOME}\webapps\konakart\WEB-INF\server-config.wsdd </pre>
<pre class="western"> </pre>
<pre class="western">Este fichero contiene declaración de servicios, buscamos KKWebServiceEng y cambiamos el</pre>
<pre class="western">valor de AllowedMethods a "*".</pre>
<pre class="western"> </pre>
<pre class="western">6 - ${KONAKART_HOME}\webapps\konakartadmin\WEB-INF\server-config.wsdd </pre>
<pre class="western"> </pre>
<pre class="western">Este fichero contiene declaración de servicios, buscamos KKWSAdmin y cambiamos el</pre>
<pre class="western">valor de AllowedMethods a "*".</pre>
<div style="margin-bottom: 0cm;">
<br /></div>
<h3 class="western">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__137_399326845"></a>Generar
el EAR
</h3>
<div style="margin-bottom: 0cm;">
Finalmente generamos el EAR con la
siguiente instrucción ant
</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<pre class="western">${KONAKART_HOME}/custom>bin\ant.bat make_ear
</pre>
<br />
Con esto tenemos el EAR generado y preconfigurado en<br />
<br />
<br />
<pre class="western">${KONAKART_HOME}/custom/ear/konakart.ear</pre>
<div style="margin-bottom: 0cm;">
<br /></div>
<h2 class="western">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__139_399326845"></a>Instalación
del EAR</h2>
<div style="margin-bottom: 0cm;">
Instalamos el EAR recién generado como una aplicación más, no tiene ninguna peculiaridad.</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
Una vez guardada la configuración
podemos arrancar el servidor y ya podemos acceder a la tienda de
ejemplo. Si paramos la app, y cambiamos la base de datos por la
mínima, podemos montar una tienda desde 0, por ahora este entorno
nos sirve para avanzar.</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<pre class="western"><a href="http://localhost/konakart">http://localhost/konakart</a></pre>
<div style="margin-bottom: 0cm;">
<br /></div>
<pre class="western">Más información
<a href="http://www.konakart.com/docs/WebSphere.html">http://www.konakart.com/docs/WebSphere.html</a>
Konakart_User_Guide.pdf en ${KONAKART_HOME}\doc </pre>
<h2 class="western">
</h2>
<h2 class="western" style="page-break-before: always;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__141_399326845"></a>
Primeros pasos en Konakartadmin</h2>
Accedemos a la consola de administración de Konakart<br />
<pre class="western"><a href="http://localhost/konakartadmin">http://localhost/konakartadmin</a>
Super User - admin@konakart.com / princess </pre>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
En la parte superior izquierda tenemos
la pestaña de configuraciones, a continuación se muestran las
propiedades básicas a adaptar.
</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<pre class="western">Configuration - Store Configuration - Store Base URL
Configuration - Store Configuration - Konakart Installation Home
Configuration - Images - Image Base URL
Configuration - Images - Image Base path
Configuration - Shipping / Packing - Exported Orders Directory
Configuration - Logging - Konakart Log file Directory
Configuration - Email Options - ALL (adaptar en producción)
Configuration - HTTP / HTTPS - Adaptamos los puertos HTTP y HTTPS
Configuration - Reports Configuration - Reports definitions base path
Configuration - Reports Configuration - Report Viewer URL
Configuration - Reports Configuration - Status Page Report URL
Configuration - PDF Configuration - PDF Directory
Configuration - Solr Search Engine - Base URL of Solr Search Server
Configuration - Velocity Templates - Templates Directory </pre>
<div style="margin-bottom: 0cm;">
<br /></div>
<h2 class="western">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__143_399326845"></a>Servicios
SOAP</h2>
Konakart nos ofrece una capa de Servicios Web desde la que poder
integrarse con terceras aplicaciones. El hecho de que Konakart
levante o no esta capa de servicios depende de la configuración de
server-config.wsd, que ya hemos expuesto anteriormente. Estos son los
dos WSDLs
<br />
<pre class="western"><a href="http://localhost/konakart/services/KKWebServiceEng?wsdl">http://localhost/konakart/services/KKWebServiceEng?wsdl</a>
<a href="http://localhost/konakartadmin/services/KKWSAdmin?wsdl">http://localhost/konakartadmin/services/KKWSAdmin?wsdl</a> </pre>
<br />
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<br /></div>
Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0tag:blogger.com,1999:blog-5185204251536357186.post-51027934119761214922012-09-07T12:36:00.000+02:002012-09-07T12:53:57.462+02:00Configuración del hot deploy de Liferay en Websphere 7<h2>
</h2>
<br />En Websphere no funciona el hot-deploy de los portlets según estamos<br />acostumbrados (ni por la consola de administración, ni manualmente a<br />través de la carpeta deploy.<br />Esta carpeta se encuentra por defecto en<br />
<br />${liferay.home}/deploy<br />
<br />Donde podemos copiar portlets que se despliegan en caliente. Para hacerlo<br />funcionar, añadimos esta linea en portal-ext.properties<br />
<br />auto.deploy.dest.dir=${resource.repositories.root}/websphere-deploy<br />
<br />Después creamos la carpeta ${liferay.home}/websphere-deploy. De esta<br />forma la copiar un WAR en el directorio deploy, éste es procesado y alterado<br />por Liferay para adecuarlo al entorno, después el WAR resultante es copiado<br />en auto.deploy.dest.dir. Pasados unos instantes Websphere comenzará el<br />despliegue del WAR (portlet, tema, plugin, hook, ...) por su cuenta.Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0tag:blogger.com,1999:blog-5185204251536357186.post-134760239155970912012-08-22T12:30:00.004+02:002012-08-23T12:33:33.021+02:00Un vistazo a mod_security<h2>
Introducción</h2>
<div class="western">
Mod security es un firewall de aplicación (WAF)
que provee protección a las aplicaciones Web contra un gran número
de ataques, además de monitorizar el tráfico HTTP y analizarlo en
tiempo real. Funciona como cualquier otro módulo de Apache, un
módulo compartido binario (mod_security2.so) y archivos de
configuración.</div>
<h3>
Registro del tráfico HTTP
</h3>
<div class="western">
Apache HTTP Server incluye multitud de
funcionalidades alrededor del registro de las peticiones entrantes,
pero poco orientado a las aplicaciones web. El registro habitual de
Apache no incluye el cuerpo de la respuesta. Con ModSecurity podemos
registrar la transacción completa de la petición/respuesta, con
mucha flexibilidad para filtrar el tráfico que deseamos registrar
así como para enmascarar los campos sensibles.</div>
<h3>
Monitorización en Tiempo Real y Detección de
Ataques en base a un motor flexible de Reglas</h3>
<div class="western">
ModSecurity incorpora un motor de reglas que carga
en el arranque del proceso y que definen el funcionamiento del WAF.
Estas reglas están definidas en una sintaxis muy simple que se va
aprendiendo a medida que se examina la configuración inicial. Esta
configuración incluye las directivas básicas de configuración de
mod_security, unas reglas básicas de protección que veremos ahora,
y el <a href="https://www.owasp.org/index.php/Category:OWASP_ModSecurity_Core_Rule_Set_Project">Core
Rule set</a>,<span style="color: black;">
conjunto de reglas mantenido por OWASP.</span></div>
<div class="western">
<span style="color: black;">Con
solo estos dos comandos;</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="color: black;">yum
install mod_security --enablerepo=epel<br />service httpd restart</span></div>
<div class="western">
<span style="color: black;">Hemos
activado un firewall de aplicación, con capacidades avanzadas de
logging y un montón de reglas activadas para los tipos de ataques
más comunes que sufren las Webs, todo esto mantenido y actualizado
por un proyecto de OWASP.</span></div>
<div class="western">
<span style="color: black;">Lógicamente
esto hay que adaptarlo para cada caso en particular, pero estas
reglas son un buen punto de partida, y están extensamente
comentadas. Veamos ahora una configuración por defecto de un RedHat
6.2 una vez ejecutados los comandos anteriormente mencionados.</span></div>
<h2 class="western">
Configuración de ModSecurity</h2>
<div class="western">
La configuración de ModSecurity, análogamente
con Apache, esta organizada en <a href="http://sourceforge.net/apps/mediawiki/mod-security/index.php?title=Reference_Manual#Configuration_Directives">directivas</a>
que nos ofrecen una gran flexibilidad para abarcar cualquier tipo de
situación que se nos presente. Podemos denegar o permitir peticiones
en base muchos aspectos, por poner algunos ejemplos; el tamaño de un
fichero que se pretende subir vía POST, patrón en alguna de las
cabeceras de petición o respuesta, procedencia geográfica de la
petición, horario del día, etc, además de una combinación de
cualquiera de ellas, ya que podemos encadenar reglas como si de un
AND lógico se tratara. Esto es solo un ejemplo de las muchas cosas
que se pueden hacer con ModSecurity.</div>
<div class="western">
Antes de nada veamos la directiva que más
usaremos,
</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><code class="western"><span style="font-family: Courier 10 Pitch;"><span style="font-size: small;">SecRule
TARGET OPERATOR [ACTIONS]</span></span></code><code class="western"> </code></span>
</div>
<div class="western">
<br />
Esta directiva crea una regla comparando el valor
de la variable (o colección) TARGET con OPERATOR, y en caso de hacer
match se ejecutan las acciones, esta última parte no es obligatoria,
en caso de dejarlo en blanco aplica SecDefaultAction, directiva que
veremos más adelante que me permite establecer las acciones por
defecto.
</div>
<div class="western">
Respecto a TARGET, tenemos un gran número de
variables y colecciones a nuestra disposición. Como siempre, nos
toca examinarlas en la <a href="http://sourceforge.net/apps/mediawiki/mod-security/index.php?title=Reference_Manual#Variables">web
de referencia</a> de ModSecurity2.5.x</div>
<div class="western">
OPERATOR es también muy flexible, si no
especificamos nada, se usa @rx, esto se procesa como una regex de
Perl. Esto es lo que queremos en muchos casos, pero tenemos bastantes
más <a href="http://sourceforge.net/apps/mediawiki/mod-security/index.php?title=Reference_Manual#Operators">operadores</a>
para comparar números, incluso cadenas.</div>
<div class="western">
Te preguntarás para qué necesito un operador tal
como “@beginswith str”, cuando puedo implementar la misma regla
con “@rx ^str”. Bien el tema esta en el rendimiento. ModSecurity
incorpora estos operadores para aligerar el proceso de comparar un
gran número de cadenas. Esto depende de la carga de peticiones que
reciba el servidor en cuestión, claro esta.</div>
<div class="western">
Por último tenemos ACTIONS, como ya hemos dicho,
si queremos que la regla realice una lista de acciones distinta del
valor por defecto tenemos que especificarlo en la propia regla. Aquí
tenemos la <a href="http://sourceforge.net/apps/mediawiki/mod-security/index.php?title=Reference_Manual#Actions">lista</a>
completa de acciones que podemos realizar.
</div>
<div class="western">
No hay que memorizarlo todo, analizando las reglas
del CRS iremos viendo casi todo lo más importante.</div>
<div class="western">
<br /></div>
<div class="western">
NOTA:
</div>
<div class="western">
ModSecurity divide una transacción HTTP en 5
fases, explicadas en este cuadro.</div>
<table cellpadding="4" cellspacing="0" style="width: 643px;">
<colgroup><col width="32"></col>
<col width="144"></col>
<col width="441"></col>
</colgroup><tbody>
<tr valign="TOP">
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0.1cm;" width="32"><div class="western">
1
</div>
</td>
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0.1cm;" width="144"><div class="western">
REQUEST_HEADERS
</div>
</td>
<td style="border: 1px solid #000000; padding: 0.1cm;" width="441"><div class="western">
Después de leer las cabeceras de la petición</div>
</td>
</tr>
<tr valign="TOP">
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;" width="32"><div class="western">
2
</div>
</td>
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;" width="144"><div class="western">
REQUEST_BODY
</div>
</td>
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;" width="441"><div class="western">
Después de leer el cuerpo de la petición.
Casi todas las reglas se definen para ser procesadas en esta fase.</div>
</td>
</tr>
<tr valign="TOP">
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;" width="32"><div class="western">
3</div>
</td>
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;" width="144"><div class="western">
RESPONSE_HEADERS</div>
</td>
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;" width="441"><div class="western">
Antes de enviar las cabeceras de respuesta al
cliente.</div>
</td>
</tr>
<tr valign="TOP">
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;" width="32"><div class="western">
4
</div>
</td>
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;" width="144"><div class="western">
RESPONSE_BODY</div>
</td>
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;" width="441"><div class="western">
Antes de enviar el cuerpo de la respuesta al
cliente. En esta fase se han de programar las reglas que impidan
la fuga de información.</div>
</td>
</tr>
<tr valign="TOP">
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;" width="32"><div class="western">
5
</div>
</td>
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;" width="144"><div class="western">
LOGGING</div>
</td>
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;" width="441"><div class="western">
Antes de registrar la transacción, en esta
fase no se puede realizar ninguna acción, ya que la respuesta ya
la tiene el cliente. Solo se puede afectar al modo en que se
registra.</div>
</td>
</tr>
</tbody></table>
<div class="western">
<br />
Con esto ya podemos entender y aprender de la
configuración de CRS.</div>
<div class="western">
El siguiente paso es analizar la configuración
por defecto que nos ha creado RedHat, p<span style="color: black;">rimero
tenemos el archivo de configuración principal,
conf.d/modsecurity.conf con el contenido que veremos a continuación,
la idea es leer detenidamente todos los comentarios para ir
entendiendo lo que tenemos que cambiar en cada caso particular.</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"># Example configuration file for the mod_security Apache
module <br /><br />LoadModule security2_module modules/mod_security2.so
<br />LoadModule unique_id_module modules/mod_unique_id.so <br />
<br /><IfModule mod_security2.c> <br /><br /> # This is the
ModSecurity Core Rules Set. <br /> # Basic configuration goes in here
<br /> Include modsecurity.d/*.conf <br /> Include
modsecurity.d/base_rules/*.conf <br /> Include
modsecurity.d/modsecurity_localrules.conf <br /><br /> # Additional items
taken from new minimal modsecurity conf <br /> # Basic configuration
options <br /> SecRuleEngine On <br /> SecRequestBodyAccess On
<br /> SecResponseBodyAccess Off <br /><br /> # PCRE Tuning
<br /> SecPcreMatchLimit 1000 <br /> SecPcreMatchLimitRecursion 1000 <br />
<br /> # Handling of file uploads <br /> # TODO Choose a folder private
to Apache. <br /> # SecUploadDir /opt/apache-frontend/tmp/
<br /> SecUploadKeepFiles Off <br /> SecUploadFileLimit 10 <br /><br /> #
Debug log <br /> SecDebugLog logs/modsec_debug.log <br /> SecDebugLogLevel
0 <br /><br /> # Serial audit log <br /> SecAuditEngine RelevantOnly
<br /> SecAuditLogRelevantStatus ^5 <br /> SecAuditLogParts ABIFHZ
<br /> SecAuditLogType Serial <br /> SecAuditLog logs/modsec_audit.log
<br /><br /> # Set Data Directory <br /> SecDataDir logs/ <br /><br /> #
Maximum request body size we will <br /> # accept for buffering
<br /> SecRequestBodyLimit 131072 <br /><br /> # Store up to 128 KB in
memory <br /> SecRequestBodyInMemoryLimit 131072 <br /><br /> # Buffer
response bodies of up to <br /> # 512 KB in length
<br /> SecResponseBodyLimit 524288 <br /><br /> # Verify that we've
correctly processed the request body. <br /> # As a rule of thumb, when
failing to process a request body # you should reject the request
(when deployed in blocking mode) <br /> # or log a high-severity alert
(when deployed in detection-only mode). <br /> SecRule
REQBODY_PROCESSOR_ERROR "!@eq 0" \
<br /> "phase:2,t:none,log,deny,msg:'Failed to parse request
body.',severity:2" <br /><br /> # By default be strict with what we
accept in the multipart/form-data request body. If the rule below
proves to be # too strict for your environment consider changing it
to # detection-only. You are encouraged _not_ to remove it #
altogether. <br /> SecRule MULTIPART_STRICT_ERROR "!@eq 0" \
<br /> "phase:2,t:none,log,deny,msg:'Multipart request body \
<br /> failed strict validation: \ <br /> PE %{REQBODY_PROCESSOR_ERROR},
\ <br /> BQ %{MULTIPART_BOUNDARY_QUOTED}, \ <br /> BW
%{MULTIPART_BOUNDARY_WHITESPACE}, \ <br /> DB %{MULTIPART_DATA_BEFORE},
\ <br /> DA %{MULTIPART_DATA_AFTER}, \ <br /> HF
%{MULTIPART_HEADER_FOLDING}, \ <br /> LF %{MULTIPART_LF_LINE}, \ <br /> SM
%{MULTIPART_SEMICOLON_MISSING}, \ <br /> IQ
%{MULTIPART_INVALID_QUOTING}, \ <br /> IH
%{MULTIPART_INVALID_HEADER_FOLDING}, \ <br /> IH
%{MULTIPART_FILE_LIMIT_EXCEEDED}'" <br /><br /> # Did we see
anything that might be a boundary? <br /> SecRule
MULTIPART_UNMATCHED_BOUNDARY "!@eq 0" \
<br /> "phase:2,t:none,log,deny,msg:'Multipart parser detected a
possible unmatched boundary.'" <br /><br /> # Some internal errors
will set flags in TX and we will need to look for these. <br /> # All
of these are prefixed with "MSC_". The following flags
currently exist: <br /> # <br /> # MSC_PCRE_LIMITS_EXCEEDED: PCRE match
limits were exceeded. <br /> # <br /> SecRule TX:/^MSC_/ "!@streq 0"
\ <br /> "phase:2,t:none,deny,msg:'ModSecurity internal
error flagged: %{MATCHED_VAR_NAME}'" <br /><br /></IfModule> </span>
</div>
<div class="western">
<br />
Como podemos ver, primero se cargan los módulos
necesarios para funcionar, después se leen los archivos que componen
el CoreRuleSet (CRS) en este orden:</div>
<div class="western">
modsecurity.d/*.conf
<br />
modsecurity.d/base_rules/*.conf
<br />
modsecurity.d/modsecurity_localrules.conf
</div>
<div class="western">
Esto lo veremos en el siguiente punto, por ahora
hay que quedarse con qué el orden es importante. El modo de
funcionamiento sigue esta idea; se leen los archivos de configuración
en busca de reglas para cada fase, un total de 5 veces, cada una de
ellas solo busca las reglas de la fase en cuestión, y son procesadas
en el orden en el que se encuentran.</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">SecRuleEngine On | Off | DetectionOnly</span></div>
<div class="western">
Modo
de funcionamiento del motor de reglas. Ponerlo en Off o DetectionOnly
es útil en fase de pruebas, para ver que las reglas están
funcionando sin bloquear ninguna petición.</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">SecRequestBodyAccess On | Off</span></div>
<div class="western">
Determina si se tiene acceso o no al cuerpo de la
petición (fase 2), importante establecer a On, ya que la gran
mayoría de la reglas se procesan en esta fase.</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="color: black;">SecResponseBodyAccess
On | Off </span>
</div>
<div class="western">
<span style="color: black;">En
caso de usar reglas en la fase 4, lo establecemos a On. Las reglas de
fase 4 pretenden evitar que el servidor responda con algún tipo de
contenido inadecuado (fuga de información)</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="color: black;">SecPcreMatchLimit
1000 <br />SecPcreMatchLimitRecursion 1000 </span>
</div>
<div class="western">
Configuración de los limites de PCRE (Perl
Compatible Regular Expresion)</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="color: black;">SecUploadKeepFiles
Off <br />SecUploadFileLimit 10 </span>
</div>
<div class="western">
Define la forma en la que se procesan los archivos
subidos en un POST multipart.</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="color: black;">SecDebugLog
logs/modsec_debug.log <br />SecDebugLogLevel 0 </span>
</div>
<div class="western" style="margin-bottom: 0cm;">
<span style="color: black;">Para
depurar tenemos estos niveles</span></div>
<ul>
<li><div class="western" style="margin-bottom: 0cm;">
<span style="color: black;">0:
no logging </span>
</div>
</li>
<li><div class="western" style="margin-bottom: 0cm;">
1: errors
(intercepted requests) only
</div>
</li>
<li><div class="western" style="margin-bottom: 0cm;">
2: warnings
</div>
</li>
<li><div class="western" style="margin-bottom: 0cm;">
3: notices
</div>
</li>
<li><div class="western" style="margin-bottom: 0cm;">
4: details of how
transactions are handled
</div>
</li>
<li><div class="western" style="margin-bottom: 0cm;">
5: as above, but
including information about each piece of information handled
</div>
</li>
<li><div class="western">
9: log everything, including very detailed
debugging information
</div>
</li>
</ul>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="color: black;">SecAuditEngine
RelevantOnly | On | Off<br />SecAuditLogRelevantStatus ^5
<br />SecAuditLogParts ABIFHZ <br />SecAuditLogType Serial |
Concurrent<br />SecAuditLog logs/modsec_audit.log </span>
</div>
<div class="western">
SecAuditEngine determina qué se registra en el
log principal, por defecto solo se registran transacciones que lancen
error o warning, o que tengan un código de error relevante,
determinado por SecAuditLogRelevantStatus.</div>
<div class="western">
<br /></div>
<div class="western">
Elementos de SecAuditLogParts
</div>
<ul>
<li><div class="western">
<span style="color: black;">A:
Audit log header (mandatory). </span>
</div>
</li>
</ul>
<ul>
<li><div class="western" style="margin-bottom: 0cm;">
B: Request
headers.
</div>
</li>
<li><div class="western" style="margin-bottom: 0cm;">
C: Request body
(present only if the request body exists and ModSecurity is
configured to intercept it).
</div>
</li>
<li><div class="western" style="margin-bottom: 0cm;">
D: Reserved for
intermediary response headers; not implemented yet.
</div>
</li>
<li><div class="western" style="margin-bottom: 0cm;">
E: Intermediary
response body (present only if ModSecurity is configured to
intercept response bodies, and if the audit log engine is configured
to record it). Intermediary response body is the same as the actual
response body unless ModSecurity intercepts the intermediary
response body, in which case the actual response body will contain
the error message (either the Apache default error message, or the
ErrorDocument page).
</div>
</li>
<li><div class="western" style="margin-bottom: 0cm;">
F: Final response
headers (excluding the Date and Server headers, which are always
added by Apache in the late stage of content delivery).
</div>
</li>
<li><div class="western" style="margin-bottom: 0cm;">
G: Reserved for
the actual response body; not implemented yet.
</div>
</li>
<li><div class="western" style="margin-bottom: 0cm;">
H: Audit log
trailer.
</div>
</li>
<li><div class="western" style="margin-bottom: 0cm;">
I: This part is a
replacement for part C. It will log the same data as C in all cases
except when multipart/form-data encoding in used. In this case, it
will log a fake application/x-www-form-urlencoded body that contains
the information about parameters but not about the files. This is
handy if you don’t want to have (often large) files stored in your
audit logs.
</div>
</li>
<li><div class="western" style="margin-bottom: 0cm;">
J: This part
contains information about the files uploaded using
multipart/form-data encoding.
</div>
</li>
<li><div class="western" style="margin-bottom: 0cm;">
K: This part
contains a full list of every rule that matched (one per line) in
the order they were matched. The rules are fully qualified and will
thus show inherited actions and default operators. Supported as of
v2.5.0.
</div>
</li>
<li><div class="western">
Z: Final boundary, signifies the end of the
entry (mandatory).
</div>
</li>
</ul>
<div class="western">
Para finalizar esta sección tenemos
SecAuditLogType, que en modo serial registra la actividad en
SecAuditLog, y en modo concurrent registra cada transacción en un
fichero.</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="color: black;">SecDataDir
logs/ </span>
</div>
<div class="western">
<span style="color: black;">Ruta
para almacenar información persistente definida en Actions, etc.</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="color: black;">SecRequestBodyLimit
131072 <br />SecRequestBodyInMemoryLimit 131072 <br />SecResponseBodyLimit
524288 </span>
</div>
<div class="western">
<span style="color: black;">Limites
en tamaño de los campos HTTP de petición y respuesta.</span></div>
<div class="western">
<span style="color: black;"><br /></span></div>
<div class="western">
<span style="color: black;">Finalmente
tenemos 4 reglas básicas, ya deberíamos de entender lo que hacen
no?</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="color: black;">SecRule
REQBODY_PROCESSOR_ERROR "!@eq 0" \
<br /> "phase:2,t:none,log,deny,msg:'Failed to parse request
body.',severity:2" </span>
</div>
<div class="western">
Si hay algún error en el procesamiento del cuerpo
de la petición, denegamos y registramos el evento con baja
severidad.</div>
<div class="western">
Vemos que tenemos un OPERTATOR nuevo “!@eq 0”,
que nos comparar números, en este caso busca en la variable
REQBODY_PROCESSOR_ERROR un valor distinto de 0.</div>
<div class="western">
t:none, quiere decir que no se realizará ninguna
transformación a la petición. Las transformaciones se realizan
sobre la copia de la petición, no afecta a la petición original!
Son muy útiles para procesar los cuerpos de petición, ya que nos
permite quitar espacios, comentarios, lowercase-to-uppercasse, etc</div>
<div class="western">
<br /></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">SecRule
MULTIPART_STRICT_ERROR "!@eq 0" \
<br /> "phase:2,t:none,log,deny,msg:'Multipart request body \
<br /> failed strict validation: \ <br /> PE %{REQBODY_PROCESSOR_ERROR},
\ <br /> BQ %{MULTIPART_BOUNDARY_QUOTED}, \ <br /> BW
%{MULTIPART_BOUNDARY_WHITESPACE}, \ <br /> DB %{MULTIPART_DATA_BEFORE},
\ <br /> DA %{MULTIPART_DATA_AFTER}, \ <br /> HF
%{MULTIPART_HEADER_FOLDING}, \ <br /> LF %{MULTIPART_LF_LINE}, \ <br /> SM
%{MULTIPART_SEMICOLON_MISSING}, \ <br /> IQ
%{MULTIPART_INVALID_QUOTING}, \ <br /> IH
%{MULTIPART_INVALID_HEADER_FOLDING}, \ <br /> IH
%{MULTIPART_FILE_LIMIT_EXCEEDED}'" </span>
</div>
<div class="western">
<span style="color: black;">En
caso de error estricto en el procesamiento de una petición POST
multiparte, denegamos el acceso y registramos toda la información
relativa a la transacción.</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="color: black;">SecRule
MULTIPART_UNMATCHED_BOUNDARY "!@eq 0" \
<br /> "phase:2,t:none,log,deny,msg:'Multipart parser detected a
possible unmatched boundary.'" </span>
</div>
<div class="western">
<span style="color: black;">Si
nos pasamos de algún limite establecido a nivel de TX, denegamos el
acceso</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="color: black;">SecRule
TX:/^MSC_/ "!@streq 0" \ <br />
"phase:2,t:none,deny,msg:'ModSecurity internal error flagged:
%{MATCHED_VAR_NAME}'"</span></div>
<div class="western">
Lo errores internos por exceder algún limite en
PCRE siempre va precedido de la cadena “MSC_”, nos valemos de
esto para denegar toda petición que provoque un error de este tipo.</div>
<div class="western">
Siguiendo el orden de los Includes tenemos el
archivo que podemos llamar de configuración global de CRS
(CoreRuleSet)</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">modsecurity_crs_10_config.conf</span></div>
<div class="western">
Su contenido es el siguiente</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">#
------------------------------------------------------------- <br />#
Core ModSecurity Rule Set ver.2.0.5 <br /># Copyright (C) 2006-2010
Breach Security Inc. All rights reserved. <br /># <br /># The ModSecurity
Core Rule Set is distributed under GPL version 2 <br /># Please see the
enclosed LICENCE file for full details. <br />#
-------------------------------------------------------------- <br /><br />##
-- Configuration<br />
---------------------------------------------------------- <br /># <br />#
Specify CRS version in the audit logs. <br /># <br />SecComponentSignature
"core ruleset/2.0.5" <br /><br /># <br /># Create both Global and
IP collections for rules to use <br /># There are some CRS rules that
assume that these two<br /># collections have already been initiated.
<br />#<br />SecAction
"phase:1,t:none,pass,nolog,initcol:global=global,initcol:ip=%{remote_addr}"
<br /><br /># You most likely already have a base ModSecurity
configuration.<br /># The data presented in this file should work in
conjunction<br /># with your configs. <br /># There are also some
references to some directive settings that<br /># you will want to
double check. <br /># <br /># -=[ Paranoid Mode ]=- <br /># <br /># There are
many different transactional variables that can be # inspected for
attacks. Some variables, such as ARGS, has the # best false
negative/false positive ratio where it will catch # the vast
majority of attack payloads and not have a high false # positive
rate. This is also true for some security <br /># checks such as
@validateByteRange checks where we are <br /># initially only
inspecting for Nul Bytes. <br /># There are, however, some
possibilities for false negative <br /># issues with inspecting parsed
data and this could lead to<br /># missed attacks. If you want to
lessen the chances for false<br /># negatives, then you should enable
"Paranoid Mode" processing<br /># by setting the following
line to 1. This will process <br /># additional rules that are
inspecting variables with a higher<br /># false positive rate. <br />#
<br />SecAction "phase:1,t:none,nolog,pass,setvar:tx.paranoid_mode=0"
<br /><br /># <br /># -=[ Anomaly Scoring Threshold Levels ]=- <br /># <br />#
These variables are used in macro expansion in the 49 inbound<br />#
blocking and 59 outbound blocking files. <br />#<br /># **MUST HAVE**
ModSecurity v2.5.12 or higher to use macro<br /># expansion in numeric
operators. If you have an earlier<br /># version, edit the 49/59 files
directly to set the appropriate<br /># anomaly score levels. <br /># <br />#
You should set the score to the proper threshold you would<br />#
prefer. If set to "5" it will work similarly to previous
Mod<br /># CRS rules and will create an event in the error_log file
if<br /># there are any rules that match. If you would like to
lessen<br /># the number of events generated in the error_log file,
you<br /># should increase the anomaly score threshold to something
like<br /># "20". This would only generate an event in the
error_log file<br /># if there are multiple lower severity rule matches
or if any 1<br /># higher severity item matches. <br /># <br />SecAction
"phase:1,t:none,nolog,pass,setvar:tx.inbound_anomaly_score_level=20"
<br />SecAction
"phase:1,t:none,nolog,pass,setvar:tx.outbound_anomaly_score_level=15"<br /><br />#
-=[ Anomaly Scoring Severity Levels ]=- <br /># <br /># These are the
default scoring points for each severity level.<br /># You may adjust
these to you liking. These settings will be<br /># used in macro
expansion in the rules to increment the anomaly<br /># scores when
rules match. <br /># <br /># These are the default Severity ratings (with
anomaly scores)<br /># of the individual rules - <br /># <br /># - 2:
Critical - Anomaly Score of 20. <br /># Is the highest severity level
possible without<br /># correlation. It is normally generated by the
web attack rules # (40 level files). <br />#<br /># - 3: Error -
Anomaly Score of 15. <br /># Is generated mostly from outbound
leakage rules (50<br /># level files). <br />#<br /># - 4: Warning -
Anomaly Score of 10. <br /># Is generated by malicious client rules
(35 level files). <br />#<br /># - 5: Notice - Anomaly Score of 5.
<br /># Is generated by the Protocol policy and anomaly files. <br />#
<br />SecAction "phase:1,t:none,nolog,pass, \
<br />setvar:tx.critical_anomaly_score=20, \
<br />setvar:tx.error_anomaly_score=15, \
<br />setvar:tx.warning_anomaly_score=10, \
<br />setvar:tx.notice_anomaly_score=5" <br /><br /># <br /># -=[ HTTP
Policy Settings ]=- <br /># Set the following policy settings here and
they will be<br /># propagated to the 23 rules file<br />#
(modsecurity_common_23_request_limits.conf) by using macro<br />#
expansion. <br /># If you run into false positives, you can adjust the
settings<br /># here. <br /># <br /># Only the max number of args is
uncommented by default as there<br /># are a high rate of false
positives. Uncomment the items you<br /># wish to set. <br /># <br /><br />##
Maximum number of arguments in request limited <br />SecAction
"phase:1,t:none,nolog,pass,setvar:tx.max_num_args=255" <br /><br />##
Limit argument name length <br />#SecAction
"phase:1,t:none,nolog,pass,setvar:tx.arg_name_length=100"
<br /><br />## Limit value name length <br />#SecAction
"phase:1,t:none,nolog,pass,setvar:tx.arg_length=400" <br /><br />##
Limit arguments total length <br />#SecAction
"phase:1,t:none,nolog,pass,setvar:tx.total_arg_length=64000"
<br /><br />## Individual file size is limited <br />#SecAction
"phase:1,t:none,nolog,pass,setvar:tx.max_file_size=1048576"
<br /><br />## Combined file size is limited <br />#SecAction
"phase:1,t:none,nolog,pass,setvar:tx.combined_file_sizes=1048576"<br /><br />#
Set the following policy settings here and they will be<br />#
propagated to the 30 rules file<br />#
(modsecurity_crs_30_http_policy.conf) by using macro<br /># expansion.
<br /># If you run into false positves, you can adjust the settings<br />#
here. <br />#<br /># <br />SecAction "phase:1,t:none,nolog,pass, \
<br />setvar:'tx.allowed_methods=GET HEAD POST OPTIONS', \
<br />setvar:'tx.allowed_request_content_type=application/x-www-form-urlencoded
multipart/form-data text/xml application/xml', \
<br />setvar:'tx.allowed_http_versions=HTTP/0.9 HTTP/1.0 HTTP/1.1', \
<br />setvar:'tx.restricted_extensions=.asa .asax .ascx .axd .backup
.bak .bat .cdx .cer .cfg .cmd .com .config .conf .cs .csproj .csr
.dat .db .dbf .dll .dos .htr .htw .ida .idc .idq .inc .ini .key .licx
.lnk .log .mdb .old .pass .pdb .pol .printer .pwd .resources .resx
.sql .sys .vb .vbs .vbproj .vsdisco .webinfo .xsd .xsx', \
<br />setvar:'tx.restricted_headers=Proxy-Connection Lock-Token
Content-Range Translate via if'" <br /><br />#<br />#<br /># -=[
Blocking Action ]=- <br /># What to do when the anomaly score threshold
is exceeded. <br /># <br /># The default is to log the error and let the
request go<br /># through. <br /># This is a reasonable setting to start
with because you do not <br /># want to reject legitimate requests with
an untuned rule set. <br /># <br /># The following line's settings will
be inherited by rules that <br /># do blocking in the 49 inbound and 59
outbound blocking files. <br /># <br /># Change to a disruptive action
such as deny, drop or redirect<br /># if you want to block the
transaction. <br />#<br />SecDefaultAction "phase:2,pass" <br /><br />#
<br /># Review your SecRuleEngine settings. If you want to <br /># allow
blocking, then set it to On however check your<br /># SecDefaultAction
setting to ensure that it is set<br /># appropriately. <br />#<br />SecRuleEngine
On </span>
</div>
<div class="western">
Observando detenidamente el fichero, vemos que
hemos definido la firma del servicio de ModSecurity, y varias
variables útiles que utilizar después desde las reglas posteriores.
Para definir variables nos valemos de la directiva SecAction, que se
procesa en todos los casos, ya que no tiene target ni opertador, solo
ejecuta una acción global, sin embargo es necesario especificar
“pass” entre la lista de acciones si no queremos que le afecte el
secDefaultAction.
</div>
<div class="western">
Por ultimo se define el secDefaultAction, en este
caso permite el acceso a todas la peticiones, las reglas se
procesarán en la fase 2.
</div>
<div class="western">
También podemos denegar el acceso a las
peticiones, y después permitir solo las legitimas.</div>
<div class="western">
Ya solo nos queda la carpeta base_rules/*.conf ya
que modsecurity.d/modsecurity_localrules.conf es un archivo vacío
para que escribamos nuestras propias reglas.
</div>
<div class="western">
<br /></div>
<div class="western">
Esta es la lista completa de archivos en el
directorio base_rules, con un poco de lectura ya deberíamos de poder
examinar y entender estos archivos, así como escribir nuestras
propias reglas.
</div>
<div class="western">
<br /></div>
<div class="western">
modsecurity_35_bad_robots.data
</div>
<div class="western">
modsecurity_35_scanners.data
</div>
<div class="western">
modsecurity_40_generic_attacks.data
</div>
<div class="western">
modsecurity_41_sql_injection_attacks.data
</div>
<div class="western">
modsecurity_42_comment_spam.data
</div>
<div class="western">
modsecurity_46_et_sql_injection.data
</div>
<div class="western">
modsecurity_46_et_web_rules.data
</div>
<div class="western">
modsecurity_50_outbound.data
</div>
<div class="western">
modsecurity_50_outbound_malware.data
</div>
<div class="western">
modsecurity_crs_20_protocol_violations.conf
</div>
<div class="western">
modsecurity_crs_21_protocol_anomalies.conf
</div>
<div class="western">
modsecurity_crs_23_request_limits.conf
</div>
<div class="western">
modsecurity_crs_30_http_policy.conf
</div>
<div class="western">
modsecurity_crs_35_bad_robots.conf
</div>
<div class="western">
modsecurity_crs_40_generic_attacks.conf
</div>
<div class="western">
modsecurity_crs_41_phpids_converter.conf
</div>
<div class="western">
modsecurity_crs_41_phpids_filters.conf
</div>
<div class="western">
modsecurity_crs_41_sql_injection_attacks.conf
</div>
<div class="western">
modsecurity_crs_41_xss_attacks.conf
</div>
<div class="western">
modsecurity_crs_42_tight_security.conf
</div>
<div class="western">
modsecurity_crs_45_trojans.conf
</div>
<div class="western">
modsecurity_crs_47_common_exceptions.conf
</div>
<div class="western">
modsecurity_crs_48_local_exceptions.conf
</div>
<div class="western">
modsecurity_crs_49_enforcement.conf
</div>
<div class="western">
modsecurity_crs_49_inbound_blocking.conf
</div>
<div class="western">
modsecurity_crs_50_outbound.conf
</div>
<div class="western">
modsecurity_crs_59_outbound_blocking.conf
</div>
<div class="western">
modsecurity_crs_60_correlation.conf
</div>
<h2 class="western">
Configuraciones de ejemplo</h2>
<div class="western">
(Esto no es configuración por defecto de RedHat)</div>
<h3 class="western">
SecDefaultAction con deny por defecto</h3>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">SecDefaultAction "phase:2,deny,log,status:403"</span></div>
<div class="western">
<span style="color: black;">Con
esto definimos la acción por defecto, que indica que las reglas se
procesarán por defecto en la fase 2, que se bloqueará el acceso
cuando la regla haga match, que se registrará y que se enviará un
403 de respuesta al cliente.</span></div>
<div class="western">
<span style="color: black;">Estos
valores se aplicarán a todas las demás reglas a menos de que
especifiquemos los contrario en una regla en particular.</span></div>
<h3 class="western">
SecRule con Actions no por defecto</h3>
<div class="western">
<span style="color: black;">Para
sobrescribir los valores por defecto en una regla dada, por ejemplo
la fase, la especificamos de esta manera</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">SecRule REQUEST_HEADERS:User-Agent "MSIE 5.0"
"phase:1,deny"</span></div>
<h3 class="western">
Reglas para la 4º fase</h3>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">SecRequestBodyAccess On | Off</span></div>
<div class="western">
<span style="color: black;">Estableciéndolo
a On mod_security almacena el cuerpo de la petición, lo que nos
permite analizar las peticiones POST antes de transferir el control a
Apache y programar así reglas de fase 4.</span></div>
<h3 class="western">
“Engañar” con la firma</h3>
<div class="western">
<span style="color: black;">Un
pequeño paso para complicar el posible ataque es emitir una firma
falsa en las respuestas, alterando la cabecera Server. Para ello
debemos de poner ServerTokens a Full, para que mod_security lo pueda
cambiar por el string que más nos interese.</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="color: black;">ServerTokens
Full<br />SecServerSignature "Apache 1.3.24"</span></div>
<div class="western">
</div>
<h3>
Comprobar el funcionamiento de mod_security</h3>
<ol>
<li><div class="western">
<span style="color: black;">Crear
un archivo llamado secret.html en el documentRoot con cualquier
contenido hello-world</span></div>
</li>
<li><div class="western">
<span style="color: black;"><span style="font-family: Courier 10 Pitch;"><span style="font-size: small;">Acceder
al documento <a href="http://mydominio.com/secret.html">http://mydominio.com/secret.html</a></span></span></span></div>
</li>
<li><div class="western">
<span style="color: black;">Crear
una regla que bloquee el acceso a todas las peticiones que contengan
la cadena “secret” y reiniciar Apache</span></div>
<div class="western">
<span style="color: black;">SecRule
REQUEST_URI "secret"</span></div>
</li>
<li>Comprobar
que ya no tenemos acceso al documento y que el evento queda
registrado en logs/modsec_audit.log</li>
</ol>
<h3>
Y por último un caso real</h3>
<div>
La mejor forma de ponerse las pilas con todo esto es hacer peticiones a alguna aplicación que sirva nuestro apache, capturar el tráfico por ejemplo con el plugin para firefox HttpFox, de forma que podamos observar todas las cabeceras y cuerpos de petición y respuesta. Al mismo tiempo hacemos un tail -f sobre modsec_audit.log, y observaremos cosas, cosas como esta</div>
<div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<br />
[23/Aug/2012:11:04:46 +0200] UDXyLAoKChcAADalFCkAAAAB 2.136.229.147 47476 10.10.10.23 80<br />
--28219c64-B--<br />
POST /alfresco/uploadFileServlet HTTP/1.1<br />
Host: www.konosys.es<br />
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1<br />
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8<br />
Accept-Language: es-es,es;q=0.8,en-us;q=0.5,en;q=0.3<br />
Accept-Encoding: gzip, deflate<br />
Connection: keep-alive<br />
Referer: http://www.konosys.es/alfresco/faces/jsp/browse/browse.jsp<br />
Cookie: JSESSIONID=54098FFD5CFAAD9BBD8DB8F94CAE9156; alfUser0="bWlrZWwuYXNsYQ=="; GUEST_LANGUAGE_ID=en_US; COOKIE_SUPPORT=true; __utma=233118852.1765051003.1336734466.1345656632.1345706376.34; __utmz=233118852.1336734466.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); LOGIN=6b6e7361646d696e; SCREEN_NAME=307831475547686e6f4f50754d567232774d6f7045673d3d; __utmc=233118852<br />
Content-Type: multipart/form-data; boundary=---------------------------515258493876751836526533860<br />
Content-Length: 196635<br />
<br />
--28219c64-I--<br />
upload%2did=&return%2dpage=javascript%3awindow%2eparent%2eupload%5fcomplete%5fhelper%28%27%27%2c%7berror%3a+%27%24%7b%5fUPLOAD%5fERROR%7d%27%2c+fileTypeImage%3a+%27%24%7b%5fFILE%5fTYPE%5fIMAGE%7d%27%7d%29<br />
--28219c64-F--<br />
HTTP/1.1 403 Forbidden<br />
Content-Length: 228<br />
Keep-Alive: timeout=15, max=98<br />
Connection: Keep-Alive<br />
Content-Type: text/html; charset=iso-8859-1<br />
<br />
--28219c64-H--<br />
Message: Pattern match "(?:#@~\^\w+)|(?:\w+script:|@import[^\w]|;base64|base64,)|(?:\w+\s*\([\w\s]+,[\w\s]+,[\w\s]+,[\w\s]+,[\w\s]+,[\w\s]+\))" at ARGS:return-page. [file "/etc/httpd/modsecurity.d/base_rules/modsecurity_crs_41_phpids_filters.conf"] [line "221"] [id "900014"] [msg "Detects possible includes, VBSCript/JScript encodeed and packed functions"] [data "javascript:"] [severity "CRITICAL"] [tag "WEB_ATTACK/XSS"] [tag "WEB_ATTACK/CSRF"] [tag "WEB_ATTACK/ID"] [tag "WEB_ATTACK/RFE"]<br />
Message: Pattern match "(asfunction|javascript|vbscript|data|mocha|livescript):" at ARGS:return-page. [file "/etc/httpd/modsecurity.d/base_rules/modsecurity_crs_41_xss_attacks.conf"] [line "605"] [id "973305"] [rev "2.0.5"] [msg "XSS Attack Detected"] [data "javascript:"]<br />
Message: Access denied with code 403 (phase 2). [file "/etc/httpd/modsecurity.d/base_rules/modsecurity_crs_49_enforcement.conf"] [line "25"] [msg "Anomaly Score Exceeded (score 25): XSS Attack Detected"]<br />
Action: Intercepted (phase 2)<br />
Apache-Handler: proxy-server<br />
Stopwatch: 1345712684170879 2323239 (2315474* 2322734 -)<br />
Producer: ModSecurity for Apache/2.5.12 (http://www.modsecurity.org/); core ruleset/2.0.5.<br />
Server: Apache<br />
<br />
--28219c64-Z--</div>
<div class="western">
</div>
</div>
<div>
Primero vemos las cabeceras y el cuerpo de la petición. Seguido las cabeceras de respuesta, y los mensajes de las reglas que han hecho match. Muchas veces se trata de reglas encadenadas que van sumando un valor a alguna variable, en este caso en particular observamos Score Exceeded (score 25): XSS Attack Detected"], y como podemos ver en las cabeceras la petición se ha denegado con un 403. En otros casos veremos un 200 y u algún mensaje, porque hemos pasado por alguna regla con "phase:2,pass,nolog,msg:...", lo cual implica que lo dejamos pasar porque no es suficiente para denegar, pero merece la pena registrarlo para que el administrador sea consciente.</div>
<div>
Este caso concreto corresponde a la subida de un fichero de 196kB al espacio personal de un Alfresco, a través del Alfresco Explorer. Primero he modificado la configuración para permitir subidas de archivo de hasta 5MB</div>
<div>
<br /></div>
<div>
SecRequestBodyLimit 5242880<br />
SecRequestBodyInMemoryLimit 5242880</div>
<div>
<br /></div>
<div>
Después me he ido topando con distintas reglas encadenadas que prohibían la subida de un archivo de ejemplo, las he ido excluyendo hasta que me lo ha permitido sin errores. </div>
<div>
<br /></div>
<div>
ProxyRequests Off</div>
<div>
<Proxy *></div>
<div>
Order deny,allow</div>
<div>
Allow from all</div>
<div>
SecRuleRemoveByID 960010 900014 900016 900021 973305</div>
<div>
</Proxy></div>
<div>
<br /></div>
<div>
El siguiente paso sería analizar cada regla excluida, valorar el riesgo de excluirla, y en caso de ser necesario incluir una regla personalizada para nuestro caso particular. </div>
<div>
Manteniendo SecUploadKeepFiles Off no requerimos de SecUploadDir, directorio donde interceptar los ficheros subidos.</div>
<div>
SecTmpDir es el directorio donde se almacenan los archivos temporales cuando se excede SecRequestBodyInMemoryLimit, conviene definir este valor a un directorio donde apache tenga permisos de lectura y escritura.</div>
<div>
<br /></div>
<div>
Esto es todo por ahora, espero que le sirva a alguien. Intentaré recopilar más ejemplos reales... </div>
<div>
Fuentes:<br />
<a href="http://www.amazon.es/dp/B0057WCS7O" target="_blank">ModSecurity 2.5 de Magnus Mischel</a><br />
<a href="http://sourceforge.net/apps/mediawiki/mod-security/index.php?title=Reference_Manual" target="_blank">Manual de referencia de ModSecurity en sourceforge</a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div class="western">
<div class="western">
</div>
</div>
Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0tag:blogger.com,1999:blog-5185204251536357186.post-88644408729065661192012-08-09T13:17:00.000+02:002012-09-07T12:56:39.110+02:00Liferay 6.1.1 sobre Websphere 7.0.0.0<br />
1- Descarga del WAR de Liferay, más las dependencias
<br />
<br />
<a href="http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.1.1%20GA2/liferay-portal-6.1.1-ce-ga2-20120731132656558.war/download" target="_blank">http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.1.1%20GA2/liferay-portal-6.1.1-ce-ga2-20120731132656558.war/download</a><br />
<br />
<a href="http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.1.1%20GA2/liferay-portal-dependencies-6.1.1-ce-ga2-20120731132656558.zip/download" target="_blank">http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.1.1%20GA2/liferay-portal-dependencies-6.1.1-ce-ga2-20120731132656558.zip/download</a><br />
<br />
2- Instalación
<br />
Las dependencias las extraemos en ${WAS_INSTALL_ROOT}/lib/ext
<br />
<br />
El WAR lo instalamos como una app normal, asociándolo al ámbito que aplique, lo dejamos parado y creamos un recurso JDBC
<br />
(JDBC Resource + Origen de Datos + JAAS).
<br />
<br />
3- Liferay.home
<br />
Por defecto crea el liferay.home en ${WAS_INSTALL_ROOT}/profiles/AppSrv01/liferay, creamos allí un portal-ext.properties y añadimos
<br />
<br />
jdbc.default.jndi.name=jdbc/LiferayPool
<br />
<br />
Con el mismo nombre jndi que en el recurso creado.
<br />
<br />
4- Alias de host
<br />
Recuerda añadir el puerto defaultHTTP y defaultHTTPS del servidor a Entorno -> Host Virtuales -> defaulthost -> Alias de host<br />
<br />
Para que funcione el <a href="http://maculi33.blogspot.com.es/2012/09/configuracion-del-hot-deploy-de-liferay.html" target="_blank">hot-deploy</a> de portlets en Liferay Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0tag:blogger.com,1999:blog-5185204251536357186.post-20637448791597845492012-07-10T19:39:00.000+02:002012-07-10T19:40:29.249+02:00OSSEC HIDS, Open Source Security Host Based Intrusion Detection System<style type="text/css">
<!--
@page { margin: 2cm }
H4 { margin-bottom: 0.21cm }
H4.cjk { font-family: "WenQuanYi Zen Hei" }
H4.ctl { font-family: "Lohit Devanagari" }
H3 { margin-bottom: 0.21cm }
H3.western { font-family: "Courier 10 Pitch"; font-size: 12pt }
H3.cjk { font-family: "WenQuanYi Zen Hei"; font-weight: normal }
H3.ctl { font-family: "Lohit Devanagari" }
H2 { margin-bottom: 0.21cm }
H2.western { font-family: "Courier 10 Pitch"; font-size: 14pt; font-style: italic }
H2.cjk { font-family: "WenQuanYi Zen Hei"; font-size: 14pt; font-style: italic }
H2.ctl { font-family: "Lohit Devanagari"; font-size: 14pt; font-style: italic }
P { margin-bottom: 0.21cm }
P.western { font-family: "Courier 10 Pitch" }
P.cjk { font-weight: normal }
A:link { so-language: zxx }
-->
</style>
<br />
<h2 class="western">
</h2>
<div class="western">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
P.western { font-family: "Courier 10 Pitch" }
P.cjk { font-weight: normal }
A:link { so-language: zxx }
-->
</style>
</div>
<div class="western">
OSSEC HIDS (Open Source Security Host based
Intrusion Detection System) es un sistema de detección de
intrusiones basadas en Host, licenciado vía GPL v3, flexible,
potente y robusto.</div>
<div class="western">
Entre sus funcionalidades tenemos un Motor de correlación y análisis de logs y de integridad de ficheros, centralización de
políticas, detección de rootkits, generación de alertas en tiempo
real y respuesta activa.</div>
<div class="western">
Antes de empezar a hablar de instalación, primero
veamos un poco cada función para que nos sirve.</div>
<h2 class="western">
Syscheck</h2>
<div class="western">
<b><span style="font-weight: normal;">Syscheck</span></b>
es parte del servicio Analysisd de OSSEC que se ejecuta
periódicamente para comprobar la integridad de los directorios
críticos del sistema, muy configurable y flexible, nos permite saber
si algo ha cambiado en nuestro servidor.
</div>
<div class="western">
La forma en la que funciona es la siguiente. Los
agentes hacen un checksum de todos los ficheros contenidos en los
directorios configurados. Expirado el ciclo establecido (por defecto
6 horas), cada agente envía sus chcecksums al servidor OSSEC, y éste
los almacena (/var/ossec/queue/syscheck) y los procesa para
determinar si algo ha cambiado, en cuyo caso notifica con los
detalles.</div>
<div class="western">
Un aspecto importante a tener en cuenta son los
archivos ignorados, de forma que podemos configurar el directorio
</div>
<div class="western">
${TOMCAT_HOME} que nos permita asegurar la
integridad del servidor de aplicaciones, pero ignorando los cambios
en todos los ficheros .log, para que realmente sea viable.
</div>
<div class="western">
Para una lista completa de configuraciones
posibles, incluyendo monitorización en tiempo real o informe de
cambios, imprescindible este <a href="http://www.amazon.com/OSSEC-Host-Based-Intrusion-Detection-Guide/dp/159749240X/ref=sr_1_sc_1?ie=UTF8&qid=1338882934&sr=8-1-spell">libro</a></div>
<h2 class="western">
Rootcheck</h2>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal;">
<span style="color: black;"><span style="font-size: small;">Analiza
el sistema en busca de rootkits conocidos. </span></span>
</div>
<h2 class="western">
Log monitoring</h2>
<div class="western">
Parte del proceso Analysd, procesa los logs
monitorizados con ayuda de los <b>decoders</b> en busca de <b>reglas</b>
definidas para generar alertas. Estas alertas pueden a su vez
ejecutar una acción de notificación, de respuesta activa o ambas.</div>
<h2 class="western">
Reglas y decoders</h2>
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
P.western { font-family: "Courier 10 Pitch" }
P.cjk { font-weight: normal }
A:link { so-language: zxx }
-->
</style>
<br />
<div class="western">
OSSEC-HIDS viene preconfigurado con muchas relgas
y decoders para un número alto de tareas estándar. Todas ellas
están extensamente comentadas y son un muy buen punto de partida
para construir nuestras propias reglas. Algo imprescindible para
sacarle el mayor rendimiento a OSSEC-HIDS. Veremos esto en un próximo
articulo.</div>
<h2 class="western">
Alertas </h2>
<div class="western">
Las alertas se componen normalmente de notificaciones con el contenido de la regla que ha lanzado la alerta, así como información relativa al evento. </div>
<h2 class="western">
Respuesta activa</h2>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Poderosa
pero peligrosa, si las firmas son débiles, podemos acabar denegando
el acceso a usuarios legítimos. Un ataque común de DoS consiste en
hacer spoofing de IPs de las maquinas críticas en una
infraestructura de red. Estas IPs terminan bloqueadas por la
respuesta activa de nuestras propias firmas y empieza la fiesta...</span></span></div>
<h2 class="western">
Descarga y comprobación de ficheros OSSEC</h2>
<div class="western">
En el momento de escribir esto la versión a
descargar es la 2.6</div>
<div class="western">
<a href="http://www.ossec.net/files/ossec-hids-2.6.tar.gz">http://www.ossec.net/files/ossec-hids-2.6.tar.gz</a></div>
<div class="western">
<a href="http://www.ossec.net/files/ossec-hids-2.6_checksum.txt">http://www.ossec.net/files/ossec-hids-2.6_checksum.txt</a></div>
<div class="western">
Para comprobar la integridad del tar.gz
descargado, lo contrastamos contra el checksum.txt</div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">md5sum -c ossec-hids-2.6_checksum.txt
<br />ossec-hids-2.6.tar.gz: La suma coincide</span></div>
<div class="western">
<br /></div>
<div class="western">
Para una lista completa de opciones de descarga</div>
<div class="western">
<a href="http://www.ossec.net/main/downloads">http://www.ossec.net/main/downloads</a></div>
<div class="western">
</div>
<h2 class="western">
OSSEC-WUI</h2>
<div class="western">
<a href="http://www.ossec.net/files/ui/ossec-wui-0.3.tar.gz">http://www.ossec.net/files/ui/ossec-wui-0.3.tar.gz</a></div>
<div class="western">
Ossec-wui es un proyecto independiente, instalarlo
es muy sencillo. Este frontal
web es muy austero, podemos ver una lista de los últimos eventos,
y ver algunas estadísticas, pero poco más. Para mejorar un poco
esto, lo podemos intregrar con Splunk. Producto propietario para la
creación de informes y gráficas a partir de multitud datos de
entrada. Lo interesante es que tiene una versión gratuita para un
máximo de 500MB diarios de datos y una app o plugin para OSSEC. Su
integración es también muy sencilla, como veremos basta realizar la
instalación por defecto de Splunk, descargar el plugin de OSSEC,
colocarlo en ${SPLUNK_HOME}/etc/apps y editar dos ficheros de texto.
</div>
<h2 class="western">
Instalación de ossec-hids</h2>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal;">
<span style="color: black;"><span style="font-size: small;">Para
la instalación tenemos dos opciones, si vamos a instalar OSSEC en un
solo sistema, haremos una instalación tipo Local. En los demás
casos de tipo Servidor/Agente. </span></span>
</div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal;">
<span style="color: black;"><span style="font-size: small;">OSEEC
recomienda ejecutar algún programa de detección de rootkits antes
de proceder con la instalación por si nuestro sistema ya esta
comprometido. En CentOS haciendo un “yum search rootkit” nos
encontramos con dos herramientas conocidas:</span></span></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">chkrootkit.x86_64 : Tool to locally check for signs of a
rootkit<br />rkhunter.noarch : A host-based tool to scan for
rootkits, backdoors and local exploits </span>
</div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Recomiendo
ejecutar los dos, ambos tienen mucha información en internet y sus
respectivas páginas del man.</span></span></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Una
vez hecho esto, repasamos los servicios y reglas del firewall de la
maquina, para dejar solo lo necesario. Desactivar los servicios que
no vamos a usar es el primer paso en la seguridad, y menos cosas de
las que preocuparse.</span></span></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Ya
estamos preparados. Ejecutamos el script install.sh El script es tan
bueno que apenas tenemos que seleccionar cosas que no sean por
defecto. Solo el tipo de instalación y poco más. Para un entorno
GNU/Linux de Servidor/Agente, el proceso es el mismo, salvo que en el
Servidor configuramos un SMPT para las notificaciones. Recomendable
activar todas las opciones, siempre hay tiempo después de cambiar la
configuración. </span></span>
</div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">3.2- Do you want to run the integrity check daemon?
(y/n) [y]: y<br />- Running syscheck (integrity check daemon).<br />3.3-
Do you want to run the rootkit detection engine? (y/n) [y]: y<br />Running
rootcheck (rootkit detection).<br />3.4- Active response allows you to
execute a specifi c<br />command based on the events received. For
example,<br />you can block an IP address or disable access for<br />a
specifi c user.<br />More information
at:<br /><a href="http://www.ossec.net/en/manual.html#active-response">http://www.ossec.net/en/manual.html#active-response</a><br />-
Do you want to enable active response? (y/n) [y]: y<br />- Active
response enabled.<br />...</span></div>
<div align="LEFT" class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Una
vez termina de hacer las preguntas, empieza la instalación, compila
e instala todo por defecto en /var/ossec.</span></span></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">También
nos deja una script para el arranque, que por defecto en runlevel 3
se ejecuta de la siguiente manera</span></span></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">runlevel
3 : S99ossec</span></span></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">runlevel
0 : K15ossec</span></span></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Esto
quiere decir que será lo ultimo en arrancar y de lo primero en
parar. En la documentación de OSSEC se recomienda cambiar este
comportamiento de acuerdo a nuestros requerimientos. Si tenemos
servicios que tardan en arrancar, como un Tomcat, es mejor dejar a
ossec arrancar antes. Lo mismo ocurre cuando paramos, mejor será que
ossec este levantado esperando a otros servicios tardones.</span></span></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Si
todo va bien veremos un mensaje de como arrancar ossec</span></span></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">/var/ossec/bin/ossec-control start</span></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Con
esto tendremos primero el servidor, y después todos los Agentes que
vayamos a incorporar. Veamos ahora como gestionar la infraestructura.</span></span></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Primero
necesitamos reglas nuevas para el firewall. El Servidor OSSEC tiene
que aceptar conexiones entrantes UPD 1514, los Agentes deben de
permitir conexiones establecidas UPD 1514 ya que esperan respuesta
del Servidor.</span></span></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Si
hemos activado remote syslog repetimos el mismo proceso para UPD 514 </span></span>
</div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">3.5- Do you want to enable remote syslog (port 514 udp)?
(y/n) [y]: y<br />- Remote syslog enabled.</span></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
</div>
<h2 class="western">
Gestión de agentes</h2>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
</div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Para
poder identificarse en el Servidor, OSSEC usa una PSK con cada
Agente, proceso que debemos de realizar a mano. Todo se hace a través
del mismo script, manage-agents</span></span></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">/opt/ossec/bin/manage_agents<br />****************************************<br />*
OSSEC HIDS v2.6 Agent manager. *<br />* The following options are
available: *<br />****************************************<br />(A)dd an
agent (A).<br />(E)xtract key for an agent (E).<br />(L)ist already added
agents (L).<br />(R)emove an agent (R).<br />(Q)uit.<br />Choose your
action: A,E,L,R or Q: </span>
</div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">La
salida que nos muestra es distinta en el Servidor que en Agente</span></span></div>
<div class="western" style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">**************************************** <br />* OSSEC
HIDS v2.6 Agent manager. * <br />* The following options are
available: * <br />**************************************** <br />
(I)mport key from the server (I). <br /> (Q)uit. <br />Choose your
action: I or Q:</span></div>
<div class="western">
<br />
<br /></div>
<div class="western">
Todo muy intuitivo, (1) añadimos un nuevo agente
en el servidor, genera para él una PSK. (2) Extraemos la PSK a
partir del ID que le hemos dado en el primer paso. (3) En el Agente
importamos la PSK.
</div>
<div class="western">
A partir de aquí ya están trabajando
conjuntamente. Repetimos el proceso para cada Agente.
</div>
<div class="western">
Con esto cubrimos la primera parte. Nos queda
instalar ossec-wui, y tal vez la versión gratuita de splunk para
pintar algunas gráficas chachis que enseñar al jefe, al fin y al
cabo tiene que parece que hacemos algo!</div>
<h2 class="western" style="page-break-before: always;">
Instalación de
ossec-wui </h2>
<div class="western">
</div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">1.0 – Prerequisites <br /> -
Apache with PHP (>= 4.1 or >= 5.0) installed.<br /> - OSSEC
(version >= 0.9-3) already installed. <br /> <br />1.1- Download the web
ui package: <br />wgethttp://www.ossec.net/files/ui/ossec-wui-0.3.tar.gz
<br /> <br />1.2- Uncompress/untar and move the files to somewhere acessible
by your web server: <br />tar -zxvf ossec-wui-0.3.tar.gz <br />mv ossec-wui* /var/www/htdocs/ossec-wui <br /> <br />1.3- Run the setup
script <br /> cd /var/www/htdocs/ossec-wui <br /> ./setup.sh <br />
<br />1.4- Add your web server user to the ossec group: <br />vi
/etc/group <br /> .. <br /> Change From: <br /> ossec:x:1002: <br /><br />
To: <br /> ossec:x:1002:apache<br />
<br />1.5- If you have a large ossec install, you may want to re-configure PHP to support longer lasting scripts and
higher memory utilization. The following entries on php.ini
can be increased: <br /><br /> max_execution_time = 180 <br />
max_input_time = 180 <br /> memory_limit = 30M <br /><br />1.6- Try to
access the UI. <br /> 1.7- Report any problems or suggestions to our
mailing list. </span> </div>
<div class="western">
</div>
<br />
<h2>
<span style="font-size: small;">Instegración con splunk</span></h2>
http://www.ossec.net/?p=402Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0tag:blogger.com,1999:blog-5185204251536357186.post-67160316419676013032012-05-28T09:55:00.000+02:002012-05-28T09:55:41.611+02:00Instalación de Icinga<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
H1 { margin-bottom: 0.21cm }
H1.western { font-family: "Liberation Sans", sans-serif; font-size: 16pt }
H1.cjk { font-family: "WenQuanYi Zen Hei"; font-size: 16pt }
H1.ctl { font-family: "Lohit Devanagari"; font-size: 16pt }
H2 { margin-bottom: 0.21cm }
H2.western { font-family: "Liberation Sans", sans-serif; font-size: 14pt; font-style: italic }
H2.cjk { font-family: "WenQuanYi Zen Hei"; font-size: 14pt; font-style: italic }
H2.ctl { font-family: "Lohit Devanagari"; font-size: 14pt; font-style: italic }
A:link { so-language: zxx }
-->
</style>
<br />
<h1 class="western">
Instalación de Icinga
</h1>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Primero
instalmos algunos paquetes necesarios</span></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: x-small;"><b>yum install httpd gcc
glibc glibc-common gd gd-devel libjpeg libjpeg-devel libpng
libpng-devel mysql mysql-server libdbi libdbi-devel libdbi-drivers
libdbi-dbd-mysql</b></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Creamos
el usuario y grupos que ejecutaran el proceso</span></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: x-small;"><b>useradd -m icinga
<br />passwd icinga <br />groupadd icinga <br />groupadd icinga-cmd<br />usermod
-a -G icinga-cmd icinga<br />usermod -a -G icinga-cmd apache</b></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Nos
descargamos de la web del proyecto la ultima versión, en el momento
de escribir esto 1.7.0</span></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: x-small;"><b>wget
<a href="http://sourceforge.net/projects/icinga/files/latest/download?source=files">http://sourceforge.net/projects/icinga/files/latest/download?source=files</a><br />cd
/usr/src<br />tar xzvf icinga-1.7.0.tar.gz<br />cd
icinga-1.7.0<br />./configure --with-command-group=icinga-cmd
--enable-idoutils <br />make all<br />make install ; make install-init ;
make install-config ; make install-commandmode ; make
install-idoutils<br /><br />o simplemente<br />make fullinstall</b></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<h2 class="western">
Configuración</h2>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Primero
adaptamos /usr/local/icinga/etc/objects/contacts.cfg</span></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">DEfinimos
contactgropus, con tantos miembros haga falta, después los servicios
tendrán uno o varios contactgroups asociados a notificaciones.</span></span></div>
<h2 class="western">
ido2db</h2>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Primero
renombramos los samples</span></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: x-small;"><b>cd
/usr/local/icinga/etc/<br />mv idomod.cfg-sample idomod.cfg<br />mv
ido2db.cfg-sample ido2db.cfg</b></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">y
adaptamos icinga.cfg</span></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: x-small;"><b>vi
/usr/local/icinga/etc/icinga.cfg<br /><br />Descomentar estas
lineas<br />broker_module=/usr/local/icinga/bin/idomod.o
config_file=/usr/local/icinga/etc/idomod.cfg</b></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Creamos
la base de datos Mysql</span></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: x-small;"><b>mysql> CREATE
DATABASE icinga;<br />GRANT USAGE ON *.* TO 'icinga'@'localhost'
IDENTIFIED BY 'icinga' WITH MAX_QUERIES_PER_HOUR 0
MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;<br />GRANT SELECT ,
INSERT , UPDATE , DELETE ON icinga.* TO 'icinga'@'localhost';<br />FLUSH
PRIVILEGES ;<br />quit</b></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Y
importamos el mysql.sql que nos provee Icinga para idoutils</span></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: x-small;"><b>cd
/usr/src/icinga-core/module/idoutils/db <br />mysql -u root -p icinga <
mysql.sql</b></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Configuramos
Idoutils</span></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: x-small;"><b>vi
/usr/local/icinga/etc/ido2db.cfg<br />db_servertype=mysql<br />db_port=3306<br />db_user=icinga<br />db_pass=icinga</b></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
</div>
<h2 class="western">
Configuración Web </h2>
<h2 class="western">
</h2>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
</div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: x-small;"><b>make
install-webconf<br />htpasswd -c /usr/local/icinga/etc/htpasswd.users
icingaadmin<br />service httpd restart</b></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<h2 class="western">
Instalación de los plugins</h2>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: x-small;"><b>wget
<a href="http://sourceforge.net/projects/nagiosplug/files/latest/download?source=files">http://sourceforge.net/projects/nagiosplug/files/latest/download?source=files</a><br />cd
/usr/src <br />tar xvzf nagios-plugins-1.4.14.tar.gz <br />cd
nagios-plugins-1.4.14 <br />./configure --prefix=/usr/local/icinga
--with-nagios-user=icinga <br />make <br />make install </b></span>
</div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<h2 class="western">
Arranque del servicio</h2>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: x-small;"><b>service ido2db
start<br />chkconfig --add ido2db<br />chkconfig --levels 345 ido2db
on<br />/usr/local/icinga/bin/icinga -v
/usr/local/icinga/etc/icinga.cfg <br />service icinga start<br />chkconfig
--add icinga <br />chkconfig --levels 345 icinga on <br />(debian ->
update-rc.d icinga defaults)</b></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">URL
de Acceso</span></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: x-small;"><b>http://${HOSTNAME}/icinga/</b></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<h2 class="western">
Instalación y configuración de NRPE para Icinga </h2>
<h2 class="western">
</h2>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">NRPE
es un proyecto para la ejecución remota de plugins a través de SSL.
En icinga instalamos el agente, en cada servidor a monitorizar
instalamos el servidor. En cada server configuramos que solo Icinga
pueda contectarse, y definimos todos los comandos (service_checks)
que se van a poder ejecutar.</span></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Instalación</span></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: x-small;"><b>Necesitamos el
repositorio EPEL<br />rpm -Uvh
http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-6.noarch.rpm<br /><br />Lo
deshabilitamos por defecto<br />vi
/etc/yum.repos.d/epel.repo<br />(enabled=0)<br /><br />(en icinga)<br />yum
install nagios-nrpe-plugin --enablerepo=epel<br /><br />(en el
server)<br />yum install nrpe nagios-plugins-all --enablerepo=epel<br /><br />En
el server metemos una regla de iptables para permitir el puerto 5666
desde kns-mon<br />-A INPUT -m state --state NEW -m tcp -p tcp -i eth0
-s <icinga_ip> --dport 5666 -j ACCEPT<br /><br />En
/etc/nagios/nrpe.cfg configuramos el <br />server_allowed=<icimga_ip><br />y
los command, definiendo los que vamos probando de
<br />/usr/lib64/nagios/plugins<br />(NOTA) Si tenemos un server con
varias interfaces y queremos que escuche solo por alguna de ellas
<br />server_address=10.10.10.1<br /><br />Para probar el funcionamiento
desde icinga<br />/usr/local/icinga/libexec/check_nrpe -H c check_mysql</b></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<h2 class="western">
Instalación de check_tomcat.pl</h2>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: x-small;"><b><a href="http://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/Apache-Tomcat/check_tomcat-2Epl/details">http://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/Apache-Tomcat/check_tomcat-2Epl/details</a><br /><br />dependencias
en CentOS<br />yum install perl-libwww-perl.noarch
perl-XML-XPath.noarch perl-Crypt-SSLeay.x86_64
perl-IO-Socket-SSL.noarch<br /><br />Instlalar la app de manager de
Apache Tomcat<br />en conf/Catalina/localhost/manager.xml<br /><br /><Context
privileged="true"
<br /> docBase="/opt/liferay-portal-6.1.0/tomcat/webapps/manager"><br />
<Valve className="org.apache.catalina.valves.RemoteAddrValve"<br />
allow="127\.0\.0\.1"/><br /></Context><br /><br />en
conf/tomcat-user.xml<br /><br /><role rolename=”manager-gui”
/><br /><user username=”manager”
password=”manager”
roles=”standard,manager-gui” /<br /><br />Comprobamos que funiona<br />/usr/lib64/nagios/plugins/check_tomcat.pl -H localhost -p 8080 -l manager -a maanger -n .<br /><br />OK: memory in use 307 MB (910 MB); threads[http-apr-8080]=0(200); threads[ajp-apr-8009]=1(200);|used=322238680 free=632227624 max=954466304 currentThreadsBusy[http-apr-8080]=0 currentThreadCount[http-apr-8080]=10 maxThreads[http-apr-8080]=200 currentThreadsBusy[ajp-apr-8009]=1 currentThreadCount[ajp-apr-8009]=10 maxThreads[ajp-apr-8009]=200</b></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; page-break-before: always; widows: 2;">
</div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; page-break-before: always; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Con
esto tenemos instalado Icinga 1.7.0, adaptamos </span></span>
</div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">"templates.cfg",
"commands.cfg" y “localhost.cfg” a nuestras
necesidades, manteniendo lo que hay, solo extiendiendo. </span></span>
</div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Cuando
todo este bien podemos arrancar y ver que todo esta bien</span></span></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: transparent; border: 1px solid #008000; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: x-small;"><b>icinga -v icinga.cfg </b></span>
</div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">A
partir de aqui, tendremos que añadir nuestros host y servicios, a
veces alguna definición de comando nueva, y poco a poco afinando
umbrales y configuraciones de intervalos. Lo mejor es descargarse la
extensa documentación existente, o a través de la ayuda de la
interface web e ir entendiendo poco a poco como Icinga nos puede
facilitar mucho la vida.</span></span></div>Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0tag:blogger.com,1999:blog-5185204251536357186.post-73953702742644090832012-05-24T14:22:00.003+02:002012-08-20T19:33:45.361+02:00Apache HTTP Server con frontal Web<div style="font-family: "Courier New",Courier,monospace;">
<style type="text/css">
<!--
@page { margin: 2cm }
H3 { margin-bottom: 0.21cm }
H3.western { font-family: "Courier 10 Pitch"; font-size: 12pt }
H3.cjk { font-family: "WenQuanYi Zen Hei"; font-weight: normal }
H3.ctl { font-family: "Lohit Devanagari" }
H2 { margin-bottom: 0.21cm }
H2.western { font-family: "Courier 10 Pitch"; font-size: 14pt; font-style: italic }
H2.cjk { font-family: "WenQuanYi Zen Hei"; font-size: 14pt; font-style: italic }
H2.ctl { font-family: "Lohit Devanagari"; font-size: 14pt; font-style: italic }
H1 { margin-bottom: 0.21cm }
H1.western { font-family: "Courier 10 Pitch"; font-size: 20pt }
H1.cjk { font-family: "WenQuanYi Zen Hei"; font-size: 16pt; font-weight: normal }
H1.ctl { font-family: "Lohit Devanagari"; font-size: 16pt }
P { margin-bottom: 0.21cm }
P.western { font-family: "Courier 10 Pitch" }
P.cjk { font-weight: normal }
A:link { so-language: zxx }
-->
</style>
</div>
<h2 class="western" style="font-family: "Courier New",Courier,monospace;">
<span style="font-family: "Courier New",Courier,monospace; font-size: large;">Instalación y configuración Apache HTTP Server</span></h2>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
</h3>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
Instalación</h3>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Es
bastante común montar Apache Http Server como frontal Web de un servidor de aplicaciones como Apache
Tomcat, dejando Apache contra Internet y la comunicación entre ambos
en el DMZ.</span></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;">Instalar
apache es tan sencillo como esto</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">yum install httpd mod_ssl</span></div>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
</h3>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
Configuración</h3>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
Lo recomendable es seguir alguna guía de configuración de seguridad, CISECURITY.ORG es un buen sitio donde buscar este tipo de cosas :P</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://benchmarks.cisecurity.org/en-us/?route=downloads.browse.category.benchmarks.servers.web.apache">http://benchmarks.cisecurity.org/en-us/?route=downloads.browse.category.benchmarks.servers.web.apache</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Este tipo de documentos son esenciales para la
correcta configuración de entornos productivos, éstos son
actualizados periódicamente por expertos cercanos a las nuevas
vulnerabilidades detectadas.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Con esto cubrimos aspectos de seguridad y
rendimiento de sistema operativo, así como de acceso a los recursos
del servidor Web.
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
Veamos <a href="http://benchmarks.cisecurity.org/en-us/?route=downloads.show.single.apache.310" target="_blank">este</a> bechmark punto a punto, en algunos casos os pongo la traducción del documento, en otros añado alguna valoración, la idea es tener un checklist para pasar a producción, como si fuera la lista de la compra!</div>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
1 Planteamiento e Instalación</h3>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__861_590854269"></a>1.1
Pre-installation Planning Checklist (Level 1, Not Scorable)</h4>
<ul style="font-family: "Courier New",Courier,monospace;">
<li><div class="western">
Recopilar políticas de seguridad
Corporativas que apliquen</div>
</li>
<li><div class="western">
Implementar una infraestructura de red
segura, publicando el servicio de Apache a través de Routers y/o
Firewalls</div>
</li>
<li><div class="western">
Configuración del Sistema Operativo,
deshabilitar todo lo que no se necesite, permisos de ficheros,
usuario y grupo que gobiernan el proceso.
</div>
</li>
<li><div class="western">
Implementar un sistema de Monitorización
Centralizada de Logs.
</div>
</li>
<li><div class="western">
Implementar monitorización de espacio en
disco</div>
</li>
<li><div class="western">
Implementar mecanismo de rotación de logs</div>
</li>
<li><div class="western">
Practicar el desarrollo de aplicaciones
seguras<br />
<a href="http://www.owasp.org/">http://www.owasp.org/</a></div>
</li>
<li><div class="western">
<a href="http://www.webappsec.org/">http://www.webappsec.org/</a></div>
</li>
<li><div class="western">
Controlar los datos que devuelve la consulta
WHOIS del/los dominio(s) del Web Server</div>
</li>
<li><div class="western">
Securizar los servidores DNS</div>
</li>
<li><div class="western">
Implementar un NIDS (Network Intrusion
Detection System). </div>
</li>
</ul>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__863_590854269"></a>1.2 Do
not Install on a Multi-use System (Level 2, Not Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
El servidor debe levantar el menor número posible
de procesos, dejando solo los servicios mínimos indispensables al
arranque. Si no se va a hacer uso de NFS se recomienda deshabilitar
portmap así como todos los servicios RPC. Del mismo modo si el
servidor no va a recibir correo podemos deshabilitar sendmail, y así
sucesivamente hasta conseguir un servidor especializado.</div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__865_590854269"></a>1.3
Installing Apache (Level 1, Not Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Para facilitar la administración es preferible
siempre usar las distribuciones binarias distribuidas por el sistema
operativo que vayamos a usar, asumimos RedHat.
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
La diferencia fundamental ente las dos opciones de
instalación reside en el número de módulos que por defecto
levantan las instalaciones a partir de repositorios. De esta manera
consiguen que todo funcione out-of-the-box pero a costa de un proceso
más pesado de lo necesario en muchos casos.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Sin embargo, con los binarios de la distribución
obtenemos varios beneficios, entre ellos saber que los paquetes han
pasado por procesos de QA, testando los fallos y parches publicados
por apache, así como configuraciones adecuadas al sistema operativo.
Todo esto lo podemos conseguir compilando Apache, pero entonces el
momento de compilación se convierte en un punto clave.
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/install.html">http://httpd.apache.org/docs/2.2/install.html</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/programs/configure.html">http://httpd.apache.org/docs/2.2/programs/configure.html</a></div>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__867_590854269"></a>2
Minimizar los módulos</h3>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__869_590854269"></a>2.1
Enable only necessary Authentication and Authorization Modules (Level
1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Este es un ejemplo de una lista más limitada de
módulos de autenticación, sin embargo dependiendo del caso, podemos
dejar solo authz_host para las directivas de Order,Deny.</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">LoadModule authn_file_module
modules/mod_authn_file.so<br />LoadModule authn_default_module
modules/mod_authn_default.so<br />LoadModule authz_host_module
modules/mod_authz_host.so<br />LoadModule authz_default_module
modules/mod_authz_default.so<br />LoadModule auth_digest_module
modules/mod_auth_digest.so </span>
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/howto/auth.html">http://httpd.apache.org/docs/2.2/howto/auth.html</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__871_590854269"></a>2.2
Enable the Log Config Module (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Para proteger Apache es muy importante configurar
buenos logs.
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/mod_log_config.html">http://httpd.apache.org/docs/2.2/mod/mod_log_config.html</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__873_590854269"></a>2.3
Disable WebDAV modules (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
En caso de no usar WebDav, mejor deshabilitarlo</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/mod_dav.html">http://httpd.apache.org/docs/2.2/mod/mod_dav.html</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__875_590854269"></a>2.4
Disable Status module (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Este módulo nos da estadísticas de rendimiento,
puede ser adecuado en pre-producción pero desde luego no en
producción.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/mod_status.html">http://httpd.apache.org/docs/2.2/mod/mod_status.html</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__877_590854269"></a>2.5
Disable Autoindex module (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
A menos que sea necesario, también conviene
deshabilitarlo. Como siempre, toca leer qué hace el módulo de turno
para determinar si lo requerimos o no. En este caso se trata de la
funcionalidad que permite presentar como listados en formato html los
contenidos de un directorio.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html">http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__879_590854269"></a>2.6
Disable Proxy Modules (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
El uso de Proxy Reverse se considera siempre una
vulnerabilidad, ya que supone que el servidor realizará peticiones
en nombre de alguien, siempre peligroso. En general, debemos de
permitir solo los protocolos necesarios, y denegar los más sensibles
como pueden ser SMTP y FTP.
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Para el primero podemos usar un Rewrite que
bloquee el acceso al puerto 25, y para el segundo basta con comentar
el módulo mod_proxy_ftp.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Para el uso de Apache como frontend podemos usar
mod_jk o mod_proxy. La recomendación es usar mod_proxy, más
concretamente mod_proxy_ajp y mod_proxy_balancer. Estos últimos son
más modernos que mod_jk, e incorporan algunas mejoras sobre todo de
optimización del protocolo AJP y algunas otras características.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html">http://httpd.apache.org/docs/2.2/mod/mod_proxy.html</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__881_590854269"></a>2.7
Disable User Directories Modules (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Si estamos configurando un frontend, con toda
seguridad no necesitamos este módulo.
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/mod_userdir.html">http://httpd.apache.org/docs/2.2/mod/mod_userdir.html</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__883_590854269"></a>2.8
Disable Info module (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Esta funcionalidad de Apache no es adecuada para
producción, aunque resulta muy útil en entornos de test.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/mod_info.html">http://httpd.apache.org/docs/2.2/mod/mod_info.html</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
NOTA:</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Para deshabilitar módulos que no necesitemos,
podemos documentarnos de que hace cada uno en este apartado</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/">http://httpd.apache.org/docs/2.2/mod/</a></div>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__885_590854269"></a>3
Restringir los privilegios del Sistema Operativo</h3>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__887_590854269"></a>3.1 Run
the Apache Web Server as a non-root user (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Se recomienda designar un usuario y grupo
específicos para el servicio, a través de las directivas User y
Group. Por defecto un Apache compilado en Linux tomará los valores
daemon para ambas propiedades. Esto puede ser problemático si hay
otros servicios en la maquina que corren con los mismos UID/GUID.</div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__889_590854269"></a>3.2
Give the Apache User Account an Invalid Shell (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Hay que asegurarse de que el usuario que usemos
para el servicio no pueda acceder a una shell en el sistema</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">apache:x:48:48:Apache:/var/www:/sbin/nologin</span></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__891_590854269"></a>3.3
Lock the Apache User Account (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Como punto de seguridad añadida bloqueamos la
cuenta, evitando que otros usuarios del sistema puedan hacer “su
apache”.</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">passwd -l apache<br />passwd -S apache <br />apache LK
2012-03-07 0 99999 7 -1 (Password locked.)</span></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__893_590854269"></a>3.4
Apache Directory and File Ownership (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Si usamos las directivas User y Group, lo más
apropiado es hacer propietario a root de todos los ficheros. La razón
de esto es que usamos el puerto 80, Apache se ejecuta inicialmente
como root y después cambia al usuario y grupo designados por
configuración. Para controlar ficheros que no cumplen este
requisito, podemos ejecutar esto, por ejemplo, vía cron.</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">find ${APACHE_PREFIX} \! -user root -ls<br />find
${APACHE_PREFIX} \! -group root -ls</span></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__895_590854269"></a>3.5
Apache Directory and File Permissions (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Los permisos de ficheros y directorios en Linux
debe de ser 755 en general y de 751 en el directorio bin</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">chmod –R
u=rwX,g=rX,o=rX ${APACHE_PREFIX}<br />chmod –R
u=rwX,g=rX,o=X ${APACHE_PREFIX}/bin</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
También conviene monitorizar de alguna forma la
no existencia de ficheros que incumplen estos criterios</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">find -L . \! -type l \! -type s -perm /o=w -ls</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm;">
<br /></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__897_590854269"></a>3.6
Core Dump Directory Security (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
La recomendación es deshabilitarlo, ya que seguro
contiene información sensible que no queremos que otros servicios
puedan leer. Si tenemos que usarlo debemos de cumplir estos
requisitos</div>
<ul style="font-family: "Courier New",Courier,monospace;">
<li><div class="western">
Debe de estar fuera del documentRoot o del
serverRoot, ya que el servicio requiere escribir en
CoreDumpDirectory</div>
</li>
<li><div class="western">
Debe de ser propiedad de root y del grupo sin
privilegios del servicio</div>
</li>
<li><div class="western">
Otros no debe de tener ningún tipo de acceso
a este directorio.</div>
</li>
</ul>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm;">
</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">grep -r CoreDumpDirectory ${APACHE_PREFIX}/conf</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
<br /></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
En Linux por defecto se crea en ServerRoot si no
especificamos otra cosa, en ese caso Apache deshabilita la
funcionalidad ya que en este directorio el usuario sin privilegios
del servicio no tiene permiso de escritura.</div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__899_590854269"></a>3.7
Lock File Security (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Este fichero requiere de las mismas
consideraciones que el punto 2.3.6. Por defecto se crea en
</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">logs/accept.lock</span></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__901_590854269"></a>3.8 Pid
File Security (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Este fichero requiere de las mismas
consideraciones que el punto 2.3.7. Por defecto se crea en
</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">logs/apache.pid</span></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__903_590854269"></a>3.9
ScoreBoard File Security (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
En Linux se usa memoria compartida</div>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__905_590854269"></a>4
Control de Acceso en Apache</h3>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1018_2037562147"></a>4.1
Deny Access to OS Root Directory (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
La práctica de seguridad recomendada es denegar
por defecto el acceso a la raíz del sistema operativo. Esto en
Apache se controla por las directivas <Directory>. Denegamos el
acceso a la raíz para después permitir solo aquello que tengamos
controlado.
</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">perl -ne 'print if /^ *<Directory *\/*/i ..
/<\/Directory/i' conf/http.conf</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><Directory /><br /> Options None<br />
AllowOverride None<br /> Order deny,allow<br /> Deny from
all<br /></Directory></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/core.html#directory">http://httpd.apache.org/docs/2.2/mod/core.html#directory</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html">http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1020_2037562147"></a>4.2
Allow Appropriate Access to Web Content (Level 1, Not Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
La práctica recomendable es restringir al máximo
el acceso a todos los contenidos, en algunos casos esto será
imposible y necesitaremos un Allow from all.
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
perl -ne 'print if /^ *<Directory *\/*/i ..
/<\/Directory/i' conf/httpd.conf conf/extra/*.conf</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
<br /></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><Directory "/usr/local/apache/htdocs"><br />
Options Indexes FollowSymLinks<br /> AllowOverride None<br />
Order allow,deny<br /> Allow from all<br /></Directory></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
<br /></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">perl -ne 'print if /^ *<Location *\/*/i ..
/<\/Location/i' conf/httpd.conf conf/extra/*.conf</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
<br /></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><Location /server-status><br /> SetHandler
server-status<br /> Order deny,allow<br /> Deny from all<br />
Allow from .mydominio.com<br /></Location><br /><br /><Location
/server-info><br /> SetHandler server-info<br /> Order
deny,allow<br /> Deny from all<br /> Allow from
.mydominio.com<br /></Location></span></div>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
</h3>
<h4 class="western" style="font-family: "Courier New",Courier,monospace; page-break-before: always;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1022_2037562147"></a>
4.3 Restrict OverRide for the OS Root Directory (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
El uso de archivos htaccess descentraliza la
configuración de acceso a los recursos, puede ser muy útil pero
requiere de un uso cuidadoso y es sensible a exponer configuraciones.
Para que Apache ignore estos archivos y por lo tanto solo aplique la
configuración de los archivos ya mencionados, establecemos la
directiva AllowOverride a None, en caso de querer usarlo en algún
directorio o localización concreta lo estableceremos solo en ese
contexto con AllowOverride All.</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><Directory /><br /> Options None<br />
AllowOverride None<br /> Order deny,allow<br /> Deny from
all<br /></Directory></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride">http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1024_2037562147"></a>4.4
Restrict OverRide for All Directories (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Cómo en el punto anterior, restringimos el acceso
a los archivos htaccess en todos los puntos expuestos del servidor.</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><Location /server-status><br /> SetHandler
server-status<br /> AllowOverride None<br /> Order deny,allow<br />
Deny from all<br /> Allow from .example.com<br /></Location><br /><br /><Location
/server-info><br /> SetHandler server-info<br /> Order
deny,allow<br /> AllowOverrride None<br /> Deny from all<br />
Allow from .example.com<br /></Location></span></div>
<h2 class="western" style="font-family: "Courier New",Courier,monospace;">
</h2>
<h3 class="western" style="font-family: "Courier New",Courier,monospace; page-break-before: always;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1026_2037562147"></a>
5 Restringir Características, Contenido y Opciones</h3>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1031_2037562147"></a>5.1
Restrict Options for the OS Root Directory (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
La directiva Options permite gestionar el modo en
que se accede a los recursos web, permitiendo o no una serie de
funcionalidades que brinda Apache.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
La recomendación implica establecer a None las
opciones de la raíz del Frontend, y establecer solo las opciones
requeridas en los contextos controlados.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<span style="color: navy;"><span lang="zxx"><u>h</u></span></span><a href="http://httpd.apache.org/docs/2.2/mod/core.html#options">ttp://httpd.apache.org/docs/2.2/mod/core.html#options</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><Directory /><br /> Options None<br />
AllowOverride None<br /> Order deny,allow<br /> Deny from
all<br /></Directory></span></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1033_2037562147"></a>5.2
Restrict Options for the Web Root Directory (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
En el documentRoot en recomendable establecer
también a None las opciones, sin embargo si servimos contenido en
varios lenguajes, es necesario agregar al menos la opción MultiViews</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/content-negotiation.html">http://httpd.apache.org/docs/2.2/content-negotiation.html</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1035_2037562147"></a>5.3
Minimize Options for Other Directories (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Para todos los demás Directories y Locations,
establecemos solo las opciones necesarias, estas son todas
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Multiviews : Como ya hemos mencionado, si queremos
negociación de contenido, necesitamos esta opción</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
ExecCGI : Solo requerido para aquellos directorios
especiales dedicados a contenido ejecutable. No suele ser el caso en
un Frontend.
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
FollowSymLinks y SynLinksIfOwnerMatch : Esta
opción debería de deshabilitarse en la medida de lo posible, algo
razonable en un Frontend, ya que es sensible a exponer partes del
servidor indeseadas. SymLinksIfOwnerMatch es una aproximación más
segura, ya que requiere que el link a seguir tenga el mismo userid
que el directorio o fichero final. Sin embargo el rendimiento se ve
perjudicado, ya que requiere comprobar propietario de los recursos
linkados.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Includes y IncludesNoExec : La opción
IncludesNoExec solo es necesario si vamos a requerir SSI ( Server
Side Includes) . La opción Includes no debe de usarse en ningún
caso, representa un riesgo muy alto al permitir la ejecución de
comandos de shell arbitrarios.
<a href="http://httpd.apache.org/docs/2.2/mod/mod_include.html">http://httpd.apache.org/docs/2.2/mod/mod_include.html</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Indexes : Esta opción también debe de
deshabilitarse. No es adecuado hacer uso de esto en un Frontend.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/core.html#options">http://httpd.apache.org/docs/2.2/mod/core.html#options</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1037_2037562147"></a>5.4
Remove Default HTML Content (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Todo los contenido sample HTML deben de ser
eliminados y así eliminar un punto de entrada no controlado.
</div>
<ul style="font-family: "Courier New",Courier,monospace;">
<li><div class="western">
Borrar el contenido sample</div>
</li>
<li><div class="western">
Comentar las entradas de welcome.conf en caso
de existir
</div>
</li>
<li><div class="western">
Comentar las entradas de man user manual</div>
</li>
<li><div class="western">
Comentar las entradas de /server-status</div>
</li>
<li><div class="western">
Comentar las entradas de /server-info</div>
</li>
<li><div class="western">
Analizar deternidamente cualquier otro
handler como perl-status</div>
</li>
</ul>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1039_2037562147"></a>5.5
Remove Default CGI Content printenv (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
No necesitamos contenido sample de CGI,
simplemente lo borramos si existe alguno. La recomendación es
localizar todos los Script, ScriptAlias y ScriptAliasMatch y
asegurarnos de que no contiene ningún contenido inapropiado</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"># rm ${APACHE_PREFIX}/cgi-bin/printenv</span></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__4557_966385234"></a>5.6
Remove Default CGI Content test-cgi (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Otro contenido CGI vulnerable a ataques que igual
que printenv devuelve mucha información relativa al servidor, como
paths y demás información que no queremos exponer.</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"># rm ${APACHE_PREFIX}/cgi-bin/test-cgi</span></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1041_2037562147"></a>5.7
Limit HTTP Request Methods (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Se recomienda usar la directiva <Limit Except>
para limitar los métodos de petición a GET, HEAD, POST y OPTIONS.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Con esto nos ahorramos peticiones <span style="color: #1f497d;"><span style="font-size: x-small;">
</span></span>PUT y DELETE, raramente utilizadas, y
potencialmente peligrosas. Con esto no nos protegemos de las
peticiones TRACE, para ello tenemos una directiva TraceEnabled que
comentaremos más adelante.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/core.html#limitexcept">http://httpd.apache.org/docs/2.2/mod/core.html#limitexcept</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="color: black;"> </span><span style="font-size: small;"><Directory /><br />
...<br />Order allow,deny <br />...<br /> <LimitExcept GET POST OPTIONS>
<br /> deny from all <br /></LimitExcept><br />...<br /> </Directory></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
</div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1043_2037562147"></a>5.8
Disable HTTP TRACE Method (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
El protocolo HTTP 1.1 requiere del soporte del
método TRACE para propósitos de diagnóstico. Es una victima común
de ataques y debe deshabilitarse, incluyendo la siguiente directiva a
nivel global.</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">TraceEnable off</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/core.html#traceenable">http://httpd.apache.org/docs/2.2/mod/core.html#traceenable</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1045_2037562147"></a>5.9
Restrict HTTP Protocol Versions (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
El protocolo HTTP 1.1 fue publicado en 1999 y
soportado por Apache desde la versión 1.2. No hay razón para seguir
permitiendo conexiones con versiones inferiores a la 1.1</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
De esta manera también cerramos la puerta a
ataques que buscan soporte en este tipo de protocolos. Para
implementarlo añadiremos esto a la configuración global.</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">RewriteEngine On <br />RewriteCond %{THE_REQUEST}
!HTTP/1\.1$ <br />RewriteRule .* - [F]</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm;">
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Y después esto a cada VirtualHost</div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm;">
</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">RewriteEngine On <br />RewriteOptions Inherit</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1761_966385234"></a>5.10
Restrict Access to .ht* files (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Asumiendo que hemos configurado correctamente la
directiva AllowOverride None esto puede resultar innecesario, pero en
el caso de que se haga un GET a un fichero creado o no por nosotros,
nos aseguramos de que no lo podrá ver ningún cliente Web.</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"> <FilesMatch "^\.ht"><br /> Order
allow,deny <br /> Deny from all <br /> Satisfy All <br /> </FilesMatch></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/core.html#filesmatch">http://httpd.apache.org/docs/2.2/mod/core.html#filesmatch</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1763_966385234"></a>5.11
Restrict File Extensions (Level 2, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
A través de la directiva <FilesMatch> nos
asegurarnos de que el servidor no va a servir contenido indeseado por
cualquier motivo no controlado. La recomendación en este caso es
bloquear todo tipo de contenido, y en un segundo paso permitir solo
el acceso al contenido controlado.
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm;">
<br /></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"># Block all files by default, unless specifically
allowed. <br /><FilesMatch "^.*$"> <br />Order Deny,Allow
<br />Deny from all <br /></FilesMatch></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><FilesMatch
"^.*\.(css|html?|js|pdf|txt|xml|xsl|gif|ico|jpe?g|png)$">
<br />Order Deny,Allow <br />Allow from all <br /></FilesMatch></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm;">
<br /></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Este comando find nos puede ayudar a encontrar las
extensiones que contiene nuestra webapp
</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">find . -type f -name '*.*' | awk -F. '{print $NF }' |
sort -u</span></div>
<div align="LEFT" class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/core.html#filesmatch">http://httpd.apache.org/docs/2.2/mod/core.html#filesmatch</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1765_966385234"></a>5.12
Deny IP Address Based Requests (Level 2, Not Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Vale la pena denegar el acceso a todas aquellas
peticiones que no contengan un hostname en la petición. Obligamos al
usuario legítimo a usar el hostname del servidor, pero cerramos la
puerta a ciertas prácticas de malware que emplean la IP para
intentar acceder al servicio web.
</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
<br />RewriteCond %{REQUEST_URI} !^/error [NC] <br />RewriteRule ^.(.*) -
[L,F]</span></div>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1767_966385234"></a>6
Logging, mantenimiento y monitorización</h3>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1769_966385234"></a>6.1
Configure the Error Log (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
La directiva LogLevel puede tomar uno de estos
valores</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">emerg, alert, crit, error, warn, notice, info, debug</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
La recomendación es el valor notice, que registra
todos los errores desde emerg a notice. En momentos en los que
necesitemos más podemos establecerlo a info o debug temporalmente.</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">LogLevel notice</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/logs.html">http://httpd.apache.org/docs/2.2/logs.html</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/core.html#loglevel">http://httpd.apache.org/docs/2.2/mod/core.html#loglevel</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/core.html#errorlog">http://httpd.apache.org/docs/2.2/mod/core.html#errorlog</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm;">
</div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1771_966385234"></a>6.2
Configure the Access Log (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Con las directivas LogFormat y CustomLog
configuramos los logs de acceso al servidor. Tienen un enfoque casi
comercial, ya que se centra en ver quien y a qué se esta accediendo,
y no se preocupa por ejemplo del cuerpo de la respuesta, esto lo
trataremos más adelante con mod_security, que sí permite registrar
la transacción HTTP completa. Sin embargo para un primer análisis
de lo que esta sucediendo en el servidor, se recomienda usar al menos
un CustomLog combined con los siguientes elementos.
</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">LogFormat "%h %l %u %t \"%r\" %>s %b
\"%{Referer}i\" \"%{User-agent}i\""
combined<br />CustomLog log/access_log combined</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
<br /></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#customlog">http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#customlog</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1773_966385234"></a>6.3
Log Monitoring (Level 1, Not Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Una de las tareas más fundamentales es analizar y
analizar los logs generados. Es una tarea que no se puede automatizar
del todo. En última instancia siempre es bueno que una persona
cualificada, con una periodicidad razonable, revise y filtre toda
esta valiosa información. También es importante rotar y almacenar
los logs adecuadamente.
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Para la monitorizaciónen tiempo real de los logs
recomiendo el uso de OSSEC HIDS, Open Security Host Based Intrusion
Detection System, es un sistema libre muy potente que nos permite
monitorizar los logs de apache (porque estamos hablando de Apache),
así como los checksums de los ficheros/directorios sensibles, y
búsqueda de rootkits conocidos. Nos permite crear reglas que generan
alertas, y puede trabajar en concordancia con mod_security.
Trataremos esto más detenidamente.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Aquí las referencias a las herramientas más
usadas para esta fin.</div>
<div align="LEFT" class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm;">
<br /></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Logwatch – <a href="http://www.logwatch.org/">http://www.logwatch.org/</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
OSSEC HIDS – <a href="http://www.ossec.net/">http://www.ossec.net/</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Syslog-NG
<a href="http://www.balabit.com/network-security/syslog-ng/">http://www.balabit.com/network-security/syslog-ng/</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm;">
<br /></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Syslog es una muy buena opción también. Sin
embargo requiere de la adecuación del servicio syslog, que puede
requerir configuración extra en otros servicios corporativos. Ossec
sin embargo tiene un impacto de implantación minino.</div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1775_966385234"></a>6.4
Log Storage and Rotation (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Es importante configurar bien tanto el
almacenamiento de logs antiguos como la rotación de los actuales.
Para ello podemos usar tanto logrotate de GNU/Linux como el
rotatelogs que incluye Apache. Se recomienda esperar siempre 3 meses
o 13 semanas antes de borrar un log.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
En caso de estar más familiarizado con logrotate</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">/etc/logrotate.d/httpd<br /> /var/log/httpd/*log {
<br /> missingok<br /> notifempty<br /> sharedscripts<br /> postrotate<br />
/bin/kill –HUP `cat /var/run/httpd.pid 2>/dev/null` 2>
/dev/null || true<br /> endscript<br /> }<br /># En /etc/logrotate.conf ó
/etc/logrotate.d/httpd <br /># rotate log files weekly<br />weekly <br />#keep
1 years of backlogs <br />rotate 52</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Para el uso de rotatelogs
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm;">
</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">CustomLog "|bin/rotatelogs
/var/logs/logfile.%Y.%m.%d 86400" combined</span></div>
<div align="LEFT" class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm;">
</div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1777_966385234"></a>6.5
Monitor Vulnerability Lists (Level 1, Not Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Ya que todas la vulnerabilidades se solucionan con
parches, es muy importante permanecer al tanto de nuevas versiones,
parches y problemas reconocidos tanto por Apache como por RedHat, en
mi caso. Algunas referencias que nos pueden servir</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/lists.html">http://httpd.apache.org/lists.html</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="https://www.redhat.com/mailman/listinfo/enterprise-watch-list">https://www.redhat.com/mailman/listinfo/enterprise-watch-list</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.cert.org/">http://www.cert.org/</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm;">
</div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1779_966385234"></a>6.6
Apply Applicable Patches (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Al hilo con el punto anterior, una vez tenemos un
parche que aplicar necesitamos un proceso que garantice el correcto
funcionamiento en producción. Para ello primero es recomendable
probar los mismos procedimientos en un entorno lo más similar
posible.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/security/vulnerabilities_22.html">http://httpd.apache.org/security/vulnerabilities_22.html</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.apache.org/dist/httpd/patches/">http://www.apache.org/dist/httpd/patches/</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="https://access.redhat.com/support/policy/update_policies.html">https://access.redhat.com/support/policy/update_policies.html</a></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="color: black;"> </span><span style="font-size: small;">yum check-update httpd</span></div>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1781_966385234"></a>7 Uso
de SSL / TLS</h3>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1783_966385234"></a>7.1
Install mod_ssl and/or mod_nss (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Secure Sockets Layer (SSL) después renombrado
como Transport Layer Security (TLS) es un estándar para la
encriptación de la comunicación HTTP entre extremos. Puede
autenticar al servidor o a ambos. Sin embargo el hecho de usar
SSL/TLS no implica que el servidor este seguro. De hecho con SSL sin
autenticación de cliente, algo muy común, un posible atacante
establecería fácilmente una comunicación con el servidor aceptando
la clave pública de éste, y los datos del ataque estarían
encriptados en el cable. Si usamos Ossec, esto no es un problema, ya
que al residir en el host ve los datos tal y como son presentados al
sistema operativo. Este problema si afectaría a un NIDS.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
<br /></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
mod_ssl es el estándar para la implantación de
TLS, sin embargo existe un posible reemplazo a éste; mod_nss, módulo
que implementa NSS (Network Sercurity Services)</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/mod_ssl.html">http://httpd.apache.org/docs/2.2/mod/mod_ssl.html</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://directory.fedoraproject.org/wiki/Mod_nss">http://directory.fedoraproject.org/wiki/Mod_nss</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.mozilla.org/projects/security/pki/nss/">http://www.mozilla.org/projects/security/pki/nss/</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm;">
</div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1785_966385234"></a>7.2
Install a valid trusted certificate (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Para producción se requiere un certificado
firmado por alguna Autoridad Certificadora (CA). La gestión de los
certificados del servidor queda fuera del alcance de este documento</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
<br /></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">openssl verify -CAfile /etc/pki/tls/certs/ca-bundle.crt
-purpose sslserver /etc/pki/tls/certs/server.crt </span>
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="https://www.owasp.org/index.php/Testing_for_SSL-TLS_%28OWASP-CM-001%29">https://www.owasp.org/index.php/Testing_for_SSL-TLS_%28OWASP-CM-001%29</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1787_966385234"></a>7.3
Protect the Servers Private Key (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
La clave privada puede estar encriptada con
contraseña o en texto plano. En el primer caso tenemos que escribir
físicamente la contraseña en el arranque del servicio, aunque hay
algunas soluciones recomendadas, yo recomiendo usar la técnica más
sencilla; conservar la clave en texto plano y establecer unos
correctos permisos de fichero , lo cual no despreocupa del hecho de
que Apache no pueda arrancar de forma desatendida.</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">chown root:root server.key<br />chmod 0400 server.key</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/mod_ssl.html">http://httpd.apache.org/docs/2.2/mod/mod_ssl.html</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslpassphrasedialog">http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslpassphrasedialog</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm;">
</div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1789_966385234"></a>7.4
Restrict weak SSL Protocols and Ciphers (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Se recomienda deshabilitar los algoritmos de
cifrado considerados débiles, como SSLv2, sensible a ataques de
man-in-the-middle entre otros.
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm;">
</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">SSLProtocol -ALL +SSLv3 +TLSv1<br />SSLHonorCipherOrder On
<br />SSLCipherSuite
ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM<br />#
If yo need to enable only FIPS 140-2 compliant cyphers<br />#
SSLCipherSuite ALL:!EXP:!NULL:!ADH:!LOW:!SSLv2:!MD5:!RC4</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="https://www.owasp.org/index.php/Testing_for_SSL-TLS_%28OWASP-CM-001%29">https://www.owasp.org/index.php/Testing_for_SSL-TLS_%28OWASP-CM-001%29</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1791_966385234"></a>7.5
Restrict Insecure SSL Renegotiation (Level 1, Scorable)</h4>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">SSLInsecureRenegotiation off</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2009-3555">http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2009-3555</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.phonefactor.com/sslgap/ssl-tls-authentication-patches">http://www.phonefactor.com/sslgap/ssl-tls-authentication-patches</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.openssl.org/news/secadv_20091111.txt">http://www.openssl.org/news/secadv_20091111.txt</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
<br /></div>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1793_966385234"></a>8
Fugas de información</h3>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1795_966385234"></a>8.1
Limit Information in the Server Token (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Se recomienda minimizar al máximo la información
que el servidor ofrece de si mismo.</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">ServerTokens Prod</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/core.html#servertokens">http://httpd.apache.org/docs/2.2/mod/core.html#servertokens</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1797_966385234"></a>8.2
Limit Information in the Server Signature (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Se recomienda deshabilitar la firma que añade
Apache a muchas páginas de respuesta como errores, listados ftp,
etc. Esta firma suele estar compuesta por información del servicio
(controlado por ServerTokens) y un mailto al ServerAdmin al que hace
referencia el documento.</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">ServerSignature Off</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/core.html#serversignature">http://httpd.apache.org/docs/2.2/mod/core.html#serversignature</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1799_966385234"></a>8.3
Information Leakage via Default Apache Content (Level 2, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
El acceso a la carpeta de iconos de Apache es otra
vulnerabilidad de la que protegerse, a parte del contenido sample que
ya hemos deshabilitado, los iconos también constituyen una fuente de
información, ya que algunos de ellos, conocidos por el atacante,
solo están presentes en versiones 2.2, por poner un ejemplo.</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Se recomienda deshabilitar toda la configuración
que de acceso a los iconos de Apache.</div>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1801_966385234"></a>9
Configuraciones Misceláneas
</h3>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1803_966385234"></a>9.1
Denial of Service Mitigation (Level 1, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Para mitigar el impacto de los Ataques de Deny of
Service (DoS), se recomiendan estos valores en la configuración
global del protoclo HTTP. La clave es que reducimos drásticamente el
tiempo necesario para descartar conexiones antiguas (10 segundos),
permitimos múltiples peticiones en una misma conexión, hasta un
máximo de 100 por conexión, con 15 segundos de tiempo máximo de
espera entre peticiones. Pasados esto 15 segundos el “canal” se
considera cerrado, y pasados otros 10 la conexión se descarta. El
posible ataque intentará ahogar el pool, por eso es importante fijar
una estrategia que nos asegure que Apache va a ser ágil con las
peticiones.
</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">Timeout 10<br />KeepAlive On<br />MaxKeepAliveRequests
100<br />KeepAliveTimeout 15</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.0/mod/prefork.html">http://httpd.apache.org/docs/2.0/mod/prefork.html</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/core.html#timeout">http://httpd.apache.org/docs/2.2/mod/core.html#timeout</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/core.html#keepalive">http://httpd.apache.org/docs/2.2/mod/core.html#keepalive</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/core.html#keepalivetimeout">http://httpd.apache.org/docs/2.2/mod/core.html#keepalivetimeout</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/core.html#maxkeepaliverequests">http://httpd.apache.org/docs/2.2/mod/core.html#maxkeepaliverequests</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1805_966385234"></a>9.2
Buffer Overflow Mitigation (Level 2, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Algo importante también puede ser fijar de alguna
forma los limites en las peticiones, en este caso esta recomendado
para evitar el Desbordamiento del Buffer, pero también pensando en
el documentLibrary de Liferay o Alfresco, o cualquier otro
repositorio de documentos, servicio de ftp o webdav de Backend que
requiera admitir documentos de entrada.
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
<br /></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Estos valores son orientativos, es necesario leer
la documentación</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">LimitRequestline 512<br />LimitRequestFields
100<br />LimitRequestFieldsize 1024<br />LimitRequestBody 102400</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestline">http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestline</a><br />
<span style="font-size: small;"><span style="font-weight: normal;"><a href="http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestfields">http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestfields</a><br /><a href="http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestfieldsize">http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestfieldsize</a><br /><a href="http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestbody">http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestbody</a></span></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm;">
<br /></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1807_966385234"></a>9.3
Restrict Listen Directive (Level 2, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
Limitar el servicio a la interfaces previstas</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">Listen 172.16.100.10:80</span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/mpm_common.html#listen">http://httpd.apache.org/docs/2.2/mod/mpm_common.html#listen</a></div>
<h4 class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://www.blogger.com/blogger.g?blogID=5185204251536357186" name="__RefHeading__1809_966385234"></a>9.4
Restrict Browser Frame Options (Level 2, Scorable)</h4>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
La directiva Header permite un control sobre las
cabeceras tanto de petición como de respuesta. Nos valemos de esto
para añadir una protección a las peticiones procedentes de otros
sitio sobre documentos del nuestro.</div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><span lang="es-ES">Header always append X-Frame-Options
SAMEORIGIN</span></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm;">
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header">http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<a href="https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header">https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header</a></div>
<div class="western" style="font-family: "Courier New",Courier,monospace;">
<br />
</div>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
VirtualHosting</h3>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">En
nuestro caso Apache HTTP Server tendrá Apache Tomcat como backend,
conectado por mod_proxy_balancer usando AJP, lo hacemos así incluso
teniendo un solo nodo de servidor de aplicaciones, lo que lo hace muy
fácil de escalar a entornos más complejos. </span></span>
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Empezamos
con lo más simple; solo http, editamos conf.d/vhost.conf</span></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="color: black;"><span style="font-size: small;"><b>NameVirtualHost *:80<br />ServerName
127.0.0.1<br /><br /><VirtualHost *:80><br />ServerName
server_name<br />ServerAlias server_name.server_domain<br />DocumentRoot
/var/www/html<br />ErrorLog “| /path/to/rotatelogs
logs/error.log.%Y-&m-&d 86400”<br />CustomLog “|
/path/to/rotatelogs logs/access.log.%Y-&m-&d 86400”
combined<br /><br />ProxyRequests Off<br /><Proxy *><br />Order
deny,allow<br />Allow from all<br /></Proxy><br /><br />ProxyPass
/balancer-manager !<br />ProxyPass /
balancer://server_name.server_domain/ stickysession=JSESSIONID
nofailover=Off<br />ProxyPassReverse /
http://tomcat_server_ip:8080<br /><br /><Proxy
balancer://server_name.server_domain><br />BalancerMember
ajp://tomcat_server_ip:8009 route=jvm1<br />ProxySet
lbmethod=byrequests<br /></Proxy><br /><br /><Location
/balancer-manager><br />SetHandler balancer-manager<br />Order
deny,allow<br />Allow from all<br /></Location><br /></VirtualHost></b></span></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Si
queremos servir por HTTPS, este es un ejemplo de como hacerlo,
modificamos vhost.conf para que rediriga todo el tráfico HTTP al
puerto seguro, después creamos otro virtualhost para gestionar las
peticiones HTTPS</span></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><span style="font-variant: normal;"><span style="color: black;"><span style="font-style: normal;"><b>NameVirtualHost
*:80 <br />ServerName 127.0.0.1 <br /><br /><VirtualHost *:80>
<br />ServerName server_name<br />ServerAlias server_name<br />DocumentRoot
/var/www/html <br />ErrorLog “| /path/to/rotatelogs
logs/error.log.%Y-&m-&d 86400”<br />CustomLog “|
/path/to/rotatelogs logs/access.log.%Y-&m-&d 86400”
combined<br /><br />RewriteEngine On <br />RewriteCond %{HTTPS} !=on
<br />RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]
<br /><br /></VirtualHost> <br /><br /><VirtualHost *:443>
<br />ServerName server_name <br />ServerAlias server_name.server_domain
<br />DocumentRoot /var/www/html/secure <br />ErrorLog “|
/path/to/rotatelogs logs/ssl_error.log.%Y-&m-&d
86400”<br />CustomLog “| /path/to/rotatelogs
logs/ssl_access.log.%Y-&m-&d 86400” combined<br /><br />SSLEngine
on <br />SSLCertificateFile /etc/pki/tls/certs/server.crt
<br />SSLCertificateKeyFile /etc/pki/tls/private/server.key
<br /><br />ProxyRequests Off <br /><Proxy *> <br />Order deny,allow
<br />Allow from all <br /></Proxy> <br /><br />ProxyPass
/balancer-manager ! <br />ProxyPass /
balancer://server_name.server_domain/ stickysession=JSESSIONID
nofailover=Off <br />ProxyPassReverse /</b></span></span></span><b>
http://tomcat_server_ip:8080</b><span style="font-variant: normal;"><span style="color: black;"><span style="font-style: normal;"><b>
<br /><br /><Proxy balancer://server_name.server_domain>
<br />BalancerMember ajp://tomcat_server_ip:8009 route=jvm1 <br />ProxySet
lbmethod=byrequests <br /></Proxy> <br /><br /><Location
/balancer-manager> <br />SetHandler balancer-manager <br />Order
deny,allow <br />Allow from all <br /></Location> <br /></VirtualHost></b></span></span></span></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<style type="text/css">
<!--
@page { margin: 2cm }
H2 { margin-bottom: 0.21cm }
H2.western { font-family: "Courier 10 Pitch"; font-size: 14pt; font-style: italic }
H2.cjk { font-family: "WenQuanYi Zen Hei"; font-size: 14pt; font-style: italic }
H2.ctl { font-family: "Lohit Devanagari"; font-size: 14pt; font-style: italic }
P { margin-bottom: 0.21cm }
P.western { font-family: "Courier 10 Pitch" }
P.cjk { font-weight: normal }
A:link { so-language: zxx }
-->
</style>
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; page-break-before: always; widows: 2;">
<span style="color: black;"><span style="font-size: small;">NOTA:
</span></span>
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Cuando
instalamos mod_ssl, se crea un archivo de configuración global,
conf.d/ssl.conf</span></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Este
archivo establece aspectos de configuración tales como los </span></span>
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Protocolos
SSL aceptados, etc. Además también declara un VirtualHost por
defecto que recibe todas la peticiones ssl que no vayan a un
NameVirtualHost concreto. Debido a la naturaleza de funcionamiento
del protocolo SSL, ahora TLS 1.0, cuando un servidor Web tiene que
decidir a que VirtualHost le corresponde la petición entrante, no le
ha dado tiempo de mirar la cabecera http que contiene el ServerName
de destino, aún esta encriptada. Tenemos un problema, ya que para
ese momento el servidor ya ha debido de presentar el certificado con
el que iniciar la conversación...</span></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Por
eso si queremos servir más de un ServerName a través de la misma IP
pública, debemos de usar un certificado wildcard, que tiene como CN
un asterico (*.mydominio.com), después cada VirtualHost atenderá un
ServerName en particular, una vez presentadas las cabeceras al
servidor. </span></span>
</div>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
Cerfificado de Servidor</h3>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Ya
hemos redirigido todo el tráfico HTTP al puerto seguro, y hemos
configurado un vhost en *:443 para gestionar estas peticiones. Para
este caso hemos usado un certificado autofirmado por una clave RSA de
1024 bits, usando openssl</span></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="color: black;"><span style="font-size: small;"><b>openssl genrsa -out server.key
1024<br />openssl req -new -key server.key -out server.csr<br />cp
server.key server.key.org<br />openssl rsa -in server.key.org -our
server.key<br />openssl x509 -req -days 365 -in server.csr -signkey
server.key -out server.crt</b></span></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br /></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black;"><span style="font-size: small;">Herramientas
útiles que nos pueden servir para administrar entornos más
complejos son XCA y Portecle</span></span></div>
<div class="western" style="font-family: "Courier New",Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
</div>
Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0tag:blogger.com,1999:blog-5185204251536357186.post-77411027688100738712012-05-24T14:06:00.000+02:002012-05-28T09:41:52.807+02:00Instalación y Configuración de Apache Tomcat 7<div style="font-family: "Courier New",Courier,monospace;">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
H1 { margin-bottom: 0.21cm }
H1.western { font-family: "Liberation Sans", sans-serif; font-size: 16pt }
H1.cjk { font-family: "WenQuanYi Zen Hei"; font-size: 16pt }
H1.ctl { font-family: "Lohit Devanagari"; font-size: 16pt }
H2 { margin-bottom: 0.21cm }
H2.western { font-family: "Liberation Sans", sans-serif; font-size: 14pt; font-style: italic }
H2.cjk { font-family: "WenQuanYi Zen Hei"; font-size: 14pt; font-style: italic }
H2.ctl { font-family: "Lohit Devanagari"; font-size: 14pt; font-style: italic }
PRE.cjk { font-family: "WenQuanYi Zen Hei", monospace }
H3 { margin-bottom: 0.21cm }
H3.western { font-family: "Liberation Sans", sans-serif }
H3.cjk { font-family: "WenQuanYi Zen Hei" }
H3.ctl { font-family: "Lohit Devanagari" }
A:link { so-language: zxx }
-->
</style>
</div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;">Nos
descargamos la ultima versión de Apache Tomcat 7.0.x</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><b>wget
<a href="http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.27/bin/apache-tomcat-7.0.27.tar.gz">http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.27/bin/apache-tomcat-7.0.27.tar.gz</a></b></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br />
<span style="font-size: small;">El
servicio lo ejecutaremos con un usuario sin privilegios en la
maquina (tomcat), e incluiremos un script de inicio para que el
servicio este disponible al arrancar. Vamos p<span style="color: black;"><span style="font-style: normal;"><span style="font-weight: normal;">rimero
a instalar algunos paquetes que vamos a necesitar</span></span></span></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><b>yum install apr
apr-devel openssl-devel gcc make</b></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br />
<span style="color: black; font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">También
necesitamos una maquina virtual de Java, configurar el usuario tomcat
para que la use y por último configurar setenv.sh, fichero donde
centralizar la configuración del proceso.</span></span></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><b>useradd tomcat<br />chown
-R tomcat:tomcat /opt/tomcat<br />su ~tomcat -c "vi
~/.bash_profile"</b></span><br />
<span style="font-size: small;"><b><br />JAVA_HOME=/usr/java/default<br />JRE_HOME=$JAVA_HOME/jre<br />PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin<br />export
JAVA_HOME JRE_HOME PATH</b></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br />
<span style="font-size: small;">${CATALINA_HOME}
lo tenemos por ejemplo en</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><b>/opt/tomcat</b></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br />
<span style="font-size: small;">Primero
vamos a compilar las librerías nativas de Tomcat (APR)</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><b>cd
${TOMCAT_HOME}/bin<br />tar xzvf tomcat-native.tar.gz<br />cd
bin/tomcat-native-1.1.22-src/<br />./configure
–with-apr=/usr/bin/apr-1-config<br />make<br />make install</b></span></div>
<div align="LEFT" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div align="LEFT" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br />
<span style="font-size: small;">y
lo declaramos en Setenv.sh, junto con algunas propiedades básicas,
observe el valor de -Djava.library.path</span></div>
<div align="LEFT" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div align="LEFT" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;">${CATALINA_HOME}/bin/setenv.sh</span></div>
<div align="LEFT" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><b>JAVA_HOME="/usr/java/default"
<br />JRE_HOME="$JAVA_HOME/jre"
<br />CATALINA_HOME="/opt/tomcat"
CATALINA_TMPDIR="$CATALINA_HOME/temp"
<br /><br />JAVA_OPTS="-Djava.library.path=/usr/local/apr/lib"
<br />JAVA_OPTS="$JAVA_OPTS -server" <br />JAVA_OPTS="$JAVA_OPTS
-d64" <br />JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF8"
<br />JAVA_OPTS="$JAVA_OPTS -Xms512m -Xmx1024m"
<br />JAVA_OPTS="$JAVA_OPTS -XX:PermSize=128m
-XX:MaxPermSize=256m" JAVA_OPTS="$JAVA_OPTS
-Xloggc:$CATALINA_HOME/logs/gc.log" </b></span></div>
<div align="LEFT" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br />
<span style="font-size: small;">En
el siguiente arranque veremos de ver esta linea en catalina.out</span></div>
<div align="LEFT" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><b>INFO: Loaded APR based
Apache Tomcat Native library 1.1.22</b></span></div>
<h2 class="western" style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;">La aplicación Manager de Tomcat</span></h2>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;">Tomcat
incluye una aplicación para la administración tanto vía Web, como
por JMX o scripting. Esta aplicación nos permite hacer las
operaciones básicas de deploy, undeploy, etc, pero además nos
provee una forma de ver el estado del Tomcat, a través de la página
status.</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;">También
tenemos una interface ligera “/manger/text” que requiere role
manager-script, para invocar comandos por ejemplo con curl.</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><b>http://{host}:{port}/manager/text/{command}?{parameters}</b></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br />
<span style="color: black; font-size: small;">Hay
que tener cuidado de no dar acceso a manager al mundo exterior, ya
que desde él se controla todo nuestro servicio :P</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Para
securizar el acceso, podemos publicarlo solo por SSL, restringir el
acceso por direción IP, cifrar con sha1 las contraseñas de
tomcat-user.xml, o una combinación de todas. </span>
</div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">En
cualquier caso necesitamos un usuario para poder autenticar</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">${TOMCAT_HOME}/conf/tomcat-user.xml</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><b><role
rolename="manager-gui" /><br /><user username=manager"
password="manager" roles="standard,manager-gui"
/></b></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br />
<span style="font-size: small;">Si
encriptamos la password manager con sha1</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;">sha1(manager)='1a8565a9dc72048ba03b4156be3e569f22771f23'</span><br />
<span style="font-size: small;">quedaría así </span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; orphans: 2; padding: 0.25cm; page-break-before: auto; widows: 2;">
<span style="font-size: small;"><b><role
rolename="manager-gui" /><br /><user username=manager"
password="1a8565a9dc72048ba03b4156be3e569f22771f23"
roles="standard,manager-gui" /></b></span></div>
<div style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br />
<span style="color: black; font-size: small;">Después
editamos </span>
</div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">${CATALINA_HOME}/conf/server.xml
</span>
</div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">y
añadimos digest=”sha” en la configuración del Realm</span></div>
<div style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;"></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><b><Realm
className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase" digest="sha"
/>
<br /></Realm>
</b></span></div>
<div style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<br />
<span style="color: black; font-size: small;">Si
queremos restringir por IP, editamos el elemento Context de la app y
añadimos los filtros que necesitemos.</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">${CATALINA_HOME}/conf/Catalina/localhost/manager.xml</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">o</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">${CATALINA_HOME/webapps/manager/META-INF/context.xml</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><b><Context><br />
...<br /> <Valve
className="org.apache.catalina.valves.RemoteHostValve"<br />
allow=".*\.mycompany\.com|www\.yourcompany\.com"/><br />
<Valve className="org.apache.catalina.valves.RemoteAddrValve"<br />
deny="192\.168\.1\.\d+"/><br /> ...<br /></Context></b></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIqw9jHtJU81kTZ9DujJSjQk2LUdn2mhYlGOqHpvsk2_ZrPG4r4XvV6S-MHgr_W9gpHpLx86b_3BKzlstcnKSrj5KzpbHRe6e38q6Rvyyq9jwF0pELThzyaEvC2NSiAIN2V5BNZElBHwUU/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIqw9jHtJU81kTZ9DujJSjQk2LUdn2mhYlGOqHpvsk2_ZrPG4r4XvV6S-MHgr_W9gpHpLx86b_3BKzlstcnKSrj5KzpbHRe6e38q6Rvyyq9jwF0pELThzyaEvC2NSiAIN2V5BNZElBHwUU/s640/1.png" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSmdhE1Oe8TvpUpYZd10xQmrWCjos-6rBYftQOCGz3ATxpOFKLRwCB9tELr7fBwYAecrtoOUQtZIs81gkjoZyZ6pq8eowSwWPI_rtQ-X8LzTooLnyNWzS8j8cE41F9DEamhgEgyjR4k-ol/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSmdhE1Oe8TvpUpYZd10xQmrWCjos-6rBYftQOCGz3ATxpOFKLRwCB9tELr7fBwYAecrtoOUQtZIs81gkjoZyZ6pq8eowSwWPI_rtQ-X8LzTooLnyNWzS8j8cE41F9DEamhgEgyjR4k-ol/s640/2.png" width="640" /></a></div>
<br />
<span style="color: black; font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">Para
la configuración SSL tenemos un conector HTTP preconfigurado y
comentado en server.xml. Lo descomentamos y adaptamos a nuestro
entorno</span></span></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><b><-- Define a SSL
Coyote HTTP/1.1 Connector on port 8443 --><br /><Connector
protocol=”org.apache.coyote.http11.Http11AprProtocol”<br />
port="8443" maxThreads="200"<br />
scheme="https" secure="true" SSLEnabled="true"
SSLCertificateFile=”/usr/local/ssl/server.crt”<br /> SSLCertificateKeyFile=”/usr/local/ssl/server.pem”<br />
clientAuth="optional" SSLProtocol="TLSv1"<br />/></b></span></div>
<pre class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0.5cm;"><span style="color: black; font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;"> </span></span></span></pre>
<pre class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0.5cm;"><span style="color: black; font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">También podemos usar la clase por defecto y montar keystores con
keytool o portecle, pero tendríamos que deshabilitar APR,
y no queremos.</span></span></span></pre>
<pre class="western" style="font-family: "Courier New",Courier,monospace; margin-bottom: 0.5cm;"></pre>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Otra
cosa que podemos hacer es publicarlo a través de un <a href="http://maculi33.blogspot.com/2012/05/apache-http-server-con-frontal-web.html">Apache HTTPServer</a>, que nos da más seguridad, al estar este proyecto mucho más
centrado en ese tema. De cualquier manera, el conector HTTP de Tomcat
puramente en Java, con las librerías nativas APR, nos da un
rendimiento más que suficiente en entornos pequeños.</span></div>
<h2 class="western" style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;">
Redirigir parte o todo el Host al conector seguro</span></h2>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Podemos
forzar una, varias o todas las apps de un Host para que usen HTTPS
forzosamente, basta con incluir un <user-data-contraint> dentro
de las <security-constraint> del descriptor de despliegue de la
app pertinente. Tomcat se encarga de redirigir todas la peticiones
HTTP que lleguen a una app con esta restricción, al puerto
configurado en redirectPort del contector HTTP</span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><b><security-constraint><br /> ...<br /> <user-data-constraint><br /> <description><br /> Contraint
the user data transport for the whole
app </description><br /> <transport-guarantee>CONFIDENTIAL</transport-guarantee><br /> </user-data-contraint><br /> ...<br /></security-contraint></b></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<h2 class="western" style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;">
Otras consideraciones
</span></h2>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;">
Verificar integridad del Tomcat descargado</span></h3>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Podemos
hacer un md5sum apache-tomcat-7.0.21.tar.gz y comprobar si coincide
con la cadena que encontramos en apache-tomcat-7.0.21.tar.gz.md5</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">También
podemos importar las llaves públicas de apache en nuestra
configuración gpg, y después comprobar la firma de
apache-tomcat-7.0.21.ta.gz.asc</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">No
cuesta nada y así sabemos que tenemos una copia autentica de Tomcat. </span> </div>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;">
Gestión de las aplicaciones por defecto</span></h3>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;"> </span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">ROOT
y Docs no presentan muchos riesgos de seguridad, ROOT es posible que
la queramos sustituir, o simplemente eliminar. Al igual que docs, no
tiene JSP ni Servlets, por lo que no hay funcionalidad que explotar.</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Examples
si que sería bueno quitarlo, no aporta nada y es mejor no tenerla en
cuenta para la adminstración, una app menos.</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Manager
y host-manager si son peligrosas, si no sabemos como gestionar bien
su acceso, mejor borrarlas.</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;">Esto es lo que habría que tener en cuenta para dejarlas en producción:</span></div>
<ul style="font-family: "Courier New",Courier,monospace;">
<li><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Restringir
acceso con filtros</span></div>
</li>
<li><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Usar
SSL, clientAuth="true" y certificado para el admin.</span></div>
</li>
<li><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Usar
digest=”sha” para tomcat-user.xml</span></div>
</li>
<li><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">User
manager/text con un usuario manager-script y controlar quien y desde
donde puede acceder a ella </span></div>
</li>
</ul>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;">
Cambiar el comando SHUTDOWN y su puerto asociado</span></h3>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Lo
lógico es cortar por Firewall el acceso al puerto 8005, pero si
tienes que activar el modo paranoia, podemos hacer lo siguiente.</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">En
la definición del Serveridor en server.xml, valga la redundancia,
podemos cambiar tanto el puerto como el comando que tiran abajo
nuestro Tomcat, si algún desalmado logra colarse en nuestro server,
todavía tendrá alguna barrerita más que saltar. Claro que esto
debe de ir acompañado de unos permisos adecuados en filesystem, si
tenemos un usuario oracle, con pass oracle, todo un clásico, y
hacemos un cat a server.xml, por tu felicidad mejor que no muestre el
contenido, igual en ese momento lo de menos será lo del shutdown :P</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><b><Server port=”8001”
shutdown=”abajooooorl”></b></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;">
Permisos de Filesystem</span></h3>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Lo
importante es no ejecutar Tomcat con root, después podemos aumentar
la seguridad haciendo bin, lib y webapps de solo lectura, y como
información saber que respecto a la jre, tan solo necesitamos
permisos de lectura y ejecución</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><b>chown -R tomcat:
${CATALINA_HOME}<br />chmod –R o=rx /usr/java/default/jre<br />chmod -R
555 ${CATALINA_HOME}/bin ${CATALINA_HOME}/lib $CATALINA_HOME/webapps</b></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;">
Tomcat Security Manager </span></h3>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Para
entendernos esto es como el Selinux de Tomcat, por defecto esta
deshabilitado, para activarlo </span>
</div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">${CATALINA_HOME}/bin/catalina.sh
start -security</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Este
servicio lee por defecto el fichero</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">${CATALINA_HOME/conf/catalina.policy</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Este
fichero nos sirve para hacernos una idea de lo que podemos conseguir
con esta funcionalidad de Tomcat, los detalles quedan fuera del
objetivo de este post.</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<h3 class="western" style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;">
SSI Servlet, CGI Servlet y Invoker Servlet</span></h3>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Si
nuestras app no usan CGI o SSI, conviene desactivar su Servlet
asociado para tener algo menos en lo que pensar. </span>
</div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Lo
mismo sucede con Invoker Servlet, solo que este hay que
deshabilitarlo si o si en entornos productivos, solo es adecuado para
testing de Servlets, en Tomcat 7 ya no esta.</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Todos
ellos están en el desciptor de despliegue por defecto, </span>
</div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">${CATALINA_HOME/conf/web.xml</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"></span></div>Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com1tag:blogger.com,1999:blog-5185204251536357186.post-30544030414586391392012-05-24T11:16:00.002+02:002012-10-01T16:57:30.387+02:00Clonar maquinas en Proxmox<div style="font-family: "Courier New",Courier,monospace;">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
H1 { margin-bottom: 0.21cm }
H1.western { font-family: "Liberation Sans", sans-serif; font-size: 16pt }
H1.cjk { font-family: "WenQuanYi Zen Hei"; font-size: 16pt }
H1.ctl { font-family: "Lohit Devanagari"; font-size: 16pt }
</style>
</div>
<br />
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Clonar
una maquina virtual en Proxmox es muy sencillo. No tenemos Herramientas ->
Clonar como en entornos como VirtualBox, pero al fin y al cabo solo
se trata de un par de cps.</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Esto esta hecho en Proxmox Virtual Enviroment 1.9, pero es tan sencillo que debe de funcionar en otras versiones igual.</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Primero
clonamos el disco virtual de la maquina origen (mejor con la maquina
parada), en
este ejemplo vamos a clonar vmid 101 en una nueva maquina vmid 102</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">cd
/var/lib/vz/images<br />cp -R 101 102</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Una
vez termine de copiar le cambiamos el nombre al nuevo disco</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">mv
102/vm-101-disk-1.raw 102/vm-102-disk-1.raw</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Ya
podemos volver a levantar vmid 101</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><span style="color: black;"><span style="font-style: normal;"><span style="font-weight: normal;">Ahora
Solo nos queda clonar la configuración de la maquina</span></span></span></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">cd /etc/qemu-server<br />cp
101.conf 102.conf</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Editamos
el fichero para adaptarlo, hay que cambiar ide0 y vlan0 para que
apunten al disco virtual recién copiado y a una tarjeta de red nueva
respectivamente.</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">name: kns-tmp0<br />ide2:
none,media=cdrom<br />bootdisk: ide0<br />ostype: other<br />ide0:
local:102/vm-102-disk-1.raw<br />memory: 2048<br />onboot: 1<br />sockets:
1<br />description: CentOS 6.x 64b, RAM 2048 (liferay + Apache
HTTP)<br />cores: 2<br />keyboard: es<br />boot: cad<br />freeze: 0<br />cpuunits:
1000<br />acpi: 1<br />kvm: 1<br />vlan0: rtl8139=D6:B7:75:D3:4B:82</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Con
la tarjeta de red tenemos que andar con ojo para no perjudicar la
conectividad de la maquina origen. Como tenemos el mismo ifcfg-eth0
en ambas maquinas, primero debemos de asegurarnos que en 102.conf
ponemos una nueva MAC, y por otro lado arrancar la nueva maquina una
primera vez, conectarnos por tty y editar ifcfg-eth0, en nuestro caso
dejándolo así</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;">DEVICE="eth0"<br />ONBOOT=yes<br />TYPE=Ethernet<br />BOOTPROTO=none<br />IPADDR=10.10.10.101<br />PREFIX=24<br />GATEWAY=10.10.10.1<br />DNS1=10.10.10.99<br />IPV6INIT=no</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;">Si
al arrancar la maquina nueva, nos dice que eth0 <i>"may no be present"</i>, es
porque en /etc/udev/rules.d tenemos la nueva MAC asociada a un
dispositivo diferente, por ejemplo eth1. Podemos adaptar ifcfg-eth0 o
/udev/rules.d, lo que más convenga.</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Una
vez hecho esto, añadimos la entrada en el /etc/hosts de la maquina nueva</span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><b>10.10.10.101 muevo_server</b></span></div>
<div style="font-family: "Courier New",Courier,monospace; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">También
ejecutamos</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<div style="background: none repeat scroll 0% 0% transparent; border: 1px solid rgb(0, 128, 0); font-family: "Courier New",Courier,monospace; font-style: normal; margin-bottom: 0.1cm; margin-top: 0.1cm; padding: 0.25cm; page-break-before: auto;">
<span style="font-size: small;"><b>hostname nuevo_Server</b></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">y por último
editamos el fichero /etc/sysconfig/network, para cambiar el hostname.
Reinciamos el servicio network y la maquina esta lista para empezar,
no sin antes actualizar y reiniciar.</span></div>
<div style="font-family: "Courier New",Courier,monospace; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;">
<span style="color: black; font-size: small;">Al principio puede ser conveniente desactivar Selinux, preparar la maquina para cualquiera que sea su cometido, afinar y entonces activar Selinux permitiendo solo aquello para la que nuestra maquina este preparada.</span></div>
Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0tag:blogger.com,1999:blog-5185204251536357186.post-7881316792036135012012-04-13T11:35:00.000+02:002012-04-13T11:36:18.331+02:00Instalación de Alfresco 3.4.x / 4.0 sobre Tomcat 6<br />
<div align="CENTER" style="margin-top: 0.42cm; page-break-after: avoid;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace;">Instalación
de Alfresco 3.4.x / 4.0 sobre Tomcat6</span></div>
<div align="LEFT" style="line-height: 0.58cm; margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">1- Primero nos
descargamos la última versión de Tomcat 6 y la descomprimimos en
algún directorio temporal.</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>tar
xzvf apache-tomcat-6.0.35.tar.gz -C /tmp</i></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">2- Creamos la
estructura de la instalación<br />(no tiene que coincidir con esto)</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>mkdir
/opt/alfresco<br />cd /opt/alfresco<br />mkdir alf_data<br />mv
/tmp/apache-tomcat-6.0.35 .<br />ln -s apache-tomcat-6.0.35 tomcat</i></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">3- Habilitamos
el cargador de clases <b>extension</b><br />(necesario para extender la
configuración de Alfresco de forma adecuada)</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>cd
tomcat<br />mkdir -p shared/classes/alfresco/extension/license
shared/classes/alfresco/web-extension<br />vi
conf/catalina.properties<br />shared.loader=${catalina.base}/shared/classes,<br />${catalina.base}/shared/lib/*.jar.</i></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">(la propiedad ya esta declarada en el
fichero con su valor sin determinar)</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">4- Configuración
de la JMV<br />En este ejemplo de “setenv” sólo he puesto alguna
de las múltiples opciones de configuración de las que disponemos.
Para más información y una lista completa podemos visitar este
<a href="http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html">sitio</a></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<br /></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>vi
bin/setenv.sh<br />JAVA_HOME="/usr/java/default"<br />JRE_HOME="$JAVA_HOME/jre"<br />CATALINA_HOME="/opt/alfresco/tomcat"<br />CATALINA_TMPDIR="$CATALINA_HOME/temp"<br />JAVA_OPTS="$JAVA_OPTS
-server"<br />JAVA_OPTS="$JAVA_OPTS
-d64"<br />JAVA_OPTS="$JAVA_OPTS -Xms256m
-Xmx512m"<br />JAVA_OPTS="$JAVA_OPTS -XX:PermSize=128m
-XX:MaxPermSize=256m"<br />JAVA_OPTS="$JAVA_OPTS
-XX:ReservedCodeCacheSize=92m"<br />JAVA_OPTS="$JAVA_OPTS
-Dfile.encoding=UTF-8"<br />JAVA_OPTS="$JAVA_OPTS -Xcomp
-Xbatch"<br />CATALINA_OPTS="$CATALINA_OPTS
-Xloggc:$CATALINA_HOME/logs/gc.log".</i></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">El fabricante
nos da esta recomendación para un servidor donde podamos asignar 2
Gigas al proceso Java, y con al menos un procesador Dual-Core, y que
queden recursos para el systema claro :P</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>-server<br />-Xss1024K<br />-Xms1G<br />-Xmx2G<br />-XX:MaxPermSize=128M<br />-XX:NewSize=512m<br />-XX:+UseConcMarkSweepGC<br />-XX:+CMSIncrementalMode<br />-XX:CMSInitiatingOccupancyFraction=80</i></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">Con esto
establecemos los tamaños del Heap, así como la configuración del
Garbage Colector y el PermSize. Como ya he dicho hay muchas opciones y muy
diferentes. Sin embargo una de las formas de configurarlo cuando no
lo tenemos muy claro es no poner demasiadas opciones. Así el </span><i style="font-family: 'Courier New', Courier, monospace;">HotSpot</i><span style="font-family: 'Courier New', Courier, monospace;">
establece los tamaños automáticamente cuando no especificamos el
valor, y con un cliente JMX podremos ver el comportamiento en tiempo
real, el uso de las regiones de memoria y el rendimiento, un buen
punto de partida para hacer un tunning más fino posteriormente.</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">5-
Configuración de Alfresco<br />Dentro del cargador de clases extension
montamos la configuración de Alfresco, así tendremos siempre
desplegada la versión original de Alfresco, extendida a través de
este directorio. Muchos menos dolores de cabeza para
migrar/actualizar.</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>cd
/opt/alfresco/tomcat/shared/classes<br />cp -R
${Alfresco_X_ZIP_FILE}/web-server/shared/classes/* .<br />mv
alfresco-global.properties.sample alfresco-global.properties<br />cd
alfresco/extension<br />mkdir sample<br />mv </i>*.sample*
sample<br />cd ../web-extension<br />mkdir sample<br />mv *.sample* sample</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">Ya tenemos todos
los archivos de configuración como .sample en una carpeta llamada
sample, tanto en extension como en web-extension. Me parece que así
todo queda más claro. Si el Tomcat lo levantamos en su puerto por
defecto, 8080, no necesitamos ninguna configuración para arrancar
Alfresco out-of-the-box.
</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">Para el
contenido del archivo de configuración global
alfresco-global.properties, podemos incluir esto como base</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>###############################
<br />## Common Alfresco Properties
#<br />###############################<br /><br />#<br /># Sample custom
content and index data location
<br />#<br />dir.root=/opt/alfresco/alf_data<br /><br />#<br /># Sample
database connection properties
<br />#<br />db.username=alfresco<br />db.password=alfresco<br /><br />#<br />#
External locations
<br />#-------------<br />ooo.exe=/opt/openoffice.org3/program/soffice
<br />ooo.enabled=false<br />jodconverter.officeHome=/opt/openoffice.org3<br />jodconverter.portNumbers=8100<br />jodconverter.enabled=true<br />img.root=${dir.root}/ImageMagick<br />img.exe=/usr/bin/convert<br />swf.exe=/usr/local/bin/pdf2swf<br /><br />#
Only for schema upgrades<br />db.schema.update=true<br /><br />## MySQL
connection<br />#<br />db.driver=org.gjt.mm.mysql.Driver
<br />db.url=jdbc:mysql://localhost/alfresco?useUnicode=yes&characterEncoding=UTF-8
<br /><br />#<br /># Index Recovery
Mode<br />#-------------<br />index.recovery.mode=AUTO<br /><br />#<br />#
Outbound Email Configuration
<br />#-------------<br />mail.host=smtp.company.fake<br />mail.port=25<br />mail.username=anonymous<br />mail.password=<br />mail.encoding=UTF-8<br />mail.from.default=alfresco@company.fake<br />mail.smtp.auth=false<br /><br />#<br />#
The default authentication chain <br />#<br /># To configure external
authentication subsystems see: <br />#
<a href="http://wiki.alfresco.com/wiki/Alfresco_Authentication_Subsystems">http://wiki.alfresco.com/wiki/Alfresco_Authentication_Subsystems</a>
<br />#------------- <br />authentication.chain=alfrescoNtlm1:alfrescoNtlm
<br /><br /># <br /># URL Generation Parameters (The ${localname} token is
replaced by the local server name) <br />#-------------
<br />alfresco.context=alfresco <br />alfresco.host=${localname}
<br />alfresco.port=8080 <br />alfresco.protocol=http <br />#
<br />share.context=share <br />share.host=${localname} <br />share.port=8080
<br />share.protocol=http <br /><br /># Default value of
alfresco.rmi.services.host is 0.0.0.0 which means 'listen on all
adapters'. <br /># This allows connections to JMX both remotely and
locally. <br /># <br />alfresco.rmi.services.host=0.0.0.0
<br />alfresco.rmi.services.port=50500 <br /><br />#<br /># RMI service ports
for the individual services. <br /># These seven services are available
remotely. <br /># <br /># Assign individual ports for each service for
best performance<br /># or run several services on the same port. You
can even run everything on 50500 if needed. <br /># <br /># Select 0 to
use a random unused port. <br />#<br />avm.rmi.service.port=50501
<br />avmsync.rmi.service.port=50502 <br />attribute.rmi.service.port=50503
<br />authentication.rmi.service.port=50504
<br />repo.rmi.service.port=50505 <br />action.rmi.service.port=50506
<br />wcm-deployment-receiver.rmi.service.port=50507
<br />monitor.rmi.service.port=50508</i></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">Con esto tenemos
la configuración básica establecida, para un Mysql en localhost,
con base de datos 'alfresco', usuario y contraseña 'alfresco',
corriendo sobre un Tomcat 6 con sus puertos por defecto. Ya veremos
como hacer en otros casos. Para gestionar la configuración de los
filesystems que levanta Alfresco (CIFS, FTP, NFS) lo que hacemos es
lo siguiente</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>cd
/opt/alfresco/tomcat/shared/classes/alfresco/extension<br />mkdir
subsystems<br />cp -R
../../webapps/alfresco/WEB-INF/classes/alfresco/subsystems/fileServers
subsystems<br />find subsystems -type f -regex “.*.xml” -exec rm
-rf {} \;<br />cd fileServers<br />mkdir default <br />mv
fileServers.properties default</i></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">Editamos el
fileServers.properties donde podemos configurar todos ellos, por
ejemplo para deshabilitarlos todos, recomendable si no los usamos</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>cifs.enabled=true<br />ftp.enabled=true<br />nfs.enabled=false</i></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">6- Despliegue de
Alfresco<br />Una vez tenemos el Tomcat preparado, copiamos los
archivos WAR que componen la distribución de Alfresco en
${CATALINA_HOME}/webapps</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>cd
/opt/alfresco/tomcat/webapps<br />cp
${Alfresco_X_ZIP_FILE}/web-server/webapps/*.war .<br />mkdir alfresco
share<br />unzip alfresco.war -d alfresco<br />rm alfresco.war<br />unzip
share.war -d share<br />rm share.war</i></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">También es
conveniente cambiar la ruta a la que apunta el log de ambas apps</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>vi
alfresco/WEB-INF/classes/log4j.properties<br />vi
share/WEB-INF/classes/log4j.properties</i></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">En ambos
ficheros cambiamos la propiedad log4j.appender.File.File para que
apunte a la ruta adecuada.</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>log4j.appender.File.File=/opt/alfresco/tomcat/logs/catalina.out</i></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">Ya tenemos todo,
podemos añadir un script y registrarlo como servicio al inicio del
sistema. Este es el ejemplo más simple, creamos el ficheros
/etc/init.d/alfresco, con este contenido:</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>#!/bin/bash
<br />#<br /># Tomcat init script <br /># chkconfig: - 50 50 <br />#<br />#
/etc/init.d/tomcat <br /># description: start/stop Tomcat6 as a service
<br /># processname: alfresco <br />TOMCAT_USER=tomcat
<br />CATALINA_HOME=/opt/alfresco/tomcat <br /><br />start () { <br /> echo
-n "Arrancando Tomcat desde $CATALINA_HOME" <br /> su -
$TOMCAT_USER -c "$CATALINA_HOME/bin/startup.sh" <br /> echo
-e '\E[33m'"OK"; tput sgr0 <br />} <br /><br />stop() { <br /> echo
-n "Parando Tomcat $CATALINA_HOME" <br /> su -
$TOMCAT_USER -c "$CATALINA_HOME/bin/shutdown.sh" <br /> sleep
5 <br /> echo -e '\E[33m'"OK"; tput sgr0 <br />} <br /><br />case "$1" in <br /> start) <br /> start <br /> ;;
<br /> stop) <br /> stop <br /> ;; <br /> restart) <br /> stop <br /> sleep 5
<br /> start <br /> ;; <br /> *) <br /> echo "Usage: $0
{start|stop|restart}" <br /> exit 0 <br /> ;; <br />esac </i>
</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">Y ahora lo
registramos</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>chkconfig
--add alfresco<br />chkconfig alfresco on</i></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">Tal y como pone
en el script necesitamos un usuario tomcat como propietario del
proceso Java
</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>useradd
tomcat<br />passwd tomcat<br />chown -R tomcat: /opt/alfresco</i></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">Arrancamos y
paramos el servicio a través del script</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>service
alfresco start/stop/restart</i></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">7 – Pasos
adicionales en Alfresco 4.0</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">Alfresco 4.0
para su soporte de Apache Solr, utiliza un keystore para crear una
comunicación segura entre Servidor de indexación y repositorio, que
obviamente pueden vivir en distintas maquinas. Aunque en el primer
arranque tengamos Sorl desactivado, no levanta si no establecemos la
propiedad</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>dir.keystore=/opt/alfresco/keystore</i></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.1cm; margin-top: 0.5cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;">Este keystore en
entornos no productivos lo podemos copiar del WAR, para entornos de
producción deberemos de usar certificados confiables y propios.</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>cp
-R ../../webapps/alfresco/WEB-INF/classes/alfresco/keystore
/opt/alfresco</i></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">Después solo nos queda la declaración
del puerto SSL en el server.xml, de esta manera</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i><Connector
port="8443"
protocol="org.apache.coyote.http11.Http11Protocol"
SSLEnabled="true" maxThreads="150" scheme="https"
keystoreFile="opt/alfresco/keystore/ssl.keystore"
keystorePass="kT9X6oe68t" keystoreType="JCEKS"
secure="true" connectionTimeout="240000"
truststoreFile="/opt/alfresco/keystore/ssl.truststore"
truststorePass="kT9X6oe68t" truststoreType="JCEKS"
clientAuth="false" sslProtocol="TLS" /></i></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">De esta manera ya podemos arrancar
Alfresco 4.0 con Lucene como motor de indexación embebido, vamos
igual que toda la vida. Ahora tenemos un subsystem nuevo llamado
Search que nos permite administrar esto. Cuando queramos podemos
montar Apache Solr, en la misma u otra maquina y activar este nuevo
motor de indexación.</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="margin-bottom: 0cm; page-break-before: always;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">8- Apache Solr</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">Vamos a instalarlo en el mismo Tomcat,
la diferencia es mínima
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">Primero editamos el tomcat-user.xml,
fichero de autenticación por defecto en el realm declarado dentro
del server Catalina.</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i><user
username="CN=Alfresco Repository Client, OU=Unknown, O=Alfresco
Software Ltd., L=Maidenhead, ST=UK, C=GB" roles="repoclient"
password="null"/> <br /><user username="CN=Alfresco
Repository, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead,
ST=UK, C=GB" roles="repository" password="null"/></i></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">(En caso de instancias separadas, cada
linea iría en un tomcat, la declaración del Connector sería
idéntica)
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">Con esto tenemos resuelta la parte de
la comunicación SSL entre repositorio y Apache Solr, ahora
desplegamos Solr</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">9- Configuración y despliegue de
Apache Solr</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">Dentro de la distribución de Apache
Solr que Alfresco nos provee</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>alfresco-enterprise-solr-4.0.0.zip</i></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;">Tenemos todo lo necesario para
desplegar y configurar la instancia. Copiamos la siguientes cosas</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>apache-solr-1.4.1.war
<br />apache-solr-1.4.1.war.unpatched <br />archive-SpacesStore
<br />workspace-SpacesStore <br />docs <br />lib <br />solr.xml </i>
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">A la siguiente ubicación</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>/opt/alfresco/solr</i></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">El archivo
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>solr-tomcat-context.xml
</i>
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">Lo copiamos a
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">/opt/alfresco/tomcat/conf/Catalina/localhost</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">Y lo renombramos como
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>solr.xml</i></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">Editamos el fichero y lo dejamos así</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i><?xml
version="1.0" encoding="utf-8"?> <br /><Context
docBase="/opt/alfresco/solr/apache-solr-1.4.1.war"
debug="0" crossContext="true"> <Environment
name="solr/home" type="java.lang.String"
value="/opt/alfresco/solr" override="true"/>
<br /></Context></i></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">Después por cada core
(workspace-SpacesStore y archive-SpacesStore) editamos el fichero</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>solrcore.properties
</i>
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">Y adaptamos estas propiedades</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>data.dir.root=/opt/alfresco/solr<br />alfresco.url=http://localhost:8080/alfresco/service
</i>
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">Otras propiedades a establecer son los
datos de conexión al repositorio y el cronExpression que lanzará el
“polling”. Este último por defecto se lanza cada 15 segundos, lo
cual puede ser adecuado en entornos sin muchos ingreso constante de
contenido.</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>alfresco.host=localhost
<br />alfresco.port=8080 <br />alfresco.port.ssl=9443 <br />alfresco.cron=0/15
* * * * ? * </i>
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">Las demás propiedades nos valen tal y
como están. Por supuesto esto nos vale como base, después cada
entorno tendrá sus particularidades.
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">Ya podemos copiar el war dentro de
webapps, confirmar el despliegue de la app desde el log y probar el
acceso. Primero necesitamos importar un certificado en el navegador
de acuerdo con la configuración creada para el conector ssl del
tomcat. En nuestro caso, importamos el que provee el war de Alfresco
dentro de la misma carpeta keystore. El archivo se llama browser.p12
y su contraseña es 'alfresco'.</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i><a href="https://localhost:9443/solr">https://localhost:9443/solr</a></i></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">Una vez tengamos el Apache Solr
funcionando, podemos parar Alfresco, añadir esto en
alfresco-global.properties</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(0, 128, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 128, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 128, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 128, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.1cm; margin-top: 0.1cm; padding-bottom: 0.25cm; padding-left: 0.25cm; padding-right: 0.25cm; padding-top: 0.25cm; page-break-before: auto;">
<span style="font-family: 'Courier New', Courier, monospace;"><i>index.subsystem.name=solr<br />solr.host=localhost
<br />solr.port=8080<br />solr.port.ssl=8443</i></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace;">Y volvemos a arrancar. Ya tenemos
Alfresco funcionando con Apache Solr. <span style="color: black;"><br /></span></span></div>Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0tag:blogger.com,1999:blog-5185204251536357186.post-45930398415771800972012-03-10T21:14:00.003+01:002012-04-16T16:38:38.502+02:00Alfresco 4 sobre Websphere 7<span style="background-color: white; color: #626262; font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: left;"><br /></span><br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Hace poco me pidieron que probara la nueva versión de Alfresco, Alfresco 4, sobre la infraestructura de was existente en un cliente. Como gran novedad incluye un nuevo motor de indexación, Apache-Solr, que reposa también sobre Lucene, pero que permite la adecuación del proceso como servicio y así poder separarlo de todo lo demás. También cabe destacar el empujón que le han dado al Share, tanto a nivel de administración de Alfresco, y también en el propio significado de la palabra Share, con la nueva Social Framework.</span></span><span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"> Prometedor no?</span><br />
<br />
<span style="background-color: white; color: #626262; font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: left;"><br /></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiECGPOCCkbmPaS9STaOL_aBhx_DWAPgqUlxO6JhvM8sk-Jynf9vD603iQbXOgXwfWNEEH4YdjGOPyd2d3u8wuHrU2doDnTqBDUisiaCYjuEdQMY5kbODV3Am5KVYhPrcRrqqWh1ecSaFy9/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiECGPOCCkbmPaS9STaOL_aBhx_DWAPgqUlxO6JhvM8sk-Jynf9vD603iQbXOgXwfWNEEH4YdjGOPyd2d3u8wuHrU2doDnTqBDUisiaCYjuEdQMY5kbODV3Am5KVYhPrcRrqqWh1ecSaFy9/s320/2.png" width="320" /></a></div>
<br />
<span style="background-color: white; color: #626262; font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: left;"><br /></span><br />
<div style="text-align: left;">
<span style="color: #626262; font-family: arial, sans-serif; font-size: x-small;"><span style="line-height: 22px;"><br /></span></span></div>
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">1- Como base podemos seguir los mismos pasos que para una </span><span style="color: #666666;">instalación</span> <span style="color: #666666;">de </span><a href="http://maculi33.blogspot.com/2012/03/instalacion-de-alfresco-347-sobre-ibm.html"><span style="color: blue;"><b>Alfresco3.4.x</b></span></a><span style="color: #666666;"> </span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="color: #666666;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">2- Antes de arrancar el servidor lógico habilitamos SunJCE para la JDK de IBM, ya que este proveedor criptográfico no esta disponible por defecto en WAS. Para ello seguimos los pasos de este </span><a href="http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.jdbc_pg.doc/jdbc68.htm" style="background-color: white; font-weight: bold; line-height: 22px; text-align: left; text-decoration: none;" target="_blank" title=""><span style="color: blue;">enlace</span></a><a href="http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.jdbc_pg.doc/jdbc68.htm" style="background-color: white; color: #26518a; font-weight: bold; line-height: 22px; text-align: left; text-decoration: none;" target="_blank" title="">.</a></span><br />
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px;"><br /></span></div>
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">3- Por ultimo copiamos el keystore contenido en </span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">WEB-INF/classes/alfresco/keystore</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">A una ubicación adecuada y lo configuramos en alfresco-global.properties con la propiedad dir.keystore. Tened en cuenta que los keystores que suministra Alfresco se basan en una CA autogenerada y por tanto no confiable, nada adecuado para entornos productivos. </span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">La idea sobre esto es que el repositorio y Apache-solr se comuniquen de forma segura. Para ello tenemos que levantar el puerto seguro de cada extremo con SSL autenticado, apuntando a nuestro keystore y truststore.</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En el EAR que yo he descargado de support.alfresco.com el paquete de librerias de Myfaces para Websphere tenía un error en common-lang-2.6.jar. Dentro de META-INF/ibmconfig se monta la liberia compartida myfaces_11 con cada uno de los jars que la integran. Basta con editar la lista y corregirlo.</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Una vez tenemos Alfresco funcionando, podemos probar las nuevas funcionalidades, mis favoritas el Drag & Drop, la publicación en canales sociales y el parte de administración del Share.</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /></span><br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">4- Para Apache-solr creamos otro servidor lógic. Lo bueno sería hacerlo en otra maquina y así sentir la diferencia en rendimiento.</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; text-align: left;"><span style="line-height: 22px;">5- En los argumentos genéricos de la jmv asociada al servidor añadimos </span></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">-Dsolr.solr.home=@@SOLR_HOME@@</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">Donde SOLR_HOME es el directorio de configuración de Apache Solr.</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">6- Creamos las configuraciones SSL de ambos servidores para la comunicación entre ellos.</span></span><br />
<br />
<ol>
<li><span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">Creamos un nuevo contenedor de claves, apuntando al keystore en ámbito alfresco4</span></li>
<li><span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">Lo mismo en el ámbito solr</span></li>
<li><span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">Creamos un nuevo contenedor de claves, apuntando al truststore en ámbito alfresco4</span></li>
<li><span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">Lo mismo en el ámbito solr</span></li>
<li><span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">Creamos una nueva configuracion SSL para alfresco4, apuntando al keystore y truststore creados</span></li>
<li><span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">Lo mismo para solr</span></li>
<li><span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">Creamos un nuevo punto final de configuración SSL para alfresco4, apuntando a la configuracion SSL creada</span></li>
<li><span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">Lo mismo para solr</span></li>
<li><span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">Reinciamos todos los servidores</span></li>
</ol>
<br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Debemos asegurarnos de que tenemos alias para "default host" de todos los puertos http y https.</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /></span><br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">7- Editamos el web.xml del WAR para añadir lo siguiente al final del archivo, antes de la etiqueta </web-app> gañan!</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"> </span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;"><welcome-file-list></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;"> <welcome-file>index.jsp</welcome-file></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;"></welcome-file-list> </span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;"> </span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">8- Instalamos el war de solr</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">9- Copiamos solr.xml, docs, lib, workspace-SpacesStore archive-SpacesStore y apache-solr-1.4.1.war a @@SOLR_HOME@@</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">10- Para cada uno de los directorios workspace-SpacesStore y archive-SpacesStore editamos el conf/solrcore.properties y definimos</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">data.dir.root= para que apunte a @@SOLR_DIR@@</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">alfresco.host=localhost</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">alfresco.port=9081</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">alfresco.port.ssl=9444</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Estos valores de host port port.ssl de alfresco son los habituales si instalamos alfresco4 primero como primer servidor después de server1, si no es el caso los consultamos en la consola.</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">11- Importamos el p12 en un browser, su contraseña es "alfresco"</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">12- Levantamos el servidor, </span></span><span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">y accedemos</span><br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"><br /></span><br />
<span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">https://<SERVIDOR>:<SSL_PORT>/solr</span><br />
<span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"><br /></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1GCgE4BiazgrCkIYtQVC5VWrJlJTorqFbMPA9lJzn-2lVEQgqMO2D_q4omkvdSgVbZ5Uxm-_oG8fmOXXUsyhRxPBJ2xsEetUhaY-4qbNvV1vKFv0_pE46nbuUcVbVtnLhdmu4c8mZwf5N/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1GCgE4BiazgrCkIYtQVC5VWrJlJTorqFbMPA9lJzn-2lVEQgqMO2D_q4omkvdSgVbZ5Uxm-_oG8fmOXXUsyhRxPBJ2xsEetUhaY-4qbNvV1vKFv0_pE46nbuUcVbVtnLhdmu4c8mZwf5N/s400/3.png" width="400" /></a></div>
<span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"><br /></span><br />
<span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"><br /></span><br />
<span style="color: #666666; font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">13- Una vez tenemos solr funcionando, podemos parar alfresco y configurar el subystem Search, y añadiendo</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">index.subsystem.name=solr </span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #666666; line-height: 22px; text-align: left;">En el fichero de configuración global, alfresco-global.properties (no me deja hacerlo en caliente por jmx)</span><br style="background-color: white; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #666666; line-height: 22px; text-align: left;"> </span><br style="background-color: white; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #666666; line-height: 22px; text-align: left;">14- Una vez arranquemos de nuevo ya estamos indexando el contenido con solr, podemos ver los binarios que genera en</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #666666; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">@@SOLR_HOME@@/workSpace/SpacesStore/index </span><br style="background-color: white; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">@@SOLR_HOME@@/archive/SpacesStore/index</span><br style="background-color: white; line-height: 22px; text-align: left;" /><br style="background-color: white; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #666666; line-height: 22px; text-align: left;">15- Para administrar el servidor de Apache-Solr, la wiki de alfresco nos da estas "herramientas"</span><br style="background-color: white; line-height: 22px; text-align: left;" /><br style="background-color: white; line-height: 22px; text-align: left;" /><u><span style="background-color: white; color: #666666; line-height: 22px; text-align: left;">General report - including the last TX indexed and the time</span></u></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #666666; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">http://localhost:8080/solr/admin/cores?action=REPORT&wt=xml</span><br style="background-color: white; line-height: 22px; text-align: left;" /><br style="background-color: white; line-height: 22px; text-align: left;" /><u><span style="background-color: white; color: #666666; line-height: 22px; text-align: left;">TX specific report</span></u></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #666666; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">http://localhost:8080/solr/admin/cores?action=TXREPORT&core=alfresco&wt=xml&txid=6</span><br style="background-color: white; line-height: 22px; text-align: left;" /><br style="background-color: white; line-height: 22px; text-align: left;" /><u><span style="background-color: white; color: #666666; line-height: 22px; text-align: left;">Node specific report</span></u></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #666666; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">http://localhost:8080/solr/admin/cores?action=NODEREPORT&wt=xml&dbid=10</span><br style="background-color: white; line-height: 22px; text-align: left;" /><br style="background-color: white; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #666666; line-height: 22px; text-align: left;">También podemos hacer algunas cosas interesantes por JMX, a través de estos ObjectNames</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="color: #666666;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">Alfresco:Name=SolrIndexes,Core=alfresco</span><br style="background-color: white; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">Alfresco:Name=SolrIndexes,Core=archive</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;"><br /></span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtituQTmFQ9qcQelz38UczoVo_XkCymDGfd7PmE-O3XRez8Sp935m05195GuSW4PWyruNdM9EJj4P43Q9-rMi6Uf2_-qOAPX3pgYDBypbkupBh8sChdJVYI-DqJLZaEmsEE-B9vV3Sbno7/s1600/10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="311" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtituQTmFQ9qcQelz38UczoVo_XkCymDGfd7PmE-O3XRez8Sp935m05195GuSW4PWyruNdM9EJj4P43Q9-rMi6Uf2_-qOAPX3pgYDBypbkupBh8sChdJVYI-DqJLZaEmsEE-B9vV3Sbno7/s400/10.png" width="400" /></a></div>
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;"><br /></span></span><br />
<div style="text-align: left;">
<span style="font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;"><br /></span></span></div>
<span style="background-color: white; color: #666666; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">Backup</span><br />
<span style="color: #666666; font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">Se puede hacer copia de seguridad de cada Core de Solr por URL o JMX. </span><span style="background-color: white; line-height: 22px; text-align: left;">Se crean subdirecotorios por copia, cada copia contiene un FULL. </span><span style="background-color: white; line-height: 22px; text-align: left;">Restaurarlo es tan sencillo como restaurar uno de estos subdirectorios</span><br style="background-color: white; line-height: 22px; text-align: left;" /><br style="background-color: white; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">Fuentes:</span><br style="background-color: white; line-height: 22px; text-align: left;" /><br style="background-color: white; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">HowToSetUpSolr.txt (alfresco-solr.zip)</span><br style="background-color: white; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;"><a href="http://wiki.apache.org/solr/SolrWebSphere">http://wiki.apache.org/solr/SolrWebSphere</a></span></span><br />
<span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"><br /></span>Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0tag:blogger.com,1999:blog-5185204251536357186.post-40663060724611855812012-03-08T13:49:00.002+01:002012-03-08T13:49:50.926+01:00Instalación de Alfresco 3.4.7 sobre IBM Websphere 7.0.0.11<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><b><span style="font-size: large;"><br /></span></b></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><b><span style="font-size: large;">Introducción</span></b></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="font-size: large;"><b><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /></b></span><strong style="background-color: white; line-height: 22px; text-align: left;"></strong><span style="background-color: white; color: #666666; line-height: 22px; text-align: left;">Vamos a instalar Alfresco Enterprise 3.4.x sobre Websphere 7.0.0.11 SR7, cumpliendo así con el "supported stacks" de Alfresco.Estos son los componentes que necesitamos</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><b>Websphere</b></span></span><br />
<ul>
<li><span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Instalador v.7.0_64bits</span></span></li>
<li><span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Instalador de actualizaciones para Websphere7</span></span></li>
<li><span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Parches</span></span></li>
</ul>
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"> 7.0.0-WS-WAS-LinuxX64-FP0000011.pak</span><br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"> 7.0.0-WS-WASSDK-LinuxX64-FP0000011.pak</span><span style="font-family: 'Courier New', Courier, monospace;"><br /><span style="color: #626262;"><span style="line-height: 22px;"><i></i></span></span><b><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">S.O.</span></b></span><br />
<ul>
<li><span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">RHEL 5.7 64 bits</span></li>
</ul>
<span style="font-family: 'Courier New', Courier, monospace;"><b><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Alfresco Enterprise </span></b></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><b><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></b></span><br />
<ul>
<li><span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">alfresco-enterprise-3.4.x.ear </span></li>
<li><span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">myfaces1_1-websphere-shared-lib-3.4.x.zip</span></li>
</ul>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">(Descargado de la web de </span><span style="font-family: 'Courier New', Courier, monospace;"><a href="http://support.alfresco.com/">Alfresco Support</a>,<span style="color: #666666;"> con las licencias correspondientes<span style="line-height: 22px;">).</span></span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-size: large;">Instalación y Configuración de WebSphere 7.0</span></strong></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="font-size: large;"><b><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /></b></span><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Primero vamos a instalar el Servidor de aplicaciones, se presupone una instalación básica de RedHat 5.5 o 5.6 de 64bits, ya sea CentOS o RHEL.</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">El primer paso es ejecutar el instalador de websphere 7 64bits, una de las maneras de ejecutarlo es así</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">${WAS_INSTALLER_ROOT}/launchpad.sh</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="color: red; font-size: x-small;"><br style="background-color: white; line-height: 22px; text-align: left;" /></span><span style="color: #666666;"><span style="background-color: white; line-height: 22px; text-align: left;">Este shell script esta preparado para buscar un navegador (firefox) y usarlo como soporte del instalador, implica tener X Window System y Gnome Desktop.</span><br style="background-color: white; line-height: 22px; text-align: left;" /><br />Una vez lanzado Firefox iniciamos el asistente de instalación</span></span> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUs6x1zEjcLGCVuGAD3c6g9eCroVnEi_UUT5d2Z5RfpxTAuBRlTlDzm3MEqcby8f1XmsBgoneu9UwCAino7UJbp_7jWFKiDxUK9E98ID6194y56m5jo8kS9TfNfz7DhEphLJV3jjJfH7Wz/s1600/1.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUs6x1zEjcLGCVuGAD3c6g9eCroVnEi_UUT5d2Z5RfpxTAuBRlTlDzm3MEqcby8f1XmsBgoneu9UwCAino7UJbp_7jWFKiDxUK9E98ID6194y56m5jo8kS9TfNfz7DhEphLJV3jjJfH7Wz/s1600/1.jpeg" /></a><br />
<br />
<span style="color: #666666; font-family: 'Courier New', Courier, monospace;">Aceptamos la licencia</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHut60GLsk29SH4jMiP8GVA2Rlzm3TBAd6sMjKWrdBNsovga8r4Yd2VNwLkBO4goJAhmb-til9xqRRHIULivsNWge0ZnwJw0so2PzTuZgZJP1QkGY7qMxlYjy9TYRncXt5wyNGMtbFvyG5/s1600/2.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHut60GLsk29SH4jMiP8GVA2Rlzm3TBAd6sMjKWrdBNsovga8r4Yd2VNwLkBO4goJAhmb-til9xqRRHIULivsNWge0ZnwJw0so2PzTuZgZJP1QkGY7qMxlYjy9TYRncXt5wyNGMtbFvyG5/s1600/2.jpeg" /></a></div>
<br />
<span style="color: #666666; font-family: 'Courier New', Courier, monospace;">Seleccionamos el directorio de instalación </span><br />
<span style="color: #666666; font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8RpN8e_M45eQ9IsHgFJabLVjTlkZoHW3se-F6R5AxNiQ0DbqZDFqKJK9hogZM_24hZc6btymyo2OWpB2jnz7siha9nvnPnrwmeeU4OWX5qe3rUIMI8yK8qEsssVMP243yJ_rPKdTgMXZY/s1600/5.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8RpN8e_M45eQ9IsHgFJabLVjTlkZoHW3se-F6R5AxNiQ0DbqZDFqKJK9hogZM_24hZc6btymyo2OWpB2jnz7siha9nvnPnrwmeeU4OWX5qe3rUIMI8yK8qEsssVMP243yJ_rPKdTgMXZY/s1600/5.jpeg" /></a></div>
<span style="color: #666666; font-family: 'Courier New', Courier, monospace;"><br /></span><span style="color: #666666; font-family: 'Courier New', Courier, monospace;">Y finalmente el perfil que vamos a instalar. Esta decisión depende de lo que queremos hacer. Si se trata de una versión Trial y no pensamos adquirir licencia de IBM, sólo podemos usar "Servidor de Aplicaciones" y probar la tecnología por un tiempo limitado. También existen versiones para desarrollo son las más adecuadas en entornos no productivos. </span><br />
<br />
<div style="text-align: -webkit-auto;">
<span style="color: #666666; font-family: 'Courier New', Courier, monospace;">Si ya disponemos de una infraestructura corporativa a base de IBM WebSphere, lo normal será crear un perfil AppSrv y después federar el nodo al Deploy Manager existente. </span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #666666; font-family: 'Courier New', Courier, monospace;">El último escenario sería una nueva infraestructura Corporativa donde deberemos de crear primero un perfil de tipo </span><span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">"Célula (gestor de despliegue y nodo gestionado)"</span><span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"><span style="color: #666666;">.</span></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #666666; font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjReFNnVP3MxErjHU-KAUh6pm2HgYpoqxkj5XUMOMnI0oi2a2sVPRc_re6xLt574SzCfNGFAqIz-qm8eNPOlI8QzfjqQWrKO-hroNo3GUDgjU7C2rPXFUBtfv_JKyDyQiUyJ0h0DSoCgQh1/s1600/6.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjReFNnVP3MxErjHU-KAUh6pm2HgYpoqxkj5XUMOMnI0oi2a2sVPRc_re6xLt574SzCfNGFAqIz-qm8eNPOlI8QzfjqQWrKO-hroNo3GUDgjU7C2rPXFUBtfv_JKyDyQiUyJ0h0DSoCgQh1/s1600/6.jpeg" /></a></div>
<div style="text-align: -webkit-auto;">
<span style="color: #666666; font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #666666; font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">También debemos de establecer las credenciales del usuario administrador o deshabilitar la seguridad completamente para entornos no productivos.</span><br />
<div style="text-align: left;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;"><br /></span></span></div>
<br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Una vez termine pulsamos Finalizar y tendremos un Servidor de aplicaciones funcional</span></span><span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">.</span><br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"><br /></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrbg-7MeV-fRCKQiiAX0a_UnBKd4QWfo-uU9V4P_rtjgPKpuUSaTiicyYSSeFuefi5bblF3EXy0DVJ35hD7ikVPNJnaMqLCN661pIy1dwI3PxEldPhBjx0ez6O6C8vTvM_hQyZX_-u3urq/s1600/11.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrbg-7MeV-fRCKQiiAX0a_UnBKd4QWfo-uU9V4P_rtjgPKpuUSaTiicyYSSeFuefi5bblF3EXy0DVJ35hD7ikVPNJnaMqLCN661pIy1dwI3PxEldPhBjx0ez6O6C8vTvM_hQyZX_-u3urq/s1600/11.jpeg" /></a></div>
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"><br /></span><br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"><br /></span><br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">El directorio raíz para el servidor de aplicaciones recién creado es</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">${WAS_INSTALL_ROOT}/profiles/AppSrv01</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Información de la instancia</span></span><br />
<div style="text-align: left;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;"><br /></span></span></div>
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">${WAS_INSTALL_ROOT}/profiles/AppSrv01/bin/versionInfo.sh</span></span><br />
<span style="color: red; font-family: 'Courier New', Courier, monospace; font-size: x-small;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="color: red; font-size: x-small;"><br style="background-color: white; line-height: 22px; text-align: left;" /></span><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-size: large;">Actualización de Websphere</span></strong></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="font-size: large;"><b><br /></b></span></span><br />
<span style="color: #666666; font-family: 'Courier New', Courier, monospace;">Para cumplir con el supported platforms de de Alfresco, necesitamos parchear WAS hasta la versión 7.0.0.11.</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="font-size: large;"><b><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /></b></span><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Descomprimimos el WAS Update Installer</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">tar xzvf 7.0.0.17-WS-UPDI-LinuxAMD64.tar.gz</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Ejecutamos el asistente pasandole la misma ruta de instalación del WAS que acabamos de instalar. Después copiamos los parches anteriormente listados a </span></span><br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"><br /></span><br />
<span style="background-color: white; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">${WAS_INSTALL_ROOT}/UpdateInstaller/maintenance</span><br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">y finalmente ejecutamos</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">${WAS_UPI_ROOT}/update.sh</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Otro sencillo asistente que actualizará Webshpere a la versión 7.0.0.11 SR7</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf2488XuzcAzWjcJLH6UUBq7GCmvYAtzN6dPy0by9huNy0yRw3C4K60mU_cMlzl6fFf7HHIGCvD8W9vtLywlHLtuHcOdwZnizFqXgjsGseA_RiFimhsNn9ROFceRj1HLpDWY3J7XZoAff-/s1600/12.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf2488XuzcAzWjcJLH6UUBq7GCmvYAtzN6dPy0by9huNy0yRw3C4K60mU_cMlzl6fFf7HHIGCvD8W9vtLywlHLtuHcOdwZnizFqXgjsGseA_RiFimhsNn9ROFceRj1HLpDWY3J7XZoAff-/s1600/12.jpeg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOh_sXNzdT17UTLd2x0BttYZaQtr9HuWL-sHiMnpdKW0aWQK7KkgoID_OADqjIA2K4K7BAnn2EX8GSUfZ7wAmy3HQvvF1bkml4bfCC-5WuIFe_DlrG-erzzS6BsYpj8TJsgjxTUemIRRIn/s1600/16.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOh_sXNzdT17UTLd2x0BttYZaQtr9HuWL-sHiMnpdKW0aWQK7KkgoID_OADqjIA2K4K7BAnn2EX8GSUfZ7wAmy3HQvvF1bkml4bfCC-5WuIFe_DlrG-erzzS6BsYpj8TJsgjxTUemIRRIn/s1600/16.jpeg" /></a></div>
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-size: large;">Perfiles en Websphere</span></strong></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="font-size: large;"><b><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /></b></span><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Websphere implementa una estructura lógica que "facilita" después la administración, de forma que podemos gestionar una estructura en cluster más o menos compleja de la misma manera que una instalación simple. Al fin y al cabo se supone que todo lo podemos hacer con <i>clicks</i> en la consola de administración. Para automatizar procesos, o para sentirte más como en casa, también se puede hacer todo a través del intérprete de comandos wsadmin.</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Esta estructura de WAS tiene forma de "Matrioska", donde la muñeca más grande es la Célula, después el Nodo y después el Servidor de Aplicaciones. Como ya hemos dicho antes si tenemos licencia podemos desplegar un Deploy Manager. Esto permite federar otros nodos a él de forma que podamos crear estructuras redundantes y en alta disponibilidad. En una instalación standalone como la nuestra, la misma instancia contiene la Célula sobre la que se crea el Nodo y donde residen los Servidores de Aplicaciones que creemos. Por ahora esto es suficiente. Más info </span><a href="http://publib.boulder.ibm.com/tividd/td/ITIM/SC32-1147-03/es_ES/HTML/im451inst_ux_ws23.htm" style="background-color: white; color: #26518a; font-weight: bold; line-height: 22px; text-align: left; text-decoration: none;" target="_blank" title="">aquí</a>.<br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Cada servidor lógico que creamos levanta una maquina virtual independiente parametrizable, por lo que habitualmente se deja server1 para la consola de administración y se crean servidores por app</span></span><span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">.</span><br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">Podríamos instalar Apps directamente en server1 pero competirían todos el mismo proceso Java.</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Podemos crear perfiles a través de un script</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">${WAS_INSTALL_ROOT}/bin/manageprofiles.sh<br />–create<br />–profileName AppSrv01<br />–profilePath ${WAS_INSTALL_ROOT}/profiles/AppSrv01<br />–templatePath ${WAS_INSTALL_ROOT}/profileTemplates/default<br />–nodeName AppSrv01Node<br />–cellName AppSrv01Cell<br />–hostName localhost</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">O usando comandos propios de la consola de was</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">${WAS_INSTALL_ROOT}/profiles/AppSrv01/bin/wsadmin.sh<br />>set node [$AdminConfig getid /Node:<em style="position: relative;">minodo</em>/]<br />>$AdminTask createApplicationServer <node_name> {-name <server_name>}<br />>$AdminConfig save<br />>quit</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Para gestionar los servidores creados:</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">${WAS_INSTALL_ROOT}/profiles/AppSrv01/bin/startServer.sh alfresco34<br />${WAS_INSTALL_ROOT}/profiles/AppSrv01/bin/stopServer.sh alfresco34</span><br style="background-color: white; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Siempre podemos ver el estado de todos ellos</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">${WAS_INSTALL_ROOT}/profiles/AppSrv01/bin/serverstatus.sh -all</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="color: red; font-size: x-small;"><br style="background-color: white; line-height: 22px; text-align: left;" /></span><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Por defecto el log del servidor corresponde con</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">${WAS_INSTALL_ROOT}/profiles/AppSrv01/logs/alfresco34/SystemOut.log</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="color: red; font-size: x-small;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Aunque podemos cambiar fácilmente su ubicación a través de variables de entorno. Una vez hemos creado los perfiles y servidores necesarios pasamos a los siguiente paso.</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-size: large;">Primero pasos para la instalación de Alfresco</span></strong></span><br />
<strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-family: 'Courier New', Courier, monospace; font-size: small;"><br /></span></strong><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Para definir los argumentos de JAVA_OPTS nos dirigimos a </span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Servidores de aplicaciones > alfresco34 > Definición de proceso > Máquina virtual Java</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHUct69hAYn2kjtLjua_pUJYUuJJ7OjuXLFRE8HcpH_3ZzzKBjY5btR9rFK1A0K06V2RHTFl8ry2BT0Utx-D8eTwyJDnvegYyiVShfP4atVpalBK6G6gAM-zq6x-Od9kfyWxsdZaON_8Ft/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="512" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHUct69hAYn2kjtLjua_pUJYUuJJ7OjuXLFRE8HcpH_3ZzzKBjY5btR9rFK1A0K06V2RHTFl8ry2BT0Utx-D8eTwyJDnvegYyiVShfP4atVpalBK6G6gAM-zq6x-Od9kfyWxsdZaON_8Ft/s640/2.png" width="640" /></a></div>
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Aquí podemos configurar la vm de la misma manera que lo haríamos en un setenv de Tomcat.</span></span><br />
<span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-size: large;">Definición de Bibliotecas Compartidas</span></strong></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="font-size: large;"><b><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /></b></span><span style="background-color: white; text-align: left;"><span style="color: #626262;"><span style="line-height: 22px;">Websphere implementa una carga de clases algo distinta a la de Apache Tomcat o JBoss, en general más estricta. Sin embargo podemos montar "librerías compartidas" en el ámbito adecuado, que serán cargadas por la vm en el arranque antes que las librerías propias de IBM, y también que las contenidas en el EAR (en este orden). Esta es la forma en la montamos también Myfaces para forzar a WAS a usar las implementación que Alfresco necesita.</span></span></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Añadimos una nueva librería compartida apuntando a por ejemplo</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">/opt/alfresco34/config</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="color: red; font-size: x-small;"><br /></span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">Le damos un nombre como por ejemplo "alfresco34_extension_config"</span></div>
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Para ello nos dirigimos a </span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Entorno -> Bibliotecas Compartidas </span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Seleccionamos el ámbito y pulsamos sobre nuevo</span></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_dEB9GmE94P-545AQJJi76Kf2tpAmvYIVK3mBIKOqGWwW7ZHPY39H_akgk8BVyOJd-FEFLN-zW-bKZzThMq2bNDkJmoMnZMcn21sWCwq9qJRth-eKsfu-tKFIWFX_ld5rrSqn5h4N_eIx/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="512" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_dEB9GmE94P-545AQJJi76Kf2tpAmvYIVK3mBIKOqGWwW7ZHPY39H_akgk8BVyOJd-FEFLN-zW-bKZzThMq2bNDkJmoMnZMcn21sWCwq9qJRth-eKsfu-tKFIWFX_ld5rrSqn5h4N_eIx/s640/3.png" width="640" /></a><span style="font-family: 'Courier New', Courier, monospace;"><br /><br /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En este directorio crearemos el archivo</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">alfresco-global.properties</span></span><br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"><br /></span><br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">Con el contenido que veremos más adelante, así como la carpeta alfresco, dentro de la cual incluiremos el extension y web-extension con todos los .samples que copiaremos del .zip de la distribución de Alfresco.</span><br />
<span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><strong style="background-color: white; line-height: 22px; text-align: left;"><span style="font-size: large;">Definición de Driver JDBC y Orígenes de Datos</span></strong></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><strong style="background-color: white; line-height: 22px; text-align: left;"><span style="font-size: large;"><br /></span></strong><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Los pasos para crear el recurso JDBC son los siguientes</span></span><br />
<ul>
<li><span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Crear un componente J2C, que almacena credenciales de acceso de forma segura.</span></span></li>
<li><span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Crear un Recurso JDBC del tipo de nuestro SGBD, apuntando a su driver JDBC adecuado.</span></span></li>
<li><span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Crear un Origen de Datos a partir del Recurso JDBC creado, asociandolo al componente J2C.</span></span></li>
</ul>
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Primero nos dirigimos a</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Seguridad -> JAAS -> Datos de autenticación de J2C</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Y creamos un nuevo componente JAAS</span></span><br />
<div>
<div style="text-align: left;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_VoHtotN4cMb5NIZjAUprcIIUTG6wAZ0EqJIGzt6rKzwkgll32iGP13r4nsy7IsYZg4Gga_OnONXiU5s2zV65jr6FhYh9_MWDF4va_rrZEq-7AAzEpZVGf4fjyr9jLCce2pP1hIo1U7qo/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="512" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_VoHtotN4cMb5NIZjAUprcIIUTG6wAZ0EqJIGzt6rKzwkgll32iGP13r4nsy7IsYZg4Gga_OnONXiU5s2zV65jr6FhYh9_MWDF4va_rrZEq-7AAzEpZVGf4fjyr9jLCce2pP1hIo1U7qo/s640/5.png" width="640" /></a></div>
<div style="text-align: left;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;"><br /></span></span></div>
<div style="text-align: left;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;"><br /></span></span></div>
<br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">El Alias que definimos sólo vale para identificar la entrada, la parte importante es el usuario y una clave que son las credenciales que usará Alfresco en su conexión a la BBDD.</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Ahora es necesario configurar la variable de entorno en el ámbito correcto para el JDBC driver que vayamos a user</span></span><br />
<br />
<div style="text-align: left;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;"><br /></span></span></div>
<br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Ejemplo de Proveedor JDBC </span></span><br />
<br />
<div style="text-align: left;">
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px;">Recursos -> JDBC -> Proveedores de JDBC</span></div>
<div>
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px;"><br /></span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDNYN4LTYIhbK-WufJayTK6TsOPnEWhehYXwYD1hor3MkJxO4n3Lpsx6wHivjF5YcT92SHcagl0sCAkgns_2W51xihuGBn-s_xAId_JOgbEzr5f8Us1K73lw_BQ-8rb4a_qaCSaj-qVyU4/s1600/7C.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="512" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDNYN4LTYIhbK-WufJayTK6TsOPnEWhehYXwYD1hor3MkJxO4n3Lpsx6wHivjF5YcT92SHcagl0sCAkgns_2W51xihuGBn-s_xAId_JOgbEzr5f8Us1K73lw_BQ-8rb4a_qaCSaj-qVyU4/s640/7C.png" width="640" /></a></div>
<div style="text-align: left;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;"><br /></span></span></div>
<div style="text-align: left;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;">Este proveedor de JDBC usa ojbc14.jar </span></span></div>
<div style="text-align: left;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;"><br /></span></span></div>
<div style="text-align: left;">
<span style="font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;">${ORACLE_JDBC_DRIVER_PATH}/ojdbc14.jar</span></span></div>
<br />
<span style="color: #666666; font-family: 'Courier New', Courier, monospace;">Lo cual requiere crear la variable de entorno MYSQL_JDBC_DRIVER_PATH en ámbito alfresco34 apuntando a la ruta que contiene el JAR.</span><br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">Por ejemplo</span><br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"><br /></span><br />
<div style="text-align: left;">
<span style="font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;">/datos/jdbc_drivers</span></span></div>
<div style="text-align: left;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;"><br /></span></span></div>
<div style="text-align: left;">
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px;">Seleccionar el Tipo de Base de Datos, Tipo de proveedor y Tipo de implementación de acuerdo con la Base de Datos utilizada.</span></div>
<span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></span><br />
<span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">El último paso es crear el Origen de Datos. Es posible hacerlo desde la pantalla anterior o bien desde</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Recursos -> JDBC -> Orígenes de Datos</span></span><br />
<span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrLc3m6PUud49kP-n_GV9ohCV9RvUeH64k4ZdbI776LA7hnxrvkoiepXc5UbOJkBof-o7gBZAj-4kpVDN9FQtnyD04j6mWkiN7a3ZU8cQkobvWlR9DhSiqP9STw6QI72YXtpNPg-37jaur/s1600/17.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="486" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrLc3m6PUud49kP-n_GV9ohCV9RvUeH64k4ZdbI776LA7hnxrvkoiepXc5UbOJkBof-o7gBZAj-4kpVDN9FQtnyD04j6mWkiN7a3ZU8cQkobvWlR9DhSiqP9STw6QI72YXtpNPg-37jaur/s640/17.jpeg" width="640" /></a></div>
<span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></span><br />
<span style="color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">El último paso es crear un Origen de Datos a partir del Proveedor creado y vincularlo al JAAS. Si todo ha ido bien</span><span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"> realizamos una prueba de conexión y obtenemos un mensaje satisfactorio.</span><br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"><br /></span><br />
<div style="text-align: left;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;">Para MYSQL o MSSQL deberemos también de especificar </span></span></div>
<div style="text-align: left;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;"><br /></span></span></div>
<div style="text-align: left;">
<span style="font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;">Propiedades Personalizadas del origen de datos</span></span></div>
<div style="text-align: left;">
<span style="font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;"><br /></span></span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;">en el caso concreto de Mysql, son tres </span></span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;">(serverName databaseName y port)</span></span></div>
<span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></span><br />
<span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-family: 'Courier New', Courier, monospace;">en el caso de mssql</span></span><br />
<div style="text-align: -webkit-auto;">
<span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-family: 'Courier New', Courier, monospace;">(</span></span><span style="color: #626262; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;">databaseName,serverName,portNumber,selectMethod)</span></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;"><br /></span></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;"><br /></span></span></div>
<span style="font-family: 'Courier New', Courier, monospace;"><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-size: large;">Creación de la librería MyFaces</span></strong></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="font-size: large;"><b><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /></b></span><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Para poder instalar Alfresco sobre WebSphere es necesario sobreescribir la implementación de Myfaces de la que dispone WAS. Esto es necesario ya que ésta no es compatible con Alfresco. Lo único que tenemos que hacer es crear una librería compartida con los JARs que componen la implementación de Alfresco y vincularla en el arranque de Alfresco.</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">El EAR de Alfresco ya viene preconfigurado para esto</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">META-INF/ibmconfig</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Basta con copiar el directorio </span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"> </span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">myfaces1_1 </span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En la raíz del WAS, </span></span><span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">${WAS_INSTALL_ROOT}</span><br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Más adelante en el momento de la instalación asociaremos esta librería al EAR de Alfresco</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-size: large;">Definición de los parseadores XML</span></strong></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="font-size: large;"><b><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /></b></span><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Para que todas las funcionalidades de los Servicios Web funcionen correctamente, es necesario cambiar los parseadores XML que usa Websphere.</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Para ello debemos de editar el fichero jaxp.properties ubicado en</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">${WAS_INSTALL_ROOT}/java/jre/lib</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">y descomentar las siguientes lineas</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">javax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl<br />javax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; font-size: large; line-height: 22px; text-align: left;"><strong>Configuración de Alfresco y Share</strong></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="font-size: large;"><b><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /></b></span><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En el archivo alfresco-global.properties ponemos lo siguiente</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">dir.root=/opt/alfresco34/alf_data<br /># Necesario siempre en WAS<br />mbean.server.LocateExistingServerIfPossible=false<br /># Configuración de Repositorio<br />db.schema.update=true<br />index.recovery.mode=AUTO<br /># ThirdParty Apps<br />ooo.exe=/path/to/soffice/binary<br />ooo.enabled=false<br />jodconverter.officeHome=/path/to/soffice/home<br />jodconverter.portNumbers=8101<br />jodconverter.enabled=true<br />img.root=${dir.root}/ImageMagick<br />img.exe=/usr/bin/convert<br />swf.exe=/usr/local/bin/pdf2swf<br />#RMI<br /># Si es distinto de 50500 cambiarlo tambien dentro del EAR<br /># en alfresco-share.properties<br />alfresco.rmi.services.external.host=0.0.0.0<br />avm.rmi.service.port=50501<br />avmsync.rmi.service.port=50502<br />attribute.rmi.service.port=50503<br />authentication.rmi.service.port=50504<br />repo.rmi.service.port=50505<br />action.rmi.service.port=50506<br />wcm-deployment-receiver.rmi.service.port=50507<br /># Contextos<br />alfresco.context=alfresco<br />alfresco.host=${localname}<br />alfresco.port=9080<br />alfresco.protocol=http<br />share.context=share<br />share.host=${localname}<br />share.port=9080<br />share.protocol=http</span><br style="background-color: white; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"> Otro fichero que es necesario configurar es el share-config-custom.xml dentro del web-extension donde se definen los endpoints que conectan Share con Alfresco, hay que pensar que el Share pude correr tranquilamente en otra maquina distinta.</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Su ubicación es </span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; line-height: 22px; text-align: left;">${SHARED_LIB_DIR}/alfresco/web-extension</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Donde básicamente tenemos que cambiar todas los puertos para que coincidan con los del servidor, así como la URL de descarga de Webdav, que hay que especificarla tal y como la ve el usuario final, no lo pongo aquí por limpieza y tenemos un .sample que podemos usar de ejemplo.</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-size: large;">Instalación de Alfresco.EAR</span></strong></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="font-size: large;"><b><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /></b></span><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En este punto ya es posible comenzar el despliegue del EAR de Alfresco . Accedemos a la consola administrativa y nos dirigimos a</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Aplicaciones -> Aplicación Nueva -> Nueva Aplicación de Empresa</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En la pantalla de instalación se selecciona el archivo EAR pulsando en el botón Examinar. A continuación se elige la opción </span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Detallada, con </span></span><span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">todas las opciones y todos los parámetros de la instalación y se pulsa el botón Siguiente.</span><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En el</span><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;"> Paso 1</strong><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"> no es necesario cambiar nada, a parte del nombre de la aplicación. Se pulsa el botón Siguiente para continuar.</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En el </span><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Paso 2</strong><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"> vinculamos la aplicación al ámbito que aplique, si hemos creado un servidor lógico para alfresco es el momento de vincularlo.</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN2sL3LbAX52ft9SSd8JJqB_keAdiLCK1izeAWWznzW5-iP8T4dZIthS-PYSgG60RD6oWsC1sIL_aBW4lqB_ho1377Q7zq_rPXbAVBj1fzCFPxjquqKKfEJ-nAjYx_6DYafjx4LBvluBTf/s1600/24.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="486" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN2sL3LbAX52ft9SSd8JJqB_keAdiLCK1izeAWWznzW5-iP8T4dZIthS-PYSgG60RD6oWsC1sIL_aBW4lqB_ho1377Q7zq_rPXbAVBj1fzCFPxjquqKKfEJ-nAjYx_6DYafjx4LBvluBTf/s640/24.jpeg" width="640" /></a><span style="font-family: 'Courier New', Courier, monospace;"><br /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En el </span><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Paso 3</strong><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"> dejamos el valor por defecto</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En el </span><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Paso 4</strong><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"> de la instalación se configuran las bibliotecas compartidas. Para ello hay que seleccionar la aplicación Alfresco que estamos instalando y a continuación pulsar el el botón Bibliotecas Compartidas de referencia.</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFX5dCYp-bujJwM6xfvn8-mDgZclDH4lXPuWkKTrDcSvzsEWcVw0GTL62E20JYVS4sYtVkwVDTHuVh-I4aq_eR1HyQD9NIfxp0GOi4E1Fm6K136Q9inA_9U3FJTyUSso-92YhT8t-_bEqq/s1600/26.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="486" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFX5dCYp-bujJwM6xfvn8-mDgZclDH4lXPuWkKTrDcSvzsEWcVw0GTL62E20JYVS4sYtVkwVDTHuVh-I4aq_eR1HyQD9NIfxp0GOi4E1Fm6K136Q9inA_9U3FJTyUSso-92YhT8t-_bEqq/s640/26.jpeg" width="640" /></a></div>
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En esta pantalla se selecciona la biblioteca que se ha definido anteriormente y se añade a la lista de la derecha pulsando el botón >> y después el botón Aceptar.</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Se comprueba que la biblioteca se ha añadido correctamente antes de continuar con la instalación.</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En el </span><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Paso 5</strong><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"> pantalla no es necesario cambiar nada. Se pulsa el botón Siguiente para continuar.</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En el </span><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Paso 6</strong><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"> incializa los parámetros de los servlets, lo dejamos como esta.</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En el <b>paso 7</b> se selecciona el origen de datos creado previamente así como el método de autenticación.</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6ALg2kYMk3razug5Rpu8YAAEOVUtjxHqurqoEKXaq8bIrVlijWZjejTXYHrd7zncTADkuUrsPgkoSAoTFivIbCftQrhx4Dn3HQOcT6o9cEDpkuhoI-APTFYlYgDmCnifuM_9v22ShUH91/s1600/30.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="486" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6ALg2kYMk3razug5Rpu8YAAEOVUtjxHqurqoEKXaq8bIrVlijWZjejTXYHrd7zncTADkuUrsPgkoSAoTFivIbCftQrhx4Dn3HQOcT6o9cEDpkuhoI-APTFYlYgDmCnifuM_9v22ShUH91/s640/30.jpeg" width="640" /></a></div>
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En el </span><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Paso 8</strong><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"> vinculamos la aplicación a alguno de los vhost, normalmente a default_host</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En el </span><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Paso 9</strong><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"> establecemos el nombre de los contextos para Alfresco y Share</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-8ALPfW8FHZao9ageKkXFCQTsZKHr70qaM_QMCcFTRgG4qlHLhGnnP65ufKfQrxS75C_Gm8M-vowK8-zOESq0oBdVE9wbNQzwWtYjFO7dKVYWUKg49xmoo1k-z1tHTbSLuTFrVVK029SK/s1600/32.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="486" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-8ALPfW8FHZao9ageKkXFCQTsZKHr70qaM_QMCcFTRgG4qlHLhGnnP65ufKfQrxS75C_Gm8M-vowK8-zOESq0oBdVE9wbNQzwWtYjFO7dKVYWUKg49xmoo1k-z1tHTbSLuTFrVVK029SK/s640/32.jpeg" width="640" /></a></div>
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En el </span><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Paso 10</strong><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"> se introducen las propiedades definidas en el web.xml de Alfresco. Los properties de Hibernate se pueden dejar en blanco par que sea Websphere quien decida automáticamente los valores adecuados. </span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">El dir.root no es necesario ponerlo aquí ya que lo lee perfectamente de alfresco-global.properties.</span></span><br />
<div style="text-align: left;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihnVgRZWDCicuk_tXbtQk8wc0qHzTP_mmwD-BrpExkqNGhZhuegI-ogMGzSZufkEjfBceiG5DFGlhTueN16wWXW7sj6LHXa7KraH7dlO0yfHHUtRDcq6r11UfQXhCfT7BgkQDz6iCqEji_/s1600/33.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="486" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihnVgRZWDCicuk_tXbtQk8wc0qHzTP_mmwD-BrpExkqNGhZhuegI-ogMGzSZufkEjfBceiG5DFGlhTueN16wWXW7sj6LHXa7KraH7dlO0yfHHUtRDcq6r11UfQXhCfT7BgkQDz6iCqEji_/s640/33.jpeg" width="640" /></a></div>
<div style="text-align: left;">
<span style="color: #626262; font-family: 'Courier New', Courier, monospace;"><span style="line-height: 22px;"><br /></span></span></div>
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Por último se muestra la pantalla de resumen en la que hay que pulsar el botón Finalizar para concluir con el despliegue de la aplicación de empresa. Un vez termina nos pregunta si queremos guardar todo lo que hemos hecho, le decimos guardar y ya tenemos Alfresco instalado. </span></span><br />
<span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-size: large;">Instalación de la licencia</span></strong></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="font-size: large;"><b><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /></b></span><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">La versión Enterprise de Alfresco requiere una licencia para funcionar, aunque nos da también 30 días de Trial. La licencia es un fichero con extensión .lic que deberemos solicitar a Alfresco una vez formalizamos el contrato. El fichero (una copia de él) se copia en la carpeta</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; line-height: 22px; text-align: left;">/opt/alfresco34/config/alfresco/extension/license.</span><br style="background-color: white; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En caso de que no exista el directorio, lo creamos. En el primer arranque Alfresco mete la información de la misma en BBDD y renombra el fichero a .lic.installed</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="color: #666666;">Alfresco ha tenido tradicionalmente problemas con la licencia al reiniciar. Si observas que el repositorio se pone en Solo Lectura con el mensaje "Invalid License!", renombra .lic.installed a .lic y reinicia el servidor. </span></span><br />
<div style="text-align: left;">
<span style="font-family: 'Courier New', Courier, monospace;"><span style="color: #626262; font-size: large;"><span style="line-height: 22px;"><b>Otras consideraciones</b></span></span></span></div>
<br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="font-size: large;"><b><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /></b></span><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Servlet API</strong></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Si nuestro servidor no tiene salida a internet, recomendable en producción, tendremos problemas con JSF.</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; text-align: left;"><span style="line-height: 22px;">La razón es que Websphere 7 intenta traerse los XDS de MyFaces y lógicamente obtenemos un timeOut. Para solucionarlo basta con copiar la librería</span></span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br /><span style="background-color: white; line-height: 22px; text-align: left;">servlet-api.jar</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">Desde cualquier tomcat6,de</span></span><span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"> </span><span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">y copiarla</span><span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;"> en ${WAS_INSTALL_ROOT}/lib</span><br />
<span style="background-color: white; color: #626262; font-family: 'Courier New', Courier, monospace; line-height: 22px; text-align: left;">Necesitamos reiniciar el Servidor de Aplicaciones para que cargue la librería</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-size: small;">Oracle11g</span></strong><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">La propiedad personalizada oracle9iLogTraceLevel</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">del Origen de datos debe de estar en blanco</span><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /><strong style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><span style="font-size: small;">Websphere 6.1</span></strong></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><b><br style="background-color: white; color: #626262; line-height: 22px; text-align: left;" /></b><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">En instalaciones de was6.1 necesitamos establecer el valor de la compilación de las JSP a 15, que podemos configurar desde la consola de administración en el momento de la instalación</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;">(opción "precompilar JSPs")</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><span style="background-color: white; color: #626262; line-height: 22px; text-align: left;"><br /></span></span></div>Mikel Aslahttp://www.blogger.com/profile/12456539501166715259noreply@blogger.com0