centos server 5.2
para compilar el conector jk necesitaremos el archivo apxs que viene con el httpd-devel
asi que:
Eso resolverá las dependencias e instalara lo necesario por esa parte.
luego descargamos elapache-tomcat-5.5.27.tar.gz
we take / usr / local /
ahi decompress it :
1 | tar -xvzf apache-tomcat-5.5.27.tar.gz |
and then create a link :
1 | ln -s apache-tomcat-5.5.27 tomcat |
Now download the jdk-1_5_0_03-linux-i586.bin
creamos una carpeta en /usr/local/ llamada java y ahi llevamos el jdk
luego le cambiamos los permisos :
1 | chmod 755 jdk-1_5_0_03-linux-i586.bin |
and execute to install :
1 | ./jdk-1_5_0_03-linux-i586.bin |
he downloaded apache-ant-1.7.0-bin.tar.gz
we took him to the path / usr / local /
decompress it :
1 | tar -xvz fapache-ant-1.7.0-bin.tar.gz |
create a link :
1 | ln -s apache-ant-1.7.0 ant |
Now it is time to modify the / etc / profile
and add the following to the end of the file.
1 | JAVA_HOME=/usr/local/java/jdk1.5.0_03 |
3 | PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME |
4 | export PATH JAVA_HOME ANT_HOME |
5 | CATALINA_HOME=/usr/local/tomcat |
7 | CLASSPATH=$CATALINA_HOME/common/lib/servlet.jar |
8 | CATALINA_OPTS= '-Djava.awt.headless=true' |
Now download the connector jakarta-tomcat-connectors-1.2.15-src.tar.gz
we took him to the path / usr / src /
ahi decompress it:
1 | tar -xvz fjakarta-tomcat-connectors-1.2.15-src.tar.gz |
then we enter into the folder created entered the directory
there run the command :
then :
1 | ./configure -- with -apxs=/usr/sbin/apxs --enable-EAPI |
after:
and finally:
That mod_jk.so to copy the folder / usr / lib / httpd / modules /
Now it's time to change the apache config file
1 | vim /etc/http/conf/httpd.conf |
in the section add the load module
1 | LoadModule jk_module modules/mod_jk.so |
y luego en la seccion 3
1 | JkWorkersFile "conf/workers.properties" |
2 | JkLogFile "logs/mod_jk.log" |
4 | JkLogStampFormat "[%a %b %d %H:%S %Y] " |
5 | JkMount /jsp-examples default |
6 | JkMount /jsp-examples/* default |
eso quiere decir que tenemos que crear el archivo workers.properties en el directorio conf del apache
1 | vi /etc/httpd/conf/workers.properties |
con el siguiente contenido:
1 | workers.tomcat_home=$CATALINA_HOME |
2 | workers.java_home=$JAVA_HOME |
5 | worker. default .port=8009 |
6 | worker. default .host=localhost |
7 | worker. default .type=ajp13 |
8 | worker. default .lbfactor=1 |
creo que hasta ahi ya podriamos probar
ingresamos al directorio bin del tomcat
1 | cd /usr/local/tomcat/bin/ |
y ejecutamos :
deberiamos ver
1 | Using CATALINA_BASE: /usr/local/tomcat |
2 | Using CATALINA_HOME: /usr/local/tomcat |
3 | Using CATALINA_TMPDIR: /usr/local/tomcat/temp |
4 | Using JRE_HOME: /usr/local/java/jdk1.5.0_03 |
para comprobar el correcto funcionamiento:
1 | netstat -an |grep tcp |grep 8080 |
y nos muestra:
1 | tcp 0 0 :::8080 :::* LISTEN |
ahora levantamos el apache
probamos
Apache
Tomcat:
Y el conector mod_jk:
1 | http: //localhost/jsp-examples |
hasta ahi si salio todo bien deberiamos poder navegar por el directorio de los ejemplos
Now if we deploy a new application into a war file
assuming that our war is called apliacion.war
first modify the apache file added to the end
1 | JkMount /aplicacion default |
2 | JkMount /aplicacion/* default |
deploy the war and then placing it in the / usr / local / tomcat / webapps /
el apache se encarga de descomprimirlo y deplegarlo creando una carpeta con el nombre del archivo tambien se puede desplegar desde el manager del tomcat
first modify the tomcat users file
1 | vim /usr/local/tomcat/conf/tomcat-users.xml |
add the admin and manager roles
1 | <ROLE rolename= "admin" /> |
2 | <ROLE rolename= "manager" /> |
and add a user and password with those roles
1 | <USER roles= "tomcat" password= "tomcat" username= "tomcat" /> |
2 | <USER roles= "manager" password= "manager" username= "manager" /> |
then when we enter the address;
go to the link manager put the username and password and from there we can upload our files war
restart the apache tomcat and tried..
SOURCE: http://rkcomt.blogspot.com/2010/02/apache-webdav-centos-5.html
http://www.jmarior.net/itank/l/webdav-server/