Scrutari

De FphAdmin.

[modifier] Installation

Création d'un utilisateur tomcat par Root

adduser tomcat

Connexion avec l'utilisateur tomcat. On se trouve dans /home/tomcat.

Téléchargement de Java sur le site (ex: wget). Le fichier est un .bin

wget http://javadl.sun.com/webapps/download/AutoDL?BundleId=29210

Le rendre exécutable (chmod), l'exécuter, Java est décompressé.


Télécharger le zip de Tomcat, le décompresser.

Rendre les scripts de apache-tomcat-*/bin exécutable

chmod u+x *.sh


Ajout au début du fichier apache-tomcat-*/bincatalina.sh :

JAVA_HOME=/home/tomcat/jre1.6.0_13
JAVA_OPTS="-Xmx320m -XX:MaxPermSize=156m"


Création du répertoire : /home/tomcat/webapps-scrutari

Dans conf, créer Catalina/localhost, dans le fichier server.xml rajout du connecteur Apache :

<Connector port="8081" proxyPort="80" proxyName="sct1.scrutari.net"/>

Repasser en root dans /etc/apache2/sites-available/ création d'un fichier scrutari.net

Ajout du texte suivant (afin d'accéder à Tomcat via Apache) :

<VirtualHost 88.191.92.9:80>
 ServerName	sct1.scrutari.net
 ServerAlias	coredem.scrutari.net
ProxyPass         /  http://localhost:8081/
ProxyPassReverse  /  http://localhost:8081/
</VirtualHost>

Faire un lien symbolique dans ln -s /etc/apache2/sites-enable ln -s /etc/apache2/sites-available/scrutari.net

Relancer Apache

[modifier] Ajout d'une nouvelle application

Les nouveaux moteurs sont rajoutés dans /home/tomcat/webapps-scrutari

Si lié à un autre nom de domaine, rajouter dans /etc/apache2/sites-available/scrutari.net le ServerAlias correspondant :

<VirtualHost 88.191.92.9:80>
 ServerName	sct1.scrutari.net
 ServerAlias	coredem.scrutari.net
ServerAlias nouvel alias
ProxyPass         /  http://localhost:8081/
ProxyPassReverse  /  http://localhost:8081/
</VirtualHost>


Dans apache-tomcat-*/conf/Catalina/localhost, créer un fichier par contexte avec le contenu suivant : <Context docBase="/home/tomcat/webapps-scrutari/sct-coredem"/>