Skip to content

Apache WebDAV – Centos 5

centos server 5.2

para compilar el conector jk necesitaremos el archivo apxs que viene con el httpd-devel

asi que:

1yum install httpd-devel

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 :

1tar -xvzf apache-tomcat-5.5.27.tar.gz

and then create a link :

1ln -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 :

1chmod 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 :

1tar -xvz fapache-ant-1.7.0-bin.tar.gz

create a link :

1ln -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.

1JAVA_HOME=/usr/local/java/jdk1.5.0_03
2ANT_HOME=/usr/local/ant
3PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME
4export PATH JAVA_HOME ANT_HOME
5CATALINA_HOME=/usr/local/tomcat
6export CATALINA_HOME
7CLASSPATH=$CATALINA_HOME/common/lib/servlet.jar
8CATALINA_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:

1tar -xvz fjakarta-tomcat-connectors-1.2.15-src.tar.gz

then we enter into the folder created entered the directory

1cd jk/native

there run the command :

1./buildconf.sh

then :

1./configure --with-apxs=/usr/sbin/apxs --enable-EAPI

after:

and finally:

1make install

That mod_jk.so to copy the folder / usr / lib / httpd / modules /

Now it's time to change the apache config file

1vim /etc/http/conf/httpd.conf

in the section add the load module

1LoadModule jk_module modules/mod_jk.so

y luego en la seccion 3

1JkWorkersFile "conf/workers.properties"
2JkLogFile "logs/mod_jk.log"
3JkLogLevel info
4JkLogStampFormat "[%a %b %d %H:%S %Y] "
5JkMount /jsp-examples default
6JkMount /jsp-examples/* default

eso quiere decir que tenemos que crear el archivo workers.properties en el directorio conf del apache

1vi /etc/httpd/conf/workers.properties

con el siguiente contenido:

1workers.tomcat_home=$CATALINA_HOME
2workers.java_home=$JAVA_HOME
3ps=/
4worker.list=default
5worker.default.port=8009
6worker.default.host=localhost
7worker.default.type=ajp13
8worker.default.lbfactor=1

creo que hasta ahi ya podriamos probar

ingresamos al directorio bin del tomcat

1cd /usr/local/tomcat/bin/

y ejecutamos :

1./catalina.sh start

deberiamos ver

1Using CATALINA_BASE: /usr/local/tomcat
2Using CATALINA_HOME: /usr/local/tomcat
3Using CATALINA_TMPDIR: /usr/local/tomcat/temp
4Using JRE_HOME: /usr/local/java/jdk1.5.0_03

para comprobar el correcto funcionamiento:

1netstat -an |grep tcp |grep 8080

y nos muestra:

1tcp 0 0 :::8080 :::* LISTEN

ahora levantamos el apache

1service httpd start

 

1Starting httpd: [ OK ]

probamos

Apache

1http://localhost

Tomcat:

1http://localhost:8080

Y el conector mod_jk:

1http://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

1JkMount /aplicacion default
2JkMount /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

1vim /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;

1http://localhost:8080/

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/