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
→Serveur : confiuration |
m →Serveur : host & ip |
||
| Ligne 6 : | Ligne 6 : | ||
|- | |- | ||
| Adresse IP || [176.31.229.74] || - | | Adresse IP || [176.31.229.74] || - | ||
|- | |||
| Nom de domaine || [ns226259.ovh.net] || - | |||
|- | |- | ||
| Tomcat production || {{value|8080}} || - | | Tomcat production || {{value|8080}} || - | ||
| Ligne 15 : | Ligne 17 : | ||
|} | |} | ||
=== Serveur de Sauvegarde === | |||
Un second serveur existe, pour les sauvegardes : | |||
{| class="wikitable sortable" | |||
|- | |||
! Description !! Valeur !! Commentaire | |||
=== Serveur | |- | ||
| Adresse IP || [91.121.108.165] || - | |||
|- | |||
| Nom de domaine || [ks200294.kimsufi.com] || - | |||
|} | |||
=== Logiciels === | === Logiciels === | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
| Ligne 30 : | Ligne 32 : | ||
! Description !! Valeur !! Commentaire | ! Description !! Valeur !! Commentaire | ||
|- | |- | ||
| OS || debian 6.0.6 || | | OS || debian 6.0.6 (amd64) || | ||
* tous les logiciels proviennent du dépot debian. | * tous les logiciels proviennent du dépot debian. | ||
* sauvegarde ? | * sauvegarde ? | ||
Version du 16 octobre 2012 à 10:47
Serveur
| Description | Valeur | Commentaire |
|---|---|---|
| Adresse IP | [176.31.229.74] | - |
| Nom de domaine | [ns226259.ovh.net] | - |
| Tomcat production | 8080 | - |
| Tomcat recette | 9090 | - |
| SSH | 22 | - |
Serveur de Sauvegarde
Un second serveur existe, pour les sauvegardes :
| Description | Valeur | Commentaire |
|---|---|---|
| Adresse IP | [91.121.108.165] | - |
| Nom de domaine | [ks200294.kimsufi.com] | - |
Logiciels
| Description | Valeur | Commentaire |
|---|---|---|
| OS | debian 6.0.6 (amd64) |
|
| Java | 1.6.0_30 | - |
| Tomcat | 6.0.35-1+squeeze2 |
|
| Apache | 2.2.16-6+squeeze4 | issu des dépôts |
| Imagemagick | 6.6.0.4-3 | issu des dépôts |
| Postgresql | 8.4.9-0squeeze1 | issu des dépôts |
Résolutions de problèmes courants
Le serveur Apache Tomcat à parfois du mal à redémarrer, il suffit de le relancer :
# Production
0 6 * * * /bin/bash /home/ajlsm/restartProd.sh
# Recette
0 6 * * * /bin/bash /home/ajlsm/restartPreProd.sh
Points de montage
Aucun.
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
| Description | Production | Recettage |
|---|---|---|
| Emplacement | "$AJLSM_HOME"/server/tomcat6-prod | "$AJLSM_HOME"/server/tomcat6-pre-prod |
| Commande | tomcat6-instance-create /home/ajlsm/server/tomcat6-prod
|
tomcat6-instance-create -p 9090 -c 9005 /home/ajlsm/server/tomcat6-pre-prod
|
Ports d'écoutes
| Type de Port | Production | Recettage |
|---|---|---|
| arrêt | 8005 | 9005 |
| écoute (connecteur HTTP) | 8080 | 9090 |
| redirection (connecteur HTTP) | 8443 | 9443 |
| écoute (connecteur AJP/1.3) | 8009 | 9009 |
| redirection (connecteur AJP/1.3) | 8443 | 9443 |
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
| Production | Recettage |
|---|---|
<Connector port="8009" protocol="AJP/1.3"
redirectPort="8443"
emptySessionPath="true"
/>
|
<Connector port="9009" protocol="AJP/1.3"
redirectPort="9443"
emptySessionPath="true"
/>
|
Virtual Host Httpd
| Production | Recettage |
|---|---|
ProxyPass /pprod/ ajp://localhost:8009/odysseo_pprod/
ProxyPassReverse /pprod/ ajp://localhost:8009/odysseo_pprod/
|
ProxyPass /pprod/ ajp://localhost:9009/odysseo_pprod/
ProxyPassReverse /pprod/ ajp://localhost:9009/odysseo_pprod/
|
Allocation de mémoire
Scripts et redémarrage automatique
| Production | Recettage |
|---|---|
#!/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
|
#!/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
|
cp restartProd.sh restartPreProd.sh
perl -i -p -e 's/-prod/-pre-prod/g' restartPreProd.sh
chmod u+x ./restartPr*
Arrêt
Apache
De façon à séparer autant que possible les deux applications, on va configurer les deux applications sur des ports différents.
| Description | Production | Recettage |
|---|---|---|
| Port d'écoute | 80 | 90 |
Port d'écoute
L'application de pré-prod étant configurer pour travailler avec le port 90, il faut préciser à httpd d'écouter celui-ci. Pour cela, on va éditer le fichier /etc/apache2/ports.conf :
NameVirtualHost *:90
Listen 90
Production
<VirtualHost *:80>
Servername odysseo.generiques.org
ServerAlias odysseo.ajlsm.com odysseo.org odysseo.net odysseo.com
Alias /robots.txt /home/odysseo/pleade/robots.txt
Alias /aj_ap/ /home/odysseo/php/
Alias /aj_ap_pprod/ /home/odysseo/php_pprod/
Proxypass /pprod/ !
ProxyPass /awstats/ !
ProxyPass /awstatsclasses !
ProxyPass /awstatsicons !
ProxyPass /awstatscss !
ProxyPass /robots.txt !
ProxyPass /munin !
ProxyPass /cacti !
ProxyPass /aj_ap/ !
ProxyPass /aj_ap_pprod/ !
#ProxyPass /tzav/ ajp://localhost:8009/odysseo_tzav/
#ProxyPassReverse /tzav/ ajp://localhost:8009/odysseo_tzav/
# Redirection vers l'application de recette/pré-prod
RedirectPermanent /pprod/ http://odysseo.org:90/pprod/
ProxyPass / ajp://localhost:8009/odysseo/
ProxyPassReverse / ajp://localhost:8009/odysseo/
ErrorLog ${APACHE_LOG_DIR}/error-prod.log
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access-prod.log combined
</VirtualHost>
Pré-production
<VirtualHost *:90>
Servername odysseo.generiques.org
ServerAlias odysseo.ajlsm.com odysseo.org odysseo.net odysseo.com
Alias /robots.txt /home/odysseo/pleade/robots.txt
Alias /aj_ap/ /home/odysseo/php/
Alias /aj_ap_pprod/ /home/odysseo/php_pprod/
ProxyPass /awstats/ !
ProxyPass /awstatsclasses !
ProxyPass /awstatsicons !
ProxyPass /awstatscss !
ProxyPass /robots.txt !
ProxyPass /munin !
ProxyPass /cacti !
ProxyPass /aj_ap/ !
ProxyPass /aj_ap_pprod/ !
#ProxyPass /tzav/ ajp://localhost:9009/odysseo_tzav/
#ProxyPassReverse /tzav/ ajp://localhost:9009/odysseo_tzav/
<Location /pprod>
AuthType Basic
AuthName "Entrez vos identifiants"
AuthUserFile /home/odysseo/.htpasswd_pprod
AuthGroupFile /dev/null
Require valid-user
</Location>
ProxyPass /pprod/ ajp://localhost:9009/odysseo_pprod/
ProxyPassReverse /pprod/ ajp://localhost:9009/odysseo_pprod/
ErrorLog ${APACHE_LOG_DIR}/error-pre-prod.log
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access-pre-prod.log combined
</VirtualHost>