Il y a 389 articles et 19 utilisateurs inscrits (ce bandeau est défini dans MediaWiki:Sitenotice)
« Doc/College de France » : différence entre les versions
m missing heading section |
création+catégories |
||
| Ligne 1 : | Ligne 1 : | ||
{{important|Tout ce fait en {{value|root}}}} | {{important|Des modifications sont effectuées sur les sources Pleade et sur le serveur par les agents du Collège de France}} | ||
{{notice|Tout ce fait en {{value|root}}}} | |||
== Serveur passerelle : {{value|Bernard}} == | |||
{{important|Il faut d'abord passer par le serveur '{{value|bernard}}' qui lui est placé sur la DMZ. En effet, les applications sont hébergées sur le serveur {{value|schaeffer}}. Ce serveur n'est pas directement visible depuis l'extérieur}} | |||
Sur les serveurs, on ne peut pas se connecter en {{value|root}} directement, il faut passer par l'utilisateur {{value|ajlsm}}. | |||
Toute la documentation sur les différentes configuartions techniques se trouvent sur le redmine et le svn. | |||
{| class="wikitable sortable" | |||
|- | |||
! Description !! Valeur !! Commentaire | |||
|- | |||
| Adresse IP || {{path|193.52.22.108}} || | |||
|- | |||
| Nom de domaine || [http://salamandre.college-de-france.fr salamandre.college-de-france.fr] || | |||
|- | |||
| SSH || {{value|22}} || | |||
* utilisateur : {{value|root}} | |||
* utilisateur : {{value|ajlsm}} | |||
* accès par clé publique ou mot de passe. | |||
|} | |||
=== Utilisateurs Unix === | |||
{|class="wikitable sortable centre" | |||
! Utilisateur !! Description | |||
|- | |||
| {{value|root}} || {{todo|à compléter}} | |||
|- | |||
| {{value|ajlsm}} || {{todo|à compléter}} | |||
|- | |||
| <s>{{value|backupAgent}}</s> || - | |||
|} | |||
== {{value|Bernard}} (serveur publique) == | |||
{| class="wikitable sortable" | |||
|- | |||
! Description !! Valeur !! Commentaire | |||
|- | |||
| Adresse IP || {{path|192.168.202.122}} || Réseau local | |||
|- | |||
| Nom de domaine || {{path|schaeffer}} || résolu par un DNS | |||
|- | |||
| tomcat || {{value|?}} || ? | |||
|- | |||
| SSH || {{value|22}} || | |||
* utilisateur : {{value|j.cwiklinski}} | |||
* accès par clé publique. | |||
|- | |||
|} | |||
=== Utilisateurs Unix === | |||
{|class="wikitable sortable centre" | |||
! Utilisateur !! Description | |||
|- | |||
| {{value|root}} || {{todo|à compléter}} | |||
|- | |||
| {{value|ajlsm}} || {{todo|à compléter}} | |||
|- | |||
| <s>{{value|backupAgent}}</s> || - | |||
|} | |||
==== Logiciels ==== | |||
{| class="wikitable sortable" | |||
|- | |||
! Description !! Valeur !! Commentaire | |||
|- | |||
| OS || {{value|Red Hat Enterprise Linux Server release 6.1 (Santiago)}} (amd64) || - | |||
|- | |||
| Java || {{value|1.6.0_21-b07}} || - | |||
|- | |||
| Tomcat || {{value|6.0.29}} || | |||
* version télécharger sur le site officiel | |||
* 5 instances ont été créée : | |||
*# {{value|atelier}}, | |||
*# {{value|home}}, | |||
*# {{value|preprod}}, | |||
*# {{value|prod}}, | |||
*# {{value|slecture}}. | |||
|- | |||
| Apache || {{value|2.2.15+15.el6_2.1}} || issu des dépôts | |||
|- | |||
| Imagemagick || {{value|6.5.4.7+5.el6}} || issu des dépôts | |||
|- | |||
| Postgresql || {{value|8.4.7+2.el6}} || issu des dépôts | |||
|} | |||
== Sauvegardes == | == Sauvegardes == | ||
{{todo|Pas de dossier {{path|/home/backupAgent}}, on suppose que les sauvegardes sont gérées par le collège de France. Cela reste à confirmer}} | |||
=== Crontab === | === Crontab === | ||
Aucune tâche cron pour l'utilisateur {{value|ajlsm}}. L'utilisateur {{value|root}} a les tâches suivantes : | |||
<syntaxhighlight lang="bash"> | |||
# Redémarrage du tomcat internet | |||
#1 5 * * * root /bin/sh /opt/tomcat-6.0.29-prod/bin/shutdown.sh -force | |||
#2 5 * * * root /bin/rm -rf /opt/tomcat-6.0.29-prod/temp/* /opt/tomcat-6.0.29-prod/temp/* | |||
#3 5 * * * root /bin/sh /opt/tomcat-6.0.29-prod/bin/startup.sh | |||
</syntaxhighlight> | |||
== Tomcat == | == Tomcat == | ||
=== Localisation des | === Localisation des serveurs === | ||
{| class="wikitable sortable" | |||
|- | |||
! Description !! Atelier !! Home !! Recettage !! Production !! Salle de Lecture | |||
|- | |||
| Emplacement | |||
|| {{path|/opt/tomcat-6.0.29-atelier}} | |||
|| {{path|/opt/tomcat-6.0.29-home}} | |||
|| {{path|/opt/tomcat-6.0.29-preprod}} | |||
|| {{path|/opt/tomcat-6.0.29-prod}} | |||
|| {{path|/opt/tomcat-6.0.29-slecture}} | |||
|- | |||
| Commande || - | |||
|| {{notice|semle incomplet}} | |||
|| - || - || - | |||
|- | |||
| Commande || - || - || - || - || - | |||
|} | |||
=== Ports d'écoutes === | === Ports d'écoutes === | ||
{| class="wikitable sortable" | |||
|- | |||
! Type de Port !! Atelier !! Home !! Recettage !! Production !! Salle de Lecture | |||
|- | |||
| arrêt | |||
|| {{value|800''8''}} | |||
|| - | |||
|| {{value|800''1''}} | |||
|| {{value|800''2''}} | |||
|| {{value|800''3''}} | |||
|- | |||
| écoute (connecteur HTTP) | |||
|| {{value|81''10''}} | |||
|| - | |||
|| {{value|81''04''}} | |||
|| {{value|81''02''}} | |||
|| {{value|81''06''}} | |||
|- | |||
| redirection (connecteur HTTP) | |||
|| {{value|84''47''}} | |||
|| - | |||
|| {{value|84''43''}} | |||
|| {{value|84''43''}} | |||
|| {{value|84''43''}} | |||
|- | |||
| écoute (connecteur AJP/1.3) | |||
|| {{value|81''11''}} | |||
|| - | |||
|| {{value|81''05''}} | |||
|| {{value|81''03''}} | |||
|| {{value|81''07''}} | |||
|- | |||
|- | |||
| redirection (connecteur AJP/1.3) | |||
|| {{value|84''47''}} | |||
|| - | |||
|| {{value|84''43''}} | |||
|| {{value|84''43''}} | |||
|| {{value|84''43''}} | |||
|- | |||
|} | |||
=== Liens vers l'application === | === Liens vers l'application === | ||
{{remarque|On définit le chemin vers le dossier des applications dans le fichier {{path|{{var|$HOME}}/.bashrc}} de la façon suivante : | |||
<syntaxhighlight lang="bash"> | |||
export WEBAPPS="/home/www/webapp" | |||
</syntaxhighlight> | |||
Effectué pour l'utilisateur {{value|ajlsm}} et {{value|root}}}} | |||
{| class="wikitable sortable" | |||
|- | |||
! Atelier !! Home !! Recettage !! Production !! Salle de Lecture | |||
|- | |||
|| | |||
* atelier1 -> {{path|{{var|$WEBAPPS}}/cdf-atelier-pleade-20121102/atelier1}} | |||
* atelier2 -> {{path|{{var|$WEBAPPS}}/cdf-atelier-pleade-20121102/atelier2}} | |||
* atelier3 -> {{path|{{var|$WEBAPPS}}/cdf-atelier-pleade-20121102/atelier3}} | |||
|| - | |||
|| preprod -> {{path|{{var|$WEBAPPS}}/pleade-preprod-current}} | |||
|| prod -> {{path|{{var|$WEBAPPS}}/pleade-prod-current}} | |||
|| slecture -> {{path|{{var|$WEBAPPS}}/pleade-slecture-current}} | |||
|} | |||
=== Configuration du serveur : server.xml === | === Configuration du serveur : server.xml === | ||
{| class="wikitable sortable" | |||
|- | |||
! Atelier !! Home !! Recettage !! Production !! Salle de Lecture | |||
|- | |||
|} | |||
=== Allocation de mémoire === | === Allocation de mémoire === | ||
Toutes les instances ont les même paramètres : | |||
* {{value|Xms400m}} ; | |||
* {{value|Xmx5000m}}. | |||
{| class="wikitable sortable" | |||
|- | |||
! Atelier !! Home !! Recettage !! Production !! Salle de Lecture | |||
|- | |||
|| <syntaxhighlight lang="bash">JAVA_OPTS="-Xms400m -Xmx5000m -Djava.awt.headless=true -server"</syntaxhighlight> | |||
|| - | |||
|| <syntaxhighlight lang="bash">JAVA_OPTS="-Xms400m -Xmx5000m -Djava.awt.headless=true -server"</syntaxhighlight> | |||
|| <syntaxhighlight lang="bash">JAVA_OPTS="-Xms400m -Xmx5000m -Djava.awt.headless=true -server"</syntaxhighlight> | |||
|| <syntaxhighlight lang="bash">JAVA_OPTS="-Xms400m -Xmx5000m -Djava.awt.headless=true -server"</syntaxhighlight> | |||
|} | |||
=== Scripts et redémarrage automatique === | === Scripts et redémarrage automatique === | ||
Bonjour, | |||
J'ai modifié le script bash que vous avez fourni pour qu'il soit générique et permette de gérer les différentes instances. Vous le trouverez en pièce jointe et sur schaeffer dans {{path|/etc/init.d/tomcat-custom}}. | |||
Son utilisation est proche de celle de vos scripts, à la différence qu'il faut indiquer l'instance tomcat à démarrer : | |||
<syntaxhighlight lang="bash"> | |||
/etc/init.d/tomcat-custom stop atelier | |||
</syntaxhighlight> | |||
Vous constaterez que tous les paramètres nécessaires au script sont inclus dans celui-ci. J'ai donc commenté l'inclusion du fichier {{path|/etc/sysconfig/tomcat-*}}. | |||
Une fois son fonctionnement validez, vous pourrez supprimer les scripts : | |||
* {{path|/etc/init.d/tomcat-preprod}} ; | |||
* {{path|/etc/init.d/tomcat-prod}} ; | |||
* {{path|/etc/init.d/tomcat-slecture}}. | |||
Et rajouter les entrées correspondante dans {{cmd|crontab}}. | |||
<syntaxhighlight lang="bash"> | |||
#!/bin/bash | |||
# DESCRIPTION | |||
# Modification du script de redémarrage tomcat pour le rendre générique | |||
# | |||
# USAGE | |||
# /etc/init.d/tomcat-custom restart atelier|preprod|prod|slecture | |||
# | |||
# EXAMPLE | |||
# /etc/init.d/tomcat-custom restart atelier | |||
# | |||
#Tomcat | |||
# | |||
#chkconfig: 345 84 15 | |||
#Description: Start up the Tomcat servlet engine | |||
#Config: /etc/sysconfig/tomcat-preprod | |||
#processname: tomcat-preprod | |||
#pidfile: /var/run/catalina-preprod.pid | |||
#Source function library | |||
. /etc/init.d/functions | |||
#Loading the configuration parameters | |||
#if [ -f /etc/sysconfig/tomcat-preprod ]; then | |||
# . /etc/sysconfig/tomcat-preprod | |||
#fi | |||
RETVAL=0 | |||
catalina_homes="/opt/tomcat-6.0.29" # racine commune de TOUTES les instances Tomcat | |||
instance="$2" # instance à démarrer/arrêter (doit être fourni en paramètre) | |||
instanceList=("atelier" "preprod" "prod" "slecture") # liste des applications gérées | |||
# Si l'instance est indéfinie on quitte ! | |||
if [[ -z "$instance" ]] | |||
then | |||
IFS="," # séparator pour les éléments de la liste | |||
printf "[!] Vous devez indiquer une instance parmi: %s\n" "${instanceList[*]}" | |||
exit 1 | |||
else | |||
JAVA_HOME="/opt/java/jdk1.6.0_21" | |||
PATH=$PATH:"$JAVA_HOME/bin" | |||
CATALINA_HOME="$catalina_homes-$instance/" # dossier de l'instance | |||
CATALINA_BASE="$CATALINA_HOME" | |||
fi | |||
case "$1" in | |||
start) | |||
if [ -f $CATALINA_HOME/bin/startup.sh ]; | |||
then | |||
logger -s "Starting Tomcat" | |||
/bin/su -l root -c $CATALINA_HOME/bin/startup.sh | |||
RETVAL=$? | |||
[ $RETVAL = 0 ] && touch /var/lock/subsys/tomcat-preprod | |||
fi | |||
;; | |||
stop) | |||
if [ -f $CATALINA_HOME/bin/shutdown.sh ]; | |||
then | |||
logger -s "Stopping Tomcat" | |||
/bin/su -l root -c $CATALINA_HOME/bin/shutdown.sh | |||
RETVAL=$? | |||
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/tomcat-preprod | |||
fi | |||
;; | |||
restart) | |||
$0 stop | |||
$0 start | |||
;; | |||
version) | |||
if [ -f $CATALINA_HOME/bin/version.sh ]; | |||
then | |||
logger -s "Display Tomcat Version" | |||
/bin/su -l root -c $CATALINA_HOME/bin/version.sh | |||
RETVAL=$? | |||
fi | |||
;; | |||
*) | |||
echo "Usage: $0 {start|stop|restart|version}" | |||
exit 1 | |||
;; | |||
esac | |||
exit $RETVAL | |||
</syntaxhighlight> | |||
== PostreSQL == | == PostreSQL == | ||
== Apache == | == Apache == | ||
=== Port d'écoute === | === Port d'écoute === | ||
=== Atelier === | |||
=== Home === | |||
=== Recette === | |||
=== Production === | === Production === | ||
=== | === Salle de Lecture === | ||
== Application(s) Pleade == | == Application(s) Pleade == | ||
=== Emplacements des fichiers === | === Emplacements des fichiers === | ||
| Ligne 32 : | Ligne 322 : | ||
[[category:Doc]] | [[category:Doc]] | ||
[[category:Serveur]] | [[category:Serveur]] | ||
[[category:Tomcat]] | |||
[[category:Maintenance]] | |||
Version du 4 janvier 2013 à 10:48
Serveur passerelle : Bernard
Sur les serveurs, on ne peut pas se connecter en root directement, il faut passer par l'utilisateur ajlsm.
Toute la documentation sur les différentes configuartions techniques se trouvent sur le redmine et le svn.
| Description | Valeur | Commentaire |
|---|---|---|
| Adresse IP | 193.52.22.108 | |
| Nom de domaine | salamandre.college-de-france.fr | |
| SSH | 22 |
|
Utilisateurs Unix
| Utilisateur | Description |
|---|---|
| root |
To do :
à compléter. |
| ajlsm |
To do :
à compléter. |
| - |
Bernard (serveur publique)
| Description | Valeur | Commentaire |
|---|---|---|
| Adresse IP | 192.168.202.122 | Réseau local |
| Nom de domaine | schaeffer | résolu par un DNS |
| tomcat | ? | ? |
| SSH | 22 |
|
Utilisateurs Unix
| Utilisateur | Description |
|---|---|
| root |
To do :
à compléter. |
| ajlsm |
To do :
à compléter. |
| - |
Logiciels
| Description | Valeur | Commentaire |
|---|---|---|
| OS | Red Hat Enterprise Linux Server release 6.1 (Santiago) (amd64) | - |
| Java | 1.6.0_21-b07 | - |
| Tomcat | 6.0.29 |
|
| Apache | 2.2.15+15.el6_2.1 | issu des dépôts |
| Imagemagick | 6.5.4.7+5.el6 | issu des dépôts |
| Postgresql | 8.4.7+2.el6 | issu des dépôts |
Sauvegardes
Crontab
Aucune tâche cron pour l'utilisateur ajlsm. L'utilisateur root a les tâches suivantes :
# Redémarrage du tomcat internet
#1 5 * * * root /bin/sh /opt/tomcat-6.0.29-prod/bin/shutdown.sh -force
#2 5 * * * root /bin/rm -rf /opt/tomcat-6.0.29-prod/temp/* /opt/tomcat-6.0.29-prod/temp/*
#3 5 * * * root /bin/sh /opt/tomcat-6.0.29-prod/bin/startup.sh
Tomcat
Localisation des serveurs
| Description | Atelier | Home | Recettage | Production | Salle de Lecture |
|---|---|---|---|---|---|
| Emplacement | /opt/tomcat-6.0.29-atelier | /opt/tomcat-6.0.29-home | /opt/tomcat-6.0.29-preprod | /opt/tomcat-6.0.29-prod | /opt/tomcat-6.0.29-slecture |
| Commande | - |
Notice :
semle incomplet. |
- | - | - |
| Commande | - | - | - | - | - |
Ports d'écoutes
| Type de Port | Atelier | Home | Recettage | Production | Salle de Lecture |
|---|---|---|---|---|---|
| arrêt | 8008 | - | 8001 | 8002 | 8003 |
| écoute (connecteur HTTP) | 8110 | - | 8104 | 8102 | 8106 |
| redirection (connecteur HTTP) | 8447 | - | 8443 | 8443 | 8443 |
| écoute (connecteur AJP/1.3) | 8111 | - | 8105 | 8103 | 8107 |
| redirection (connecteur AJP/1.3) | 8447 | - | 8443 | 8443 | 8443 |
Liens vers l'application
Remarques : On définit le chemin vers le dossier des applications dans le fichier $HOME/.bashrc de la façon suivante :
export WEBAPPS="/home/www/webapp"
Effectué pour l'utilisateur ajlsm et root.
| Atelier | Home | Recettage | Production | Salle de Lecture |
|---|---|---|---|---|
|
- | preprod -> $WEBAPPS/pleade-preprod-current | prod -> $WEBAPPS/pleade-prod-current | slecture -> $WEBAPPS/pleade-slecture-current |
Configuration du serveur : server.xml
| Atelier | Home | Recettage | Production | Salle de Lecture |
|---|
Allocation de mémoire
Toutes les instances ont les même paramètres :
- Xms400m ;
- Xmx5000m.
| Atelier | Home | Recettage | Production | Salle de Lecture |
|---|---|---|---|---|
JAVA_OPTS="-Xms400m -Xmx5000m -Djava.awt.headless=true -server"
|
- | JAVA_OPTS="-Xms400m -Xmx5000m -Djava.awt.headless=true -server"
|
JAVA_OPTS="-Xms400m -Xmx5000m -Djava.awt.headless=true -server"
|
JAVA_OPTS="-Xms400m -Xmx5000m -Djava.awt.headless=true -server"
|
Scripts et redémarrage automatique
Bonjour, J'ai modifié le script bash que vous avez fourni pour qu'il soit générique et permette de gérer les différentes instances. Vous le trouverez en pièce jointe et sur schaeffer dans /etc/init.d/tomcat-custom. Son utilisation est proche de celle de vos scripts, à la différence qu'il faut indiquer l'instance tomcat à démarrer :
/etc/init.d/tomcat-custom stop atelier
Vous constaterez que tous les paramètres nécessaires au script sont inclus dans celui-ci. J'ai donc commenté l'inclusion du fichier /etc/sysconfig/tomcat-*. Une fois son fonctionnement validez, vous pourrez supprimer les scripts :
- /etc/init.d/tomcat-preprod ;
- /etc/init.d/tomcat-prod ;
- /etc/init.d/tomcat-slecture.
Et rajouter les entrées correspondante dans crontab.
#!/bin/bash
# DESCRIPTION
# Modification du script de redémarrage tomcat pour le rendre générique
#
# USAGE
# /etc/init.d/tomcat-custom restart atelier|preprod|prod|slecture
#
# EXAMPLE
# /etc/init.d/tomcat-custom restart atelier
#
#Tomcat
#
#chkconfig: 345 84 15
#Description: Start up the Tomcat servlet engine
#Config: /etc/sysconfig/tomcat-preprod
#processname: tomcat-preprod
#pidfile: /var/run/catalina-preprod.pid
#Source function library
. /etc/init.d/functions
#Loading the configuration parameters
#if [ -f /etc/sysconfig/tomcat-preprod ]; then
# . /etc/sysconfig/tomcat-preprod
#fi
RETVAL=0
catalina_homes="/opt/tomcat-6.0.29" # racine commune de TOUTES les instances Tomcat
instance="$2" # instance à démarrer/arrêter (doit être fourni en paramètre)
instanceList=("atelier" "preprod" "prod" "slecture") # liste des applications gérées
# Si l'instance est indéfinie on quitte !
if [[ -z "$instance" ]]
then
IFS="," # séparator pour les éléments de la liste
printf "[!] Vous devez indiquer une instance parmi: %s\n" "${instanceList[*]}"
exit 1
else
JAVA_HOME="/opt/java/jdk1.6.0_21"
PATH=$PATH:"$JAVA_HOME/bin"
CATALINA_HOME="$catalina_homes-$instance/" # dossier de l'instance
CATALINA_BASE="$CATALINA_HOME"
fi
case "$1" in
start)
if [ -f $CATALINA_HOME/bin/startup.sh ];
then
logger -s "Starting Tomcat"
/bin/su -l root -c $CATALINA_HOME/bin/startup.sh
RETVAL=$?
[ $RETVAL = 0 ] && touch /var/lock/subsys/tomcat-preprod
fi
;;
stop)
if [ -f $CATALINA_HOME/bin/shutdown.sh ];
then
logger -s "Stopping Tomcat"
/bin/su -l root -c $CATALINA_HOME/bin/shutdown.sh
RETVAL=$?
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/tomcat-preprod
fi
;;
restart)
$0 stop
$0 start
;;
version)
if [ -f $CATALINA_HOME/bin/version.sh ];
then
logger -s "Display Tomcat Version"
/bin/su -l root -c $CATALINA_HOME/bin/version.sh
RETVAL=$?
fi
;;
*)
echo "Usage: $0 {start|stop|restart|version}"
exit 1
;;
esac
exit $RETVAL