Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
Apache HTTP Server CentOS 7 - mod_jk - Apache Tomcat Kommunikation
Der Apache HTTP Server ist ein Open Source Webserver und der seit 1996 am meisten im Internet eingesetzte Webserver weltweit. Der freie und quell offenen Webserver wird von der Apache Software Foundation zur Verfügung gestellt und weiterentwickelt.
Um den Apache HTTP Server als z.B. Frontend-Server vor eines Apache Tomcat Server zu betreiben, kann als Kommunikationsprotokoll das AJP/1.3-Protokoll zum Einsatz kommen.
Hierbei gibt es zwei Module, die die Kommunikation zwischen dem Apache HTTP Server und dem Apache Tomcat Server über das AJP/1.3-Protokoll bewerkstelligen können:
mod_jk
- Federführung bei der Entwicklung Apache Tomcat Servermod_proxy_ajp
- Federführung bei der Entwicklung Apache HTTP Server- Siehe auch internen Link: Apache HTTP Server CentOS 7 - mod_proxy_ajp - Apache Tomcat Kommunikation
Nachfolgend soll der Einsatz des Moduls - mod_jk
beschrieben werden.
Ab hier werden root
-Rechte zur Ausführung der nachfolgenden Befehle benötigt. Um root
zu werden geben Sie bitte folgenden Befehl ein:
$ su - Password:
Herunterladen
Nachfolgend soll ein Drittanbieter-Repository, welches von dem mir sehr geschätzten Michael Nausch betrieben wird und eine sichere und verlässliche Quelle für rpm-Pakete darstellt, wie unter nachfolgendem internen Link dargestellt, eingebunden werden:
Installation
Nachdem das Drittanbieter-Repository
erfolgreich eingebunden wurde, kann mit nachfolgendem Befehl, das rpm
-Paket - httpd-mod_jk
installiert werden:
# yum install httpd-mod_jk Loaded plugins: changelog, priorities 122 packages excluded due to repository priority protections Resolving Dependencies --> Running transaction check ---> Package httpd-mod_jk.x86_64 0:1.2.40-1.el7.centos will be installed --> Finished Dependency Resolution Changes in packages about to be updated: Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: httpd-mod_jk x86_64 1.2.40-1.el7.centos mailserver.guru-os 161 k Transaction Summary ================================================================================ Install 1 Package Total download size: 161 k Installed size: 418 k Is this ok [y/d/N]: y httpd-mod_jk-1.2.40-1.el7.centos.x86_64.rpm | 161 kB 00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : httpd-mod_jk-1.2.40-1.el7.centos.x86_64 1/1 Verifying : httpd-mod_jk-1.2.40-1.el7.centos.x86_64 1/1 Installed: httpd-mod_jk.x86_64 0:1.2.40-1.el7.centos Complete!
Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket httpd-mod_jk
installiert wurden.
# rpm -qil httpd-mod_jk Name : httpd-mod_jk Epoch : 0 Version : 1.2.40 Release : 1.el7.centos Architecture: x86_64 Install Date: Tue 12 May 2015 01:40:47 PM CEST Group : Development/Java Size : 427794 License : Apache License Signature : RSA/SHA1, Tue 05 May 2015 12:30:49 PM CEST, Key ID 60ecfb9e8195aea0 Source RPM : httpd-mod_jk-1.2.40-1.el7.centos.src.rpm Build Date : Tue 05 May 2015 12:30:35 PM CEST Build Host : vml000200.dmz.nausch.org Relocations : (not relocatable) URL : http://tomcat.apache.org/ Summary : Tomcat mod_jk connector for Apache Description : The mod_jk module add support for the Apache HTTP Server, to communicate as a front-end server for Apache Tomcat Server or any other AJP1.3-enabled application server, with optional load-balancing. /etc/httpd/conf.modules.d/10-mod_jk.conf /etc/httpd/modules/mod_jk.so /usr/share/doc/httpd-mod_jk-1.2.40 /usr/share/doc/httpd-mod_jk-1.2.40/BUILDING.txt /usr/share/doc/httpd-mod_jk-1.2.40/LICENSE /usr/share/doc/httpd-mod_jk-1.2.40/NOTICE /usr/share/doc/httpd-mod_jk-1.2.40/README.txt /usr/share/doc/httpd-mod_jk-1.2.40/STATUS.txt /usr/share/doc/httpd-mod_jk-1.2.40/TODO.txt /usr/share/doc/httpd-mod_jk-1.2.40/workers.properties.minimal
Konfiguration
/etc/httpd/conf.modules.d/10-mod_jk.conf
Die Konfigurationsdatei /etc/httpd/conf.modules.d/10-mod_jk.conf
beinhaltet nur die Integration des Moduls mod_jk
in den Apache HTTP Server.
HINWEIS - Hier werden aktuell KEINE Anpassungen vorgenommen, da nur das Laden des Apache HTTP Server-Moduls mod_jk
und in dieser Konfigurationsdatei konfiguriert wird!
(komplette Konfigurationsdatei)
# This file configures the mod_jk module: LoadModule jk_module modules/mod_jk.so