Installer Tomcat avec IIS sur une machine personnelle c'est une chose, mais l'installer sur un vrai serveur c'est autre chose. Moi je fonctionne avec Tomcat depuis plusieurs années au niveau développement, justement parce qu'il est gratuite et très efficace. Cependant, j'ai rarement eu la tâche facile lorsqu'il s’agissait de l'installer sur un vrai serveur.
IL faut prendre compte que mon installation est fait dans le D, mais vous pouvez faire votre installation dans le C.
Après avoir installé Tomcat comme service (version Tomcat 6.0.13), il faut configurer IIS pour Tomcat. Voici deux liens utiles :
http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.9/
Vous téléchargez isapi_redirect-1.2.9.dll et que vous renommez isapi_redirect.dll. Vous le placer dans un D:\Tomcat6\bin\win32\i386. Ensuite, il faut changer la base de registre de Windows. Mettez le contenu suivant dans fichier que vous pouvez nommer iis_redirect.reg et exécutez le :
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0]
"extension_uri"="/jakarta/isapi_redirect.dll"
"log_file"="D:\\Tomcat6\\logs\\iis_redirect.log"
"log_level"="emerg"
"worker_file"="D:\\Tomcat6\\conf\\workers.properties"
"worker_mount_file"="D:\\Tomcat6\\conf\\uriworkermap.properties"
Là vous ouvrez IIS et dans le site web (si c’est local c’est Default sinon c’est le nom de votre site web) et vous allez dans les propriétés. Vous cliquez sur « ISAPI Filters » (moi c’est en anglais!) et vous ajoutez un filtre. Vous le nommez « isapi_redirect » et vous mettez l’emplacement du isapi_redirect.dll (dans mon cas c’est D:\Tomcat6\bin\win32\i386\isapi_redirect.dll). Après vous allez dans le site web et vous créer un répertoire virtuel que vous appeler « jakarta ».
Ensuite vous devez configurer les fichiers workers.properties et uriworkermap.properties
Pour uriworkermap.properties c’est simple, il charger les projets qui ont dans webapps de la manière suivante :
default.worker=ajp13
/docs=$(default.worker)
/docs/*=$(default.worker)
/examples=$(default.worker)
/examples/*=$(default.worker)
/host-manager=$(default.worker)
/host-manager/*=$(default.worker)
/manager=$(default.worker)
/manager/*=$(default.worker)
Là ou c’est plus compliqué, il faut configuer workers.properties
workers.tomcat_home=D:\Tomcat6
workers.java_home=C:\Program Files\Java\jre1.6.0_02
ps=/
# The workers that your plugins should create and work with
#
# Add 'inprocess' if you want JNI connector
worker.list=ajp12, ajp13
# Defining a worker named ajp12 and of type ajp12
# Note that the name and the type do not have to match.
#
worker.ajp12.port=8007
worker.ajp12.host=localhost
worker.ajp12.type=ajp12
#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
# ----> lbfactor must be > 0
# ----> Low lbfactor means less work done by the worker.
worker.ajp12.lbfactor=1
# Defining a worker named ajp13 and of type ajp13
# Note that the name and the type do not have to match.
#
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
# ----> lbfactor must be > 0
# ----> Low lbfactor means less work done by the worker.
worker.ajp13.lbfactor=1
# The loadbalancer (type lb) workers perform wighted round-robin
# load balancing with sticky sessions.
# Note:
# ----> If a worker dies, the load balancer will check its state
# once in a while. Until then all work is redirected to peer
# workers.
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp12, ajp13
# Defining a worker named inprocess and of type jni
# Note that the name and the type do not have to match.
#
worker.inprocess.type=jni
#
# Setting the command line for tomcat.
# Note: The cmd_line string may not contain spaces.
#
worker.inprocess.cmd_line=start
#
# The JVM that we are about to use
#
# This is for Java2
#
# Windows
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)client$(ps)jvm.dll
# IBM JDK1.3
#worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)libjvm.so
# Unix - Sun VM or blackdown
#worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)classic$(ps)libjvm.so
#
# Setting the place for the stdout and stderr of tomcat
#
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr
Voilà bonne chance. Mais comme je vous dit, configuer sa localement, cest une chose, le faire sur un serveur c’est autre. SI votre serveur n’a pas de Firewall hardware ou que votre réseau Intranet n’est pas gérer par un Firewall vous aurrez moins de problème sinon vous pouvez toujours utiliser le port 8080 pour sortie et voir Tomcat
Exemple : http://nomdedomaine:8080/nom_du_projet_Tomcat_dans_webapps
Si vous faite sa, vous avez juste à installer Tomcat et c’est tout…