Il y a 389 articles et 19 utilisateurs inscrits (ce bandeau est défini dans MediaWiki:Sitenotice)
« Maintenance Redémarrage des services » : différence entre les versions
Aller à la navigation
Aller à la recherche
création+catégories |
m a déplacé Doc/Redémarrage des services vers Maintenance Redémarrage des services |
||
| (4 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 1 : | Ligne 1 : | ||
{{important|A mettre jour !!!}} | |||
== Pré-requis == | == Pré-requis == | ||
Sous Debian/Ubuntu il faudra installer : | Sous Debian/Ubuntu il faudra installer le paquet {{value|chkconfig}}, qui semble installer par défaut sur RedHat/CentOS : | ||
<syntaxhighlight lang="bash">sudo apt-get install chkconfig</syntaxhighlight> | <syntaxhighlight lang="bash">sudo apt-get install chkconfig</syntaxhighlight> | ||
== Apache/Httpd == | == Apache/Httpd == | ||
=== RedHat/CentOS === | |||
<syntaxhighlight lang="bash">chkconfig --list httpd</syntaxhighlight> | <syntaxhighlight lang="bash">chkconfig --list httpd</syntaxhighlight> | ||
==== Debian/Ubuntu | <syntaxhighlight lang="text">httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off</syntaxhighlight> | ||
=== Debian/Ubuntu === | |||
<syntaxhighlight lang="bash">chkconfig --list apache2</syntaxhighlight> | <syntaxhighlight lang="bash">chkconfig --list apache2</syntaxhighlight> | ||
<syntaxhighlight lang="text">apache2 0:off 1:off 2:on 3:on 4:on 5:on 6:off</syntaxhighlight> | |||
<syntaxhighlight lang=" | |||
== PostgreSQL == | == PostgreSQL == | ||
<syntaxhighlight lang="bash">chkconfig --list postgresql</syntaxhighlight> | <syntaxhighlight lang="bash">chkconfig --list postgresql</syntaxhighlight> | ||
<syntaxhighlight lang="text">postgresql 0:off 1:off 2:on 3:on 4:on 5:on 6:off</syntaxhighlight> | |||
<syntaxhighlight lang=" | |||
== Tomcat6 == | == Tomcat6 == | ||
{{important|'''TODO:''' Si on utilise une configuration manuelle cette vérification n'est pas bonne}} | {{important|'''TODO:''' Si on utilise une configuration manuelle cette vérification n'est pas bonne}} | ||
<syntaxhighlight lang="bash">chkconfig --list tomcat6</syntaxhighlight> | <syntaxhighlight lang="bash">chkconfig --list tomcat6</syntaxhighlight> | ||
<syntaxhighlight lang="text">tomcat6 0:off 1:off 2:on 3:on 4:on 5:on 6:off</syntaxhighlight> | |||
<syntaxhighlight lang=" | |||
==== Scripts personnalisés ==== | |||
Sur {{value|Debian}} on a besoin du paquet | |||
<syntaxhighlight lang="bash"> | |||
apt-get update && apt-get install initscripts | |||
</syntaxhighlight> | |||
Puis on édite, en root ({{cmd|su -}}), le fichier {{path|/etc/rc.local}} pour ajouter les commandes de démarrage des serveurs Tomcat (avant le {{cmd|exit 0}}) : | |||
<syntaxhighlight lang="bash"># Production | |||
/bin/bash /home/ajlsm/restartProd.sh | |||
# Recette | |||
/bin/bash /home/ajlsm/restartPreProd.sh | |||
# le code retour doit être 0 -> on se place avant le exit 0 | |||
</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> | |||
== Voir aussi == | |||
* [https://en.wikipedia.org/wiki/Runlevel Runlevel] @ Wikipedia | |||
[[category:How To]] | [[category:How To]] | ||
| Ligne 33 : | Ligne 53 : | ||
[[category:PostgreSQL]] | [[category:PostgreSQL]] | ||
[[category:Installation]] | [[category:Installation]] | ||
[[category:Odysseo]] | |||
Dernière version du 24 avril 2013 à 10:12
Important :
A mettre jour !!!.
Pré-requis
[modifier | modifier le wikicode]Sous Debian/Ubuntu il faudra installer le paquet chkconfig, qui semble installer par défaut sur RedHat/CentOS :
sudo apt-get install chkconfig
Apache/Httpd
[modifier | modifier le wikicode]RedHat/CentOS
[modifier | modifier le wikicode]chkconfig --list httpd
httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Debian/Ubuntu
[modifier | modifier le wikicode]chkconfig --list apache2
apache2 0:off 1:off 2:on 3:on 4:on 5:on 6:off
PostgreSQL
[modifier | modifier le wikicode]chkconfig --list postgresql
postgresql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Tomcat6
[modifier | modifier le wikicode]Important :
TODO: Si on utilise une configuration manuelle cette vérification n'est pas bonne.
chkconfig --list tomcat6
tomcat6 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Scripts personnalisés
[modifier | modifier le wikicode]Sur Debian on a besoin du paquet
apt-get update && apt-get install initscripts
Puis on édite, en root (su -), le fichier /etc/rc.local pour ajouter les commandes de démarrage des serveurs Tomcat (avant le exit 0) :
# Production
/bin/bash /home/ajlsm/restartProd.sh
# Recette
/bin/bash /home/ajlsm/restartPreProd.sh
# le code retour doit être 0 -> on se place avant le exit 0
cp restartProd.sh restartPreProd.sh
perl -i -p -e 's/-prod/-pre-prod/g' restartPreProd.sh
chmod u+x ./restartPr*
Voir aussi
[modifier | modifier le wikicode]- Runlevel @ Wikipedia