Il y a 389 articles et 19 utilisateurs inscrits (ce bandeau est défini dans MediaWiki:Sitenotice)
« Doc/Odysseo » : différence entre les versions
Aller à la navigation
Aller à la recherche
m infos serveur #1 et #2 |
|||
| Ligne 34 : | Ligne 34 : | ||
=== Expiration des sauvegardes === | === Expiration des sauvegardes === | ||
== Tomcat == | == Tomcat == | ||
Suite à des problèmes avec le tomcat (et le serveur étends du {{value|Debian}}), nous décidons de mettre en place plusieurs instance de tomcat pour servir les deux applications ({{value|prod}} et {{value|pre-prod}} | |||
=== Localisation des serveur === | === Localisation des serveur === | ||
{| class="wikitable sortable" | |||
|- | |||
! Instance !! Emplacement !! Commande | |||
|- | |||
| Production || "$AJLSM_HOME"/server/tomcat6-prod || {{cmd|tomcat6-instance-create /home/ajlsm/server/tomcat6-prod}} | |||
{| class="wikitable sortable" | |||
|- | |||
!Type de Port !! Production !! Recettage | |||
|- | |||
| arrêt || {{value|'''8'''005}} | |||
|- | |||
| écoute (connecteur HTTP) || {{value|'''8'''0'''8'''0}} | |||
|- | |||
| redirection (connecteur HTTP) || {{value|'''8'''443}} | |||
|- | |||
| écoute (connecteur AJP/1.3) || {{value|'''8'''009}} | |||
|- | |||
| redirection (connecteur AJP/1.3) || {{value|'''8'''443}} | |||
|} | |||
|- | |||
| '''Pré'''-Production || "$AJLSM_HOME"/server/tomcat6-prod || {{cmd|tomcat6-instance-create -p 9090 -c 9005 /home/ajlsm/server/tomcat6-pre-prod}} | |||
{| class="wikitable sortable" | |||
|- | |||
!Type de Port !! Production !! Recettage | |||
|- | |||
| arrêt || {{value|'''9'''005}} | |||
|- | |||
| écoute (connecteur HTTP) || {{value|'''9'''0'''9'''0}} | |||
|- | |||
| redirection (connecteur HTTP) || {{value|'''9'''443}} | |||
|- | |||
| écoute (connecteur AJP/1.3) || {{value|'''9'''009}} | |||
|- | |||
| redirection (connecteur AJP/1.3) || {{value|'''9'''443}} | |||
|} | |||
|} | |||
=== Liens vers l'application === | === Liens vers l'application === | ||
{| class="wikitable sortable" | |||
|- | |||
! Production !! Recettage | |||
|- | |||
| <syntaxhighlight lang="bash"> | |||
ln -s webapps/current-pleade server/tomcat6-prod/webapps/odysseo | |||
</syntaxhighlight> || <syntaxhighlight lang="bash"> | |||
ln -s webapps/current-pleade-pprod server/tomcat6-pre-prod/webapps/odysseo_pprod | |||
</syntaxhighlight> | |||
=== Configuration du serveur : server.xml === | === Configuration du serveur : server.xml === | ||
{| class="wikitable sortable" | |||
|- | |||
! Production !! Recettage | |||
|- | |||
|<syntaxhighlight lang="xml"> | |||
<Connector port="8009" protocol="AJP/1.3" | |||
redirectPort="8443" | |||
emptySessionPath="true" | |||
/> | |||
</syntaxhighlight> | |||
|- | |||
|<syntaxhighlight lang="xml"> | |||
<Connector port="9009" protocol="AJP/1.3" | |||
redirectPort="9443" | |||
emptySessionPath="true" | |||
/> | |||
</syntaxhighlight> | |||
|} | |||
=== Virtual Host Httpd === | |||
{| class="wikitable sortable" | |||
|- | |||
! Production !! Recettage | |||
|- | |||
|<syntaxhighlight lang="xml"> | |||
ProxyPass /pprod/ ajp://localhost:8009/odysseo_pprod/ | |||
ProxyPassReverse /pprod/ ajp://localhost:8009/odysseo_pprod/ | |||
</syntaxhighlight> | |||
|- | |||
|<syntaxhighlight lang="xml"> | |||
ProxyPass /pprod/ ajp://localhost:9009/odysseo_pprod/ | |||
ProxyPassReverse /pprod/ ajp://localhost:9009/odysseo_pprod/ | |||
</syntaxhighlight> | |||
|} | |||
=== Allocation de mémoire === | === Allocation de mémoire === | ||
=== Scripts et redémarrage automatique === | === Scripts et redémarrage automatique === | ||
{| class="wikitable sortable" | |||
|- | |||
! Production !! Recettage | |||
|- | |||
<syntaxhighlight lang="bash"> | |||
#!/bin/bash | |||
"$AJLSM_HOME"/server/tomcat6-prod/bin/shutdown.sh | |||
rm -rf "$AJLSM_HOME"/server/tomcat6-prod/temp/* "$AJLSM_HOME"/server/tomcat6-prod/work/* | |||
"$AJLSM_HOME"/server/tomcat6-prod/bin/startup.sh | |||
</syntaxhighlight> | |||
|| | |||
|<syntaxhighlight lang="bash"> | |||
#!/bin/bash | |||
"$AJLSM_HOME"/server/tomcat6-pre-prod/bin/shutdown.sh | |||
rm -rf "$AJLSM_HOME"/server/tomcat6-pre-prod/temp/* "$AJLSM_HOME"/server/tomcat6-pre-prod/work/* | |||
"$AJLSM_HOME"/server/tomcat6-pre-prod/bin/startup.sh | |||
</syntaxhighlight> | |||
|} | |||
<syntaxhighlight lang="bash"> | |||
cp restartProd.sh restartPreProd.sh | |||
perl -i -p -e 's/-prod/-pre-prod/g' restartPreProd.sh | |||
chmod u+x ./restartPr* | |||
</syntaxhighlight> | |||
=== Arrêt === | === Arrêt === | ||
== Apache == | == Apache == | ||
== Application Pleade == | == Application Pleade == | ||
Version du 15 octobre 2012 à 17:35
Serveur
Serveur #1
- Debian 6.0 (Squeeze) .
- système 64 bits.
- L'adresse IP du serveur est : 176.31.229.74
- Le nom du serveur est : ns226259.ovh.net
Serveur #2
- Debian 6.0 (Squeeze) .
- système 64 bits.
- L'adresse IP du serveur est : 91.121.108.165
- Le nom du serveur est : ks200294.kimsufi.com
Logiciels
Résolutions de problèmes courants
Le serveur Apache Tomcat à parfois du mal à redémarrer, il suffit de le relancer :
Notice :
Hypothèse: mauvaise compréhension/utilisation des opérateurs Bash &&. En effet le cron actuel est le suivant :
0 6 * * * /bin/sh /opt/tomcat6/bin/shutdown.sh && /bin/rm -rf /opt/tomcat6/temp/* /opt/tomcat6/work/* && /bin/sh /opt/tomcat6/bin/startup.sh
Ce qui peut amener à des cas où le redémarrage ne se fait pas: si une des commandes avant '/opt/tomcat6/bin/startup.sh' a un code retour différent de 0 :
- pour des explications, voir : Bash Pitfalls#22
- pour une solutions on utilisera l'approche décrite dans Tomcat#Tâche cron journalière de redémarrage.
/opt/tomcat6/bin/catalina.sh start
Points de montage
Liens symboliques
Sauvegardes
Crontab
Expiration des sauvegardes
Tomcat
Suite à des problèmes avec le tomcat (et le serveur étends du Debian), nous décidons de mettre en place plusieurs instance de tomcat pour servir les deux applications (prod et pre-prod
Localisation des serveur
| Instance | Emplacement | Commande | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Production | "$AJLSM_HOME"/server/tomcat6-prod | tomcat6-instance-create /home/ajlsm/server/tomcat6-prod
| |||||||||||||
| Pré-Production | "$AJLSM_HOME"/server/tomcat6-prod | tomcat6-instance-create -p 9090 -c 9005 /home/ajlsm/server/tomcat6-pre-prod
|
Liens vers l'application
| Production | Recettage | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ln -s webapps/current-pleade server/tomcat6-prod/webapps/odysseo
|
ln -s webapps/current-pleade-pprod server/tomcat6-pre-prod/webapps/odysseo_pprod
Configuration du serveur : server.xml
Virtual Host Httpd
Allocation de mémoireScripts et redémarrage automatique#!/bin/bash
"$AJLSM_HOME"/server/tomcat6-prod/bin/shutdown.sh
rm -rf "$AJLSM_HOME"/server/tomcat6-prod/temp/* "$AJLSM_HOME"/server/tomcat6-prod/work/*
"$AJLSM_HOME"/server/tomcat6-prod/bin/startup.sh
cp restartProd.sh restartPreProd.sh
perl -i -p -e 's/-prod/-pre-prod/g' restartPreProd.sh
chmod u+x ./restartPr*
ArrêtApacheApplication PleadeEmplacementUtilisateursParamètres spéciauxpleade-test : pleade-admin.propertiesLien PDF dans l'entêteExplication |