Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| elearning:workbooks:tomcat10:tc06 [2023/10/06 12:11] – created admin | elearning:workbooks:tomcat10:tc06 [2023/10/11 09:11] (Version actuelle) – admin | ||
|---|---|---|---|
| Ligne 13: | Ligne 13: | ||
| * Configuration des journaux | * Configuration des journaux | ||
| * java.util.logging | * java.util.logging | ||
| - | * log4j | ||
| * Supervision | * Supervision | ||
| * JMeter | * JMeter | ||
| Ligne 276: | Ligne 275: | ||
| </ | </ | ||
| - | Modifiez | + | Connectez-vous à votre VM CentOS 8 en mode graphique en utilisant Guacamole : |
| + | |||
| + | {{ : | ||
| + | |||
| + | Si, et uniquement si, votre VM CentOS 8 n'est pas en mode graphique ( erreur de connexion sous Guacamole ), modifiez | ||
| < | < | ||
| Ligne 288: | Ligne 291: | ||
| </ | </ | ||
| - | Connectez-vous à votre VM CentOS 8 en mode graphique en utilisant Guacamole | + | Si votre connexion réussie mais la VM semble être bloquée, retournez dans votre connexion SSH et saisissez la commande suivante |
| - | {{ : | + | < |
| + | [root@centos8 apache-jmeter-5.6.2]# systemctl restart vncserver@\: | ||
| + | </ | ||
| Lancez ensuite JMeter dans un terminal graphique de votre VM : | Lancez ensuite JMeter dans un terminal graphique de votre VM : | ||
| < | < | ||
| - | [root@redhat JMeter]# / | + | [root@centos8 apache-jmeter-5.6.2]# / |
| </ | </ | ||
| Ligne 725: | Ligne 730: | ||
| < | < | ||
| - | [root@centos8 apache-jmeter-5.6.2]# | + | [root@centos8 apache-jmeter-5.6.2]# |
| [root@centos8 bin]# vi setenv.sh | [root@centos8 bin]# vi setenv.sh | ||
| Ligne 857: | Ligne 862: | ||
| [root@centos8 logs]# chown tomcat: | [root@centos8 logs]# chown tomcat: | ||
| - | [root@centos8 logs]# chown tomcat: | + | [root@centos8 logs]# chown tomcat: |
| </ | </ | ||
| Ligne 917: | Ligne 922: | ||
| < | < | ||
| - | [root@centos8 | + | [root@centos8 |
| - | [root@centos8 | + | [root@centos8 |
| ● tomcat.service - Apache Tomcat Web Application Container | ● tomcat.service - Apache Tomcat Web Application Container | ||
| | | ||
| Ligne 944: | Ligne 949: | ||
| ====Préparation==== | ====Préparation==== | ||
| + | |||
| + | Arrêtez et désactivez le service Tomcat : | ||
| + | |||
| + | < | ||
| + | [root@centos8 bin]# systemctl stop tomcat | ||
| + | |||
| + | [root@centos8 bin]# systemctl disable tomcat | ||
| + | </ | ||
| Créez maintenant deux répertoires en dessous de $CATALINA_HOME : | Créez maintenant deux répertoires en dessous de $CATALINA_HOME : | ||
| < | < | ||
| - | [root@centos7 ~]# mkdir $CATALINA_HOME/ | + | [root@centos8 bin]# mkdir $CATALINA_HOME/ |
| </ | </ | ||
| Ligne 954: | Ligne 967: | ||
| < | < | ||
| - | [root@centos7 ~]# cd $CATALINA_HOME | + | [root@centos8 bin]# cd $CATALINA_HOME |
| - | [root@centos7 tomcat8]# cp -rp conf/ tomcat1/ | + | [root@centos8 tomcat10]# cp -rp conf/ tomcat1/ |
| - | [root@centos7 tomcat8]# cp -rp logs/ tomcat1 | + | [root@centos8 tomcat10]# cp -rp logs/ tomcat1 |
| - | [root@centos7 tomcat8]# cp -rp temp/ tomcat1 | + | [root@centos8 tomcat10]# cp -rp temp/ tomcat1 |
| - | [root@centos7 tomcat8]# cp -rp webapps/ tomcat1 | + | [root@centos8 tomcat10]# cp -rp webapps/ tomcat1 |
| - | [root@centos7 tomcat8]# cp -rp work/ tomcat1 | + | [root@centos8 tomcat10]# cp -rp work/ tomcat1 |
| - | [root@centos7 tomcat8]# cp -rp conf/ tomcat2/ | + | [root@centos8 tomcat10]# cp -rp conf/ tomcat2/ |
| - | [root@centos7 tomcat8]# cp -rp logs/ tomcat2/ | + | [root@centos8 tomcat10]# cp -rp logs/ tomcat2/ |
| - | [root@centos7 tomcat8]# cp -rp temp/ tomcat2/ | + | [root@centos8 tomcat10]# cp -rp temp/ tomcat2/ |
| - | [root@centos7 tomcat8]# cp -rp webapps/ tomcat2/ | + | [root@centos8 tomcat10]# cp -rp webapps/ tomcat2/ |
| - | [root@centos7 tomcat8]# cp -rp work/ tomcat2/ | + | [root@centos8 tomcat10]# cp -rp work/ tomcat2/ |
| </ | </ | ||
| Ligne 970: | Ligne 983: | ||
| < | < | ||
| - | [root@centos7 tomcat8]# rm -rf conf/ logs/ temp/ webapps/ work/ | + | [root@centos8 tomcat10]# rm -rf conf/ logs/ temp/ webapps/ work/ |
| </ | </ | ||
| Ligne 976: | Ligne 989: | ||
| < | < | ||
| - | [root@centos7 tomcat8]# rm -rf bin/ | + | [root@centos8 tomcat10]# rm -rf bin/ |
| </ | </ | ||
| Ligne 982: | Ligne 995: | ||
| < | < | ||
| - | [root@centos7 tomcat8]# cd bin | + | [root@centos8 tomcat10]# cd bin |
| - | [root@centos7 | + | |
| - | [root@centos7 | + | [[root@centos8 |
| + | |||
| + | [root@centos8 | ||
| #!/bin/bash | #!/bin/bash | ||
| - | export CATALINA_BASE=/ | + | export CATALINA_BASE=/ |
| . $CATALINA_HOME/ | . $CATALINA_HOME/ | ||
| - | [root@centos7 | + | [root@centos8 bin]# vi startTomcat2 |
| - | [root@centos7 | + | |
| + | [root@centos8 bin]# cat startTomcat2 | ||
| + | export CATALINA_BASE=/ | ||
| + | . $CATALINA_HOME/ | ||
| + | |||
| + | [root@centos8 | ||
| + | |||
| + | [root@centos8 | ||
| #!/bin/bash | #!/bin/bash | ||
| - | export CATALINA_BASE=/ | + | export CATALINA_BASE=/ |
| . $CATALINA_HOME/ | . $CATALINA_HOME/ | ||
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 bin]# cat startTomcat2 | + | |
| - | export CATALINA_BASE=/ | + | |
| - | . $CATALINA_HOME/ | + | |
| - | [root@centos7 bin]# vi stopTomcat2 | + | [root@centos8 |
| - | [root@centos7 | + | |
| #!/bin/bash | #!/bin/bash | ||
| - | export CATALINA_BASE=/ | + | export CATALINA_BASE=/ |
| . $CATALINA_HOME/ | . $CATALINA_HOME/ | ||
| </ | </ | ||
| Ligne 1010: | Ligne 1028: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | [root@centos8 |
| - | -rwxr-xr-x | + | -rwxr-xr-x 1 root root 88 Oct 6 10:12 startTomcat1 |
| - | -rwxr-xr-x | + | -rwxr-xr-x 1 root root 76 Oct 6 10:13 startTomcat2 |
| - | [root@centos7 | + | [root@centos8 |
| - | -rwxr-xr-x | + | -rwxr-xr-x 1 root root 89 Oct 6 10:14 stopTomcat1 |
| - | -rwxr-xr-x | + | -rwxr-xr-x 1 root root 88 Oct 6 10:14 stopTomcat2 |
| </ | </ | ||
| Ligne 1025: | Ligne 1043: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | [root@centos8 |
| </ | </ | ||
| - | Les commandes VI suivantes peuvent vous aider : | + | Les commandes VI suivantes peuvent vous aider. |
| - | < | ||
| Pour le fichier / | Pour le fichier / | ||
| + | |||
| + | < | ||
| : | : | ||
| : | : | ||
| : | : | ||
| : | : | ||
| + | </ | ||
| + | |||
| Pour le fichier / | Pour le fichier / | ||
| + | |||
| + | < | ||
| : | : | ||
| : | : | ||
| Ligne 1047: | Ligne 1070: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | Using CATALINA_BASE: | + | Using CATALINA_BASE: |
| - | Using CATALINA_HOME: | + | Using CATALINA_HOME: |
| - | Using CATALINA_TMPDIR: | + | Using CATALINA_TMPDIR: |
| - | Using JRE_HOME: | + | Using JRE_HOME: |
| - | Using CLASSPATH: | + | Using CLASSPATH: |
| + | Using CATALINA_OPTS: | ||
| Tomcat started. | Tomcat started. | ||
| - | [root@centos7 | + | |
| - | root 25696 30.0 | + | [root@centos8 |
| - | root 25785 | + | root 9991 85.0 |
| - | [root@centos7 | + | root 10055 |
| - | Using CATALINA_BASE: | + | |
| - | Using CATALINA_HOME: | + | [root@centos8 |
| - | Using CATALINA_TMPDIR: | + | Using CATALINA_BASE: |
| - | Using JRE_HOME: | + | Using CATALINA_HOME: |
| - | Using CLASSPATH: | + | Using CATALINA_TMPDIR: |
| + | Using JRE_HOME: | ||
| + | Using CLASSPATH: | ||
| + | Using CATALINA_OPTS: | ||
| Tomcat started. | Tomcat started. | ||
| - | [root@centos7 | + | |
| - | root 25696 32.1 5.2 2403492 80468 pts/0 | + | [root@centos8 |
| - | root 25817 32.6 2.4 2381580 37172 pts/0 | + | root 9991 25.9 1.9 9705084 321360 |
| - | root 25843 | + | root 10065 78.4 2.1 9705084 345744 |
| + | root 10129 | ||
| </ | </ | ||
| Ligne 1073: | Ligne 1101: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | Using CATALINA_BASE: | + | Using CATALINA_BASE: |
| - | Using CATALINA_HOME: | + | Using CATALINA_HOME: |
| - | Using CATALINA_TMPDIR: | + | Using CATALINA_TMPDIR: |
| - | Using JRE_HOME: | + | Using JRE_HOME: |
| - | Using CLASSPATH: | + | Using CLASSPATH: |
| - | [root@centos7 | + | Using CATALINA_OPTS: |
| - | Using CATALINA_BASE: | + | |
| - | Using CATALINA_HOME: | + | [root@centos8 |
| - | Using CATALINA_TMPDIR: | + | Using CATALINA_BASE: |
| - | Using JRE_HOME: | + | Using CATALINA_HOME: |
| - | Using CLASSPATH: | + | Using CATALINA_TMPDIR: |
| - | [root@centos7 | + | Using JRE_HOME: |
| - | root 27318 | + | Using CLASSPATH: |
| + | Using CATALINA_OPTS: | ||
| + | |||
| + | [root@centos8 | ||
| + | root 10229 | ||
| </ | </ | ||
| Ligne 1094: | Ligne 1126: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | [root@centos8 |
| worker.list=balancer | worker.list=balancer | ||
| worker.tomcat1.type=ajp13 | worker.tomcat1.type=ajp13 | ||
| - | worker.tomcat1.host=10.0.2.51 | + | worker.tomcat1.host=127.0.0.1 |
| worker.tomcat1.port=8109 | worker.tomcat1.port=8109 | ||
| worker.tomcat1.lbfactor=1 | worker.tomcat1.lbfactor=1 | ||
| worker.tomcat2.type=ajp13 | worker.tomcat2.type=ajp13 | ||
| - | worker.tomcat2.host=10.0.2.51 | + | worker.tomcat2.host=127.0.0.1 |
| worker.tomcat2.port=8209 | worker.tomcat2.port=8209 | ||
| worker.tomcat2.lbfactor=1 | worker.tomcat2.lbfactor=1 | ||
| Ligne 1133: | Ligne 1165: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| ... | ... | ||
| + | <!-- An Engine represents the entry point (within Catalina) that processes | ||
| + | every request. | ||
| + | | ||
| + | on to the appropriate Host (virtual host). | ||
| + | | ||
| + | |||
| <Engine name=" | <Engine name=" | ||
| + | <!-- <Engine name=" | ||
| + | |||
| + | <!--For clustering, please take a look at documentation at: | ||
| + | / | ||
| + | / | ||
| ... | ... | ||
| </ | </ | ||
| Ligne 1142: | Ligne 1185: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| ... | ... | ||
| + | <!-- An Engine represents the entry point (within Catalina) that processes | ||
| + | every request. | ||
| + | | ||
| + | on to the appropriate Host (virtual host). | ||
| + | | ||
| + | |||
| <Engine name=" | <Engine name=" | ||
| + | <!-- <Engine name=" | ||
| + | |||
| + | <!--For clustering, please take a look at documentation at: | ||
| + | / | ||
| + | / | ||
| ... | ... | ||
| </ | </ | ||
| Ligne 1151: | Ligne 1205: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | |
| - | [root@centos7 | + | [root@centos8 |
| + | |||
| + | [root@centos8 | ||
| < | < | ||
| < | < | ||
| Ligne 1160: | Ligne 1216: | ||
| </ | </ | ||
| </ | </ | ||
| - | [root@centos7 | + | |
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | |
| + | [root@centos8 | ||
| + | |||
| + | [root@centos8 | ||
| < | < | ||
| < | < | ||
| Ligne 1169: | Ligne 1228: | ||
| </ | </ | ||
| </ | </ | ||
| - | [root@centos7 bin]# | ||
| </ | </ | ||
| Ligne 1175: | Ligne 1233: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| + | [root@centos8 bin]# systemctl status httpd | ||
| + | ● httpd.service | ||
| + | | ||
| + | | ||
| + | Docs: man: | ||
| + | Main PID: 10382 (httpd) | ||
| + | | ||
| + | Tasks: 213 (limit: 100949) | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | Oct 06 10:32:26 centos8.ittraining.loc systemd[1]: Starting The Apache HTTP Server... | ||
| + | Oct 06 10:32:26 centos8.ittraining.loc systemd[1]: Started The Apache HTTP Server. | ||
| + | Oct 06 10:32:26 centos8.ittraining.loc httpd[10382]: | ||
| </ | </ | ||
| Ligne 1181: | Ligne 1258: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | Using CATALINA_BASE: | + | Using CATALINA_BASE: |
| - | Using CATALINA_HOME: | + | Using CATALINA_HOME: |
| - | Using CATALINA_TMPDIR: | + | Using CATALINA_TMPDIR: |
| - | Using JRE_HOME: | + | Using JRE_HOME: |
| - | Using CLASSPATH: | + | Using CLASSPATH: |
| + | Using CATALINA_OPTS: | ||
| Tomcat started. | Tomcat started. | ||
| - | [root@centos7 | + | |
| - | Using CATALINA_BASE: | + | [root@centos8 |
| - | Using CATALINA_HOME: | + | Using CATALINA_BASE: |
| - | Using CATALINA_TMPDIR: | + | Using CATALINA_HOME: |
| - | Using JRE_HOME: | + | Using CATALINA_TMPDIR: |
| - | Using CLASSPATH: | + | Using JRE_HOME: |
| + | Using CLASSPATH: | ||
| + | Using CATALINA_OPTS: | ||
| Tomcat started. | Tomcat started. | ||
| </ | </ | ||
| Ligne 1200: | Ligne 1280: | ||
| < | < | ||
| - | [root@centos7 httpd]# lynx --dump http://www.i2tch.loc/docs | + | [root@centos8 bin]# lynx --dump http://www.ittraining.loc/docs |
| This is Tomcat2 | This is Tomcat2 | ||
| - | + | [root@centos8 bin]# lynx --dump http://www.ittraining.loc/docs | |
| - | [root@centos7 httpd]# lynx --dump http://www.i2tch.loc/docs | + | |
| This is Tomcat2 | This is Tomcat2 | ||
| - | + | [root@centos8 bin]# lynx --dump http://www.ittraining.loc/docs | |
| - | [root@centos7 httpd]# lynx --dump http://www.i2tch.loc/docs | + | |
| This is Tomcat2 | This is Tomcat2 | ||
| </ | </ | ||
| - | <WRAP center round important> | + | <WRAP center round important |
| **Attention** : Notez que l' | **Attention** : Notez que l' | ||
| </ | </ | ||
| Ligne 1231: | Ligne 1309: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| This is Tomcat1 | This is Tomcat1 | ||
| - | |||
| - | |||
| - | [root@centos7 bin]# | ||
| </ | </ | ||
| - | <WRAP center round important> | + | <WRAP center round important |
| **Important** - Notez que c'est maintenant l' | **Important** - Notez que c'est maintenant l' | ||
| </ | </ | ||
| Ligne 1247: | Ligne 1322: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| # This file configures all the proxy modules: | # This file configures all the proxy modules: | ||
| LoadModule proxy_module modules/ | LoadModule proxy_module modules/ | ||
| Ligne 1262: | Ligne 1337: | ||
| LoadModule proxy_ftp_module modules/ | LoadModule proxy_ftp_module modules/ | ||
| LoadModule proxy_http_module modules/ | LoadModule proxy_http_module modules/ | ||
| + | LoadModule proxy_hcheck_module modules/ | ||
| LoadModule proxy_scgi_module modules/ | LoadModule proxy_scgi_module modules/ | ||
| + | LoadModule proxy_uwsgi_module modules/ | ||
| LoadModule proxy_wstunnel_module modules/ | LoadModule proxy_wstunnel_module modules/ | ||
| </ | </ | ||
| Ligne 1269: | Ligne 1346: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | # | + | [root@centos8 bin]# cat / |
| - | # | + | ... |
| - | # | + | # Supplemental configuration |
| - | # | + | # |
| - | #JkMount / | + | # Load config files in the "/ |
| - | #JkMount / | + | # IncludeOptional conf.d/ |
| + | |||
| + | # LoadModule | ||
| + | # JkWorkersFile conf/ | ||
| + | # JkLogFile | ||
| + | # JkLogLevel | ||
| + | # JkMount | ||
| + | # JkMount | ||
| ProxyTimeout 300 | ProxyTimeout 300 | ||
| - | <Proxy balancer://tomcat8-docs> | + | <Proxy balancer://tomcat10-docs> |
| - | BalancerMember ajp:// | + | BalancerMember ajp:// |
| - | BalancerMember ajp:// | + | BalancerMember ajp:// |
| </ | </ | ||
| - | ProxyPass / | + | ProxyPass |
| - | ProxyPassReverse / | + | ProxyPassReverse |
| </ | </ | ||
| Ligne 1292: | Ligne 1376: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| + | [root@centos8 bin]# systemctl status httpd | ||
| + | ● httpd.service | ||
| + | | ||
| + | | ||
| + | Docs: man: | ||
| + | Main PID: 13216 (httpd) | ||
| + | | ||
| + | Tasks: 213 (limit: 100949) | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | Oct 06 11:03:07 centos8.ittraining.loc systemd[1]: Starting The Apache HTTP Server... | ||
| + | Oct 06 11:03:07 centos8.ittraining.loc systemd[1]: Started The Apache HTTP Server. | ||
| + | Oct 06 11:03:08 centos8.ittraining.loc httpd[13216]: | ||
| </ | </ | ||
| Ligne 1310: | Ligne 1413: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| This is Tomcat1 | This is Tomcat1 | ||
| - | + | [root@centos8 | |
| - | [root@centos7 | + | |
| This is Tomcat2 | This is Tomcat2 | ||
| - | + | [root@centos8 | |
| - | [root@centos7 | + | |
| This is Tomcat1 | This is Tomcat1 | ||
| - | + | [root@centos8 | |
| - | [root@centos7 | + | |
| This is Tomcat2 | This is Tomcat2 | ||
| - | |||
| - | |||
| </ | </ | ||
| - | <WRAP center round important> | + | <WRAP center round important |
| **Attention** : Notez que l' | **Attention** : Notez que l' | ||
| </ | </ | ||
| Ligne 1336: | Ligne 1434: | ||
| Modifiez le fichier **/ | Modifiez le fichier **/ | ||
| - | <file> | + | <code> |
| + | [root@centos8 bin]# vi / | ||
| + | [root@centos8 bin]# cat / | ||
| ... | ... | ||
| - | # | + | # Supplemental configuration |
| + | # | ||
| + | # Load config files in the "/ | ||
| + | # IncludeOptional conf.d/ | ||
| - | # | + | # LoadModule |
| - | # | + | # JkWorkersFile conf/ |
| - | # | + | # JkLogFile |
| - | # | + | # JkLogLevel |
| - | # | + | # JkMount |
| - | # | + | # JkMount |
| + | |||
| + | ProxyTimeout 300 | ||
| Header add Set-Cookie " | Header add Set-Cookie " | ||
| - | <Proxy balancer://tomcat8-docs> | + | <Proxy balancer://tomcat10-docs> |
| BalancerMember ajp:// | BalancerMember ajp:// | ||
| BalancerMember ajp:// | BalancerMember ajp:// | ||
| Ligne 1353: | Ligne 1458: | ||
| </ | </ | ||
| - | ProxyPass | + | ProxyPass |
| - | ProxyPassReverse | + | ProxyPassReverse |
| - | </file> | + | </code> |
| + | |||
| + | Re-démarrez le serveur httpd : | ||
| + | |||
| + | < | ||
| + | [root@centos8 bin]# systemctl restart httpd | ||
| + | [root@centos8 bin]# systemctl status httpd | ||
| + | ● httpd.service - The Apache HTTP Server | ||
| + | | ||
| + | | ||
| + | Docs: man: | ||
| + | Main PID: 14093 (httpd) | ||
| + | | ||
| + | Tasks: 213 (limit: 100949) | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | Oct 06 11:13:16 centos8.ittraining.loc systemd[1]: Starting The Apache HTTP Server... | ||
| + | Oct 06 11:13:16 centos8.ittraining.loc systemd[1]: Started The Apache HTTP Server. | ||
| + | Oct 06 11:13:16 centos8.ittraining.loc httpd[14093]: | ||
| + | </code> | ||
| Testez ensuite l' | Testez ensuite l' | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | Rechargez la page : | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | <WRAP center round important 60%> | ||
| + | **Attention** : Notez que l' | ||
| + | </ | ||
| Pour plus d' | Pour plus d' | ||
| Ligne 1366: | Ligne 1506: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | [root@centos8 |
| - | EnableSendfile on | + | ... |
| # Supplemental configuration | # Supplemental configuration | ||
| # | # | ||
| Ligne 1375: | Ligne 1514: | ||
| # IncludeOptional conf.d/ | # IncludeOptional conf.d/ | ||
| - | LoadModule jk_module | + | LoadModule |
| - | JkWorkersFile conf/ | + | JkWorkersFile |
| - | JkLogFile logs/ | + | JkLogFile |
| - | JkLogLevel info | + | JkLogLevel |
| - | JkMount / | + | JkMount |
| - | JkMount / | + | JkMount |
| + | # Header add Set-Cookie " | ||
| + | # <Proxy balancer:// | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # </ | ||
| - | #<Proxy balancer:// | + | # ProxyPass |
| - | # | + | # ProxyPassReverse |
| - | # | + | |
| - | #</ | + | |
| - | + | ||
| - | #ProxyPass / | + | |
| - | # | + | |
| </ | </ | ||
| Ligne 1394: | Ligne 1534: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | [root@centos8 |
| worker.list=tomcat1, | worker.list=tomcat1, | ||
| worker.tomcat1.type=ajp13 | worker.tomcat1.type=ajp13 | ||
| - | worker.tomcat1.host=10.0.2.51 | + | worker.tomcat1.host=127.0.0.1 |
| worker.tomcat1.port=8109 | worker.tomcat1.port=8109 | ||
| # Indique que tomcat2 doit prendre le relais en cas de défaillance de tomcat1 | # Indique que tomcat2 doit prendre le relais en cas de défaillance de tomcat1 | ||
| Ligne 1405: | Ligne 1545: | ||
| worker.tomcat2.type=ajp13 | worker.tomcat2.type=ajp13 | ||
| - | worker.tomcat2.host=10.0.2.51 | + | worker.tomcat2.host=127.0.0.1 |
| worker.tomcat2.port=8209 | worker.tomcat2.port=8209 | ||
| # Indique que l' | # Indique que l' | ||
| Ligne 1417: | Ligne 1557: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| + | [root@centos8 bin]# systemctl status httpd | ||
| + | ● httpd.service - The Apache HTTP Server | ||
| + | | ||
| + | | ||
| + | Docs: man: | ||
| + | Main PID: 14509 (httpd) | ||
| + | | ||
| + | Tasks: 213 (limit: 100949) | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | Oct 06 11:22:55 centos8.ittraining.loc systemd[1]: Starting The Apache HTTP Server... | ||
| + | Oct 06 11:22:55 centos8.ittraining.loc systemd[1]: Started The Apache HTTP Server. | ||
| + | Oct 06 11:22:55 centos8.ittraining.loc httpd[14509]: | ||
| </ | </ | ||
| Ligne 1423: | Ligne 1582: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| This is Tomcat1 | This is Tomcat1 | ||
| - | + | [root@centos8 | |
| - | [root@centos7 | + | |
| This is Tomcat1 | This is Tomcat1 | ||
| - | + | [root@centos8 | |
| - | [root@centos7 | + | |
| This is Tomcat1 | This is Tomcat1 | ||
| - | |||
| - | |||
| - | [root@centos7 bin]# | ||
| </ | </ | ||
| Ligne 1441: | Ligne 1595: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | Using CATALINA_BASE: | + | Using CATALINA_BASE: |
| - | Using CATALINA_HOME: | + | Using CATALINA_HOME: |
| - | Using CATALINA_TMPDIR: | + | Using CATALINA_TMPDIR: |
| - | Using JRE_HOME: | + | Using JRE_HOME: |
| - | Using CLASSPATH: | + | Using CLASSPATH: |
| + | Using CATALINA_OPTS: | ||
| </ | </ | ||
| Ligne 1452: | Ligne 1607: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| This is Tomcat2 | This is Tomcat2 | ||
| - | |||
| - | |||
| - | [root@centos7 bin]# lynx --dump http:// | ||
| - | This is Tomcat2 | ||
| - | |||
| - | |||
| - | [root@centos7 bin]# | ||
| </ | </ | ||
| - | <WRAP center round important> | + | <WRAP center round important |
| **Attention** : Notez que le basculement est automatique en cas de défaillance de l' | **Attention** : Notez que le basculement est automatique en cas de défaillance de l' | ||
| </ | </ | ||
| Ligne 1474: | Ligne 1622: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | |
| - | [root@centos7 bin]# tail $CATALINA_HOME/tomcat2/webapps/docs/WEB-INF/web.xml | + | [root@centos8 |
| - | http://xmlns.jcp.org/ | + | <?xml version=" |
| - | version=" | + | <!-- |
| + | Licensed to the Apache Software Foundation (ASF) under one or more | ||
| + | contributor license agreements. | ||
| + | this work for additional information regarding copyright ownership. | ||
| + | The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| + | (the " | ||
| + | the License. | ||
| + | |||
| + | http://www.apache.org/licenses/LICENSE-2.0 | ||
| + | |||
| + | Unless required by applicable law or agreed to in writing, software | ||
| + | distributed under the License is distributed on an "AS IS" BASIS, | ||
| + | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| + | See the License for the specific language governing permissions and | ||
| + | limitations under the License. | ||
| + | --> | ||
| + | <web-app xmlns=" | ||
| + | | ||
| + | xsi: | ||
| + | https:// | ||
| + | version=" | ||
| metadata-complete=" | metadata-complete=" | ||
| Ligne 1487: | Ligne 1655: | ||
| < | < | ||
| </ | </ | ||
| - | [root@centos7 | + | |
| - | http:// | + | [root@centos8 |
| - | version=" | + | [root@centos8 bin]# cat $CATALINA_HOME/ |
| + | <?xml version=" | ||
| + | <!-- | ||
| + | Licensed to the Apache Software Foundation (ASF) under one or more | ||
| + | contributor license agreements. | ||
| + | this work for additional information regarding copyright ownership. | ||
| + | The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| + | (the " | ||
| + | the License. | ||
| + | |||
| + | | ||
| + | |||
| + | Unless required by applicable law or agreed to in writing, software | ||
| + | distributed under the License is distributed on an "AS IS" BASIS, | ||
| + | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| + | See the License for the specific language governing permissions and | ||
| + | limitations under the License. | ||
| + | --> | ||
| + | < | ||
| + | xmlns: | ||
| + | xsi: | ||
| + | https:// | ||
| + | version=" | ||
| metadata-complete=" | metadata-complete=" | ||
| Ligne 1503: | Ligne 1693: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | [root@centos7 | + | |
| + | [root@centos8 | ||
| <%@page language=" | <%@page language=" | ||
| < | < | ||
| Ligne 1513: | Ligne 1704: | ||
| </ | </ | ||
| </ | </ | ||
| - | </ | ||
| - | < | + | [root@centos8 |
| - | [root@centos7 | + | |
| - | [root@centos7 | + | [root@centos8 |
| <%@page language=" | <%@page language=" | ||
| < | < | ||
| Ligne 1528: | Ligne 1718: | ||
| </ | </ | ||
| - | Décommentez | + | Dé-commentez |
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| ... | ... | ||
| <Cluster className=" | <Cluster className=" | ||
| ... | ... | ||
| - | [root@centos7 | + | [root@centos8 |
| ... | ... | ||
| <Cluster className=" | <Cluster className=" | ||
| Ligne 1541: | Ligne 1731: | ||
| </ | </ | ||
| - | ===Sessions | + | ===Sessions |
| Editez maintenant les fichier **$CATALINA_HOME/ | Editez maintenant les fichier **$CATALINA_HOME/ | ||
| Ligne 1552: | Ligne 1742: | ||
| </ | </ | ||
| - | Vous obtiendrez un résultat similaire à celui-ci : | + | Vous obtiendrez un résultat similaire à celui-ci |
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | <?xml version='1.0' | + | <?xml version="1.0" |
| <!-- | <!-- | ||
| Licensed to the Apache Software Foundation (ASF) under one or more | Licensed to the Apache Software Foundation (ASF) under one or more | ||
| Ligne 1575: | Ligne 1765: | ||
| <!-- The contents of this file will be loaded for each web application --> | <!-- The contents of this file will be loaded for each web application --> | ||
| < | < | ||
| - | |||
| - | < | ||
| - | <Store className=" | ||
| - | directory="/ | ||
| - | </ | ||
| <!-- Default set of monitored resources. If one of these changes, the --> | <!-- Default set of monitored resources. If one of these changes, the --> | ||
| <!-- web application will be reloaded. | <!-- web application will be reloaded. | ||
| < | < | ||
| + | < | ||
| < | < | ||
| - | <!-- Uncomment this to disable | + | <!-- Uncomment this to enable |
| <!-- | <!-- | ||
| - | <Manager pathname="" | + | <Manager pathname=" |
| --> | --> | ||
| + | <Manager className=" | ||
| + | <Store className=" | ||
| + | directory="/ | ||
| + | </ | ||
| - | <!-- Uncomment this to enable Comet connection tacking (provides events | ||
| - | on session expiration as well as webapp lifecycle) --> | ||
| - | <!-- | ||
| - | <Valve className=" | ||
| - | --> | ||
| </ | </ | ||
| </ | </ | ||
| Ligne 1602: | Ligne 1787: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| </ | </ | ||
| + | |||
| + | Re-démarrez les instances de Tomcat : | ||
| + | |||
| + | < | ||
| + | [root@centos8 bin]# ./ | ||
| + | Using CATALINA_BASE: | ||
| + | Using CATALINA_HOME: | ||
| + | Using CATALINA_TMPDIR: | ||
| + | Using JRE_HOME: | ||
| + | Using CLASSPATH: | ||
| + | Using CATALINA_OPTS: | ||
| + | Oct 06, 2023 11:37:50 AM org.apache.catalina.startup.Catalina stopServer | ||
| + | SEVERE: Could not contact [localhost: | ||
| + | Oct 06, 2023 11:37:50 AM org.apache.catalina.startup.Catalina stopServer | ||
| + | SEVERE: Error stopping Catalina | ||
| + | java.net.ConnectException: | ||
| + | at java.net.PlainSocketImpl.socketConnect(Native Method) | ||
| + | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java: | ||
| + | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java: | ||
| + | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java: | ||
| + | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java: | ||
| + | at java.net.Socket.connect(Socket.java: | ||
| + | at java.net.Socket.connect(Socket.java: | ||
| + | at java.net.Socket.< | ||
| + | at java.net.Socket.< | ||
| + | at org.apache.catalina.startup.Catalina.stopServer(Catalina.java: | ||
| + | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | ||
| + | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: | ||
| + | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: | ||
| + | at java.lang.reflect.Method.invoke(Method.java: | ||
| + | at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java: | ||
| + | at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java: | ||
| + | |||
| + | [root@centos8 bin]# ./ | ||
| + | Using CATALINA_BASE: | ||
| + | Using CATALINA_HOME: | ||
| + | Using CATALINA_TMPDIR: | ||
| + | Using JRE_HOME: | ||
| + | Using CLASSPATH: | ||
| + | Using CATALINA_OPTS: | ||
| + | |||
| + | [root@centos8 bin]# ./ | ||
| + | Using CATALINA_BASE: | ||
| + | Using CATALINA_HOME: | ||
| + | Using CATALINA_TMPDIR: | ||
| + | Using JRE_HOME: | ||
| + | Using CLASSPATH: | ||
| + | Using CATALINA_OPTS: | ||
| + | Tomcat started. | ||
| + | |||
| + | [root@centos8 bin]# ./ | ||
| + | Using CATALINA_BASE: | ||
| + | Using CATALINA_HOME: | ||
| + | Using CATALINA_TMPDIR: | ||
| + | Using JRE_HOME: | ||
| + | Using CLASSPATH: | ||
| + | Using CATALINA_OPTS: | ||
| + | Tomcat started. | ||
| + | </ | ||
| + | |||
| + | <WRAP center round important 60%> | ||
| + | **Attention** : Notez l' | ||
| + | </ | ||
| En utilisant votre navigateur graphique, saisissez l'URL suivante : | En utilisant votre navigateur graphique, saisissez l'URL suivante : | ||
| < | < | ||
| - | http://www.i2tch.loc/ | + | http://www.ittraining.loc/ |
| </ | </ | ||
| Ligne 1614: | Ligne 1862: | ||
| < | < | ||
| - | Session : 7DA9FEE977543F1F574DADFA7B1FADD0.tomcat1 | + | Session : D45C86D1E78A93F3EBEC2B3F9F178F0E.tomcat1 |
| </ | </ | ||
| Ligne 1620: | Ligne 1868: | ||
| < | < | ||
| - | Session : 7DA9FEE977543F1F574DADFA7B1FADD0.tomcat2 | + | Session : D45C86D1E78A93F3EBEC2B3F9F178F0E.tomcat2 |
| </ | </ | ||
| + | |||
| + | {{ : | ||
| Selon l' | Selon l' | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | Using CATALINA_BASE: | + | Using CATALINA_BASE: |
| - | Using CATALINA_HOME: | + | Using CATALINA_HOME: |
| - | Using CATALINA_TMPDIR: | + | Using CATALINA_TMPDIR: |
| - | Using JRE_HOME: | + | Using JRE_HOME: |
| - | Using CLASSPATH: | + | Using CLASSPATH: |
| + | Using CATALINA_OPTS: | ||
| </ | </ | ||
| Ligne 1637: | Ligne 1888: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| - | Using CATALINA_BASE: | + | Using CATALINA_BASE: |
| - | Using CATALINA_HOME: | + | Using CATALINA_HOME: |
| - | Using CATALINA_TMPDIR: | + | Using CATALINA_TMPDIR: |
| - | Using JRE_HOME: | + | Using JRE_HOME: |
| - | Using CLASSPATH: | + | Using CLASSPATH: |
| + | Using CATALINA_OPTS: | ||
| </ | </ | ||
| Ligne 1648: | Ligne 1900: | ||
| < | < | ||
| - | [root@centos7 | + | [root@centos8 |
| total 4 | total 4 | ||
| - | -rw-r--r-- 1 root root 263 Jul 5 23:32 7DA9FEE977543F1F574DADFA7B1FADD0.tomcat1.session | + | -rw-r----- 1 root root 265 Oct 6 11:45 D45C86D1E78A93F3EBEC2B3F9F178F0E.tomcat1.session |
| </ | </ | ||
| Ligne 1656: | Ligne 1908: | ||
| < | < | ||
| - | Session : 7DA9FEE977543F1F574DADFA7B1FADD0.tomcat1 | + | Session : D45C86D1E78A93F3EBEC2B3F9F178F0E.tomcat1 |
| </ | </ | ||
| Ligne 1662: | Ligne 1914: | ||
| < | < | ||
| - | Session : 7DA9FEE977543F1F574DADFA7B1FADD0.tomcat2 | + | Session : D45C86D1E78A93F3EBEC2B3F9F178F0E.tomcat2 |
| </ | </ | ||
| + | |||
| + | {{ : | ||
| ----- | ----- | ||
| Copyright © 2023 Hugh Norris. | Copyright © 2023 Hugh Norris. | ||