Bug 1004884 - How to install mod_jk from RPM: The definite guide
How to install mod_jk from RPM: The definite guide
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Documentation (Show other bugs)
6.1.1
Unspecified Unspecified
urgent Severity urgent
: ER5
: EAP 6.2.0
Assigned To: Scott Mumford
Michal Karm Babacek
:
: 988828 (view as bug list)
Depends On: 988827
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-05 12:26 EDT by Michal Karm Babacek
Modified: 2015-02-20 05:23 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 988827
Environment:
Build: CSProcessor Builder Version 1.11 Build Name: 11865, Administration and Configuration Guide-6.1-4 Build Date: 23-07-2013 14:19:42 Topic ID: 5218-460339 [Specified]
Last Closed: 2013-12-15 11:19:04 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michal Karm Babacek 2013-09-05 12:26:37 EDT
Dear doc guys,
I would like you to read the following text and comment on
which articles should appear in the official documentation.

Regarding the described workaround paragraphs:
  These won't be necessary as soon as [BZ 1004875] is resolved.
  This also means that in EAP 6.2, this text won't be accurate any more
  and paragraphs related to mod_jk with base os httpd would have to be updated.


Please, consider whether some parts of this text aren't actually more suitable
for the Knowledge base access portal.


RHEL5
=====
Mod_jk 1.2.37 is compatible with the base os httpd 2.2.3, yet, the current 
EAP 6.1.1 mod_jk RPM has its httpd dependency set to >= httpd 2.2.22, so one
can install mod_jk in the following ways:

a) The good, supported one with httpd 2.2.22
--------------------------------------------
{code}
yum install mod_jk
{code}

This step will install mod_jk-ap22 1.2.37 and its dependency: httpd 2.2.22 from
jbappplatform-6-*-server-5-rpm channel. At this point, mod_jk is successfully installed.
One can copy its configuration files examples:

{code}
cp /usr/share/doc/mod_jk-ap22-1.2.37/mod_jk.conf.sample /etc/httpd/conf.d/mod_jk.conf
cp /usr/share/doc/mod_jk-ap22-1.2.37/workers.properties.sample /etc/httpd/conf/workers.properties
{code}

and adjust them to ones needs <reference to configuration Chapter here>. Mod_jk is ready and the httpd
it resides in can be started as simply as:

{code}
service httpd start
{code}



b) Use the base os httpd 2.2.3 + yum workaround
------------------------------------------------
Due to the current httpd >= 2.2.22 dependency set for mod_jk 1.2.37,
it is not possible to install it in the standard way without being forced
to update the base os httpd 2.2.3 to 2.2.22 from jbappplatform-6 channel.
One can do the following unsupported workaround though:

{code}
yum install httpd mod_perl
{code}

The aforementioned command installs httpd 2.2.3, mod_perl and other necessary
dependencies from rhel-*-server-5 channel. If you are registered to jbappplatform-6 channel
already, you can append --disablerepo=jbappplatform-6-*

Furthermore, let's download mod_jk from jbappplatform-6-*-server-5-rpm channel:
{code}
yum install yum-downloadonly
yum install mod_jk-ap22 --downloadonly --downloaddir=./ -y
rpm -U mod_jk-ap22-1.2.37* --nodeps
{code}

At this point, mod_jk native lib is installed. One can copy its configuration files examples:

{code}
cp /usr/share/doc/mod_jk-ap22-1.2.37/mod_jk.conf.sample /etc/httpd/conf.d/mod_jk.conf
cp /usr/share/doc/mod_jk-ap22-1.2.37/workers.properties.sample /etc/httpd/conf/workers.properties
{code}

and adjust them to ones needs <reference to configuration Chapter here>. Mod_jk is ready and the httpd
it resides in can be started as simply as:

{code}
service httpd start
{code}



c) The good, supported one with base os httpd 2.2.3
---------------------------------------------------
If the base os httpd 2.2.3 must be used and updating httpd to httpd 2.2.22 from
jbappplatform-6 rpm channel is not the preferred option, the best and supported
solution is to follow mod_jk installation from the zip distribution.

Please note there are these dependencies one must install in order to be able to
use mod_jk 1.2.37 with the base os httpd 2.2.3:

{code}
yum install mod_perl
{code}



Note on mod_perl
----------------
Make sure mod_perl module is loaded _before_ mod_jk module. One can e.g. add this
to /etc/httpd/conf.d/mod_jk.conf:

+<IfModule !perl_module>
+        LoadModule perl_module modules/mod_perl.so
+</IfModule>
LoadModule jk_module modules/mod_jk.so

The following error message means that your mod_jk module had been loaded before mod_perl was present:
    Cannot load /etc/httpd/modules/mod_jk.so into server: /etc/httpd/modules/mod_jk.so: undefined symbol: ap_get_server_description




RHEL6
=====
The base os httpd 2.2.15 is just fine for running mod_jk 1.2.37, however the current
EAP 6.1.1 mod_jk RPM has its httpd dependency set to >= httpd 2.2.22,
so there are three options:

a) The good, supported one with httpd 2.2.22
--------------------------------------------
{code}
yum install mod_jk
{code}

This step will install mod_jk-ap22 1.2.37 and its dependency: httpd 2.2.22 from
jbappplatform-6-*-server-6-rpm channel.
At this point, mod_jk is successfully installed. One can copy its configuration files examples:

{code}
cp /usr/share/doc/mod_jk-ap22-1.2.37/mod_jk.conf.sample /etc/httpd/conf.d/mod_jk.conf
cp /usr/share/doc/mod_jk-ap22-1.2.37/workers.properties.sample /etc/httpd/conf/workers.properties
{code}

and adjust them to ones needs <reference to configuration Chapter here>. Mod_jk is ready and the httpd
it resides in can be started as simply as:

{code}
service httpd start
{code}



b) Use the base os httpd 2.2.15 + yum workaround
------------------------------------------------
It is possible to use mod_jk 1.2.37 with the base os httpd 2.2.15, yet,
the dependency of mod_jk 1.2.37 package is set to httpd >= 2.2.22. If updating httpd to httpd 2.2.22 from
jbappplatform-6 rpm channel is not the preferred option, one can install mod_jk with these steps:

{code}
yumdownloader mod_jk-ap22
rpm -U mod_jk-ap22-1.2.37* --nodeps
{code}

At this point, mod_jk native is installed and can be used with base os httpd 2.2.15.
One can copy its configuration files examples:

{code}
cp /usr/share/doc/mod_jk-ap22-1.2.37/mod_jk.conf.sample /etc/httpd/conf.d/mod_jk.conf
cp /usr/share/doc/mod_jk-ap22-1.2.37/workers.properties.sample /etc/httpd/conf/workers.properties
{code}

and adjust them to ones needs <reference to configuration Chapter here>. Mod_jk is ready and the httpd
it resides in can be started as simply as:

{code}
service httpd start
{code}



c) The good, supported one with base os httpd 2.2.15
-----------------------------------------------------
If the base os httpd 2.2.15 must be used and updating httpd to httpd 2.2.22 from
jbappplatform-6 rpm channel is not the preferred option, the best and supported
solution is to follow mod_jk installation from the zip distribution.
<reference to jboss-eap-native-webserver-connectors-6.1.1-RHEL*.zip install guide>


:-)
Comment 2 Michal Karm Babacek 2013-10-10 11:02:17 EDT
=== [UPDATED FOR EAP 6.2] ===
Dear doc guys,
I would like to present you with the ultimate guide to mod_jk RPM installation within the context of EAP 6.2.
Please, read the following text and comment on it. It is essential that it makes it to EAP 6.2 release.

RHEL 5
======
Mod_jk 1.2.37 is compatible with the Apache HTTP Server 2.2.3 native to RHEL 5 operating system.
The only constraint is that having mod_perl enabled prior to mod_jk is essential for using mod_jk 1.2.37 with Apache HTTP Server 2.2.3.
There are two supported ways of installing mod_jk from jbappplatform-6 channel:

a) mod_jk with Apache HTTP Server 2.2.3 native to RHEL 5
---------------------------------------------------------
{code}
yum install mod_jk
{code}

This step will install mod_jk-ap22 1.2.37 and its dependency mod_perl from
jbappplatform-6-*-server-5-rpm channel. At this point, mod_jk is successfully installed.
One can copy its configuration files examples:

{code}
cp /usr/share/doc/mod_jk-ap22-1.2.37/mod_jk.conf.sample /etc/httpd/conf.d/mod_jk.conf
cp /usr/share/doc/mod_jk-ap22-1.2.37/workers.properties.sample /etc/httpd/conf/workers.properties
{code}

and adjust them to ones needs <reference to configuration Chapter here>. Mod_jk is ready and the
Apache HTTP Server it resides in can be started as simply as:

{code}
service httpd start
{code}

Note on mod_perl
----------------
Make sure mod_perl module is loaded _before_ mod_jk module. One can e.g. add this
to /etc/httpd/conf.d/mod_jk.conf:

+<IfModule !perl_module>
+        LoadModule perl_module modules/mod_perl.so
+</IfModule>
LoadModule jk_module modules/mod_jk.so

The following error message means that your mod_jk module had been loaded before mod_perl was present:
    Cannot load /etc/httpd/modules/mod_jk.so into server: /etc/httpd/modules/mod_jk.so: undefined symbol: ap_get_server_description



b) mod_jk with JBAPP6 Apache HTTP Server 2.2.22
------------------------------------------------
Mod_jk 1.2.37 is compatible with the Apache HTTP Server 2.2.22 from jbappplatform-6 channel.
One can install both mod_jk and the latest Apache HTTP Server 2.2.22 provided by the aforementioned channel with this command:

{code}
yum install mod_jk httpd
{code}

This step will install mod_jk-ap22 1.2.37 and install or update (depends on the previous state of the system)
Apache HTTP Server 2.2.22 from jbappplatform-6-*-server-5-rpm channel. Note that there is no mod_perl installed
as it is no longer a needed dependency with Apache HTTP Server 2.2.22.
At this point, mod_jk is successfully installed. One can copy its configuration files examples:

{code}
cp /usr/share/doc/mod_jk-ap22-1.2.37/mod_jk.conf.sample /etc/httpd/conf.d/mod_jk.conf
cp /usr/share/doc/mod_jk-ap22-1.2.37/workers.properties.sample /etc/httpd/conf/workers.properties
{code}

and adjust them to ones needs <reference to configuration Chapter here>. Mod_jk is ready and the
Apache HTTP Server it resides in can be started as simply as:

{code}
service httpd start
{code}


RHEL 6
======
Apache HTTP Server 2.2.15 native to RHEL 6 is just fine for running mod_jk 1.2.37,
so there are these options:

a) mod_jk with JBAPP6 Apache HTTP Server 2.2.22
-----------------------------------------------
{code}
yum install mod_jk httpd
{code}

This step will install mod_jk-ap22 1.2.37 and Apache HTTP Server 2.2.22 httpd package from
jbappplatform-6-*-server-6-rpm channel. If there had been any older Apache HTTP Server installed,
it was updated. At this point, mod_jk is successfully installed. One can copy its configuration files examples:

{code}
cp /usr/share/doc/mod_jk-ap22-1.2.37/mod_jk.conf.sample /etc/httpd/conf.d/mod_jk.conf
cp /usr/share/doc/mod_jk-ap22-1.2.37/workers.properties.sample /etc/httpd/conf/workers.properties
{code}

and adjust them to ones needs <reference to configuration Chapter here>. Mod_jk is ready and Apache HTTP Server
it resides in can be started as simply as:

{code}
service httpd start
{code}



b) mod_jk with Apache HTTP Server 2.2.15 native to RHEL 6
----------------------------------------------------------
It is possible to use mod_jk 1.2.37 with the Apache HTTP Server 2.2.15 native to RHEL 6,
so one can simply run:

{code}
yum install mod_jk
{code}

At this point, mod_jk native is installed and can be used with Apache HTTP Server 2.2.15.
One can copy its configuration files examples:

{code}
cp /usr/share/doc/mod_jk-ap22-1.2.37/mod_jk.conf.sample /etc/httpd/conf.d/mod_jk.conf
cp /usr/share/doc/mod_jk-ap22-1.2.37/workers.properties.sample /etc/httpd/conf/workers.properties
{code}

and adjust them to ones needs <reference to configuration Chapter here>. Mod_jk is ready and the httpd
it resides in can be started as simply as:

{code}
service httpd start
{code}


Note on mod_perl
----------------
Please, note that neither Apache HTTP Server 2.2.15 native to RHEL 6 nor Apache HTTP Server 2.2.22 from JBAPP6 distribution, unlike Apache HTTP Server 2.2.3 native to RHEL 5, requires mod_perl in order to run mod_jk, so mod_perl package is not installed by default.




HTH
-M_
Comment 3 Scott Mumford 2013-10-29 00:15:40 EDT
*** Bug 988828 has been marked as a duplicate of this bug. ***
Comment 4 Scott Mumford 2013-10-29 21:16:37 EDT
Thanks for supplying that final content Michal.

I've used it to create new topic 24379 which has been added to the Admin and Config Guide immediately following the (now renamed) ZIP installation topic.

I'll move this bug to ON_QA when the new content is available for review.
Comment 6 Michal Karm Babacek 2013-11-04 18:43:08 EST
Paragraph:
    If you are using Apache HTTP Server, download the JBoss EAP 6 Native Components

in the Chapter 16.6.4. is misleading and redundant. Why would anyone need to download anything if we talk an RPM installation here?

THX for looking into it.
Comment 7 Scott Mumford 2013-11-04 20:00:06 EST
Thanks Michal,

I had just reused the pre-requisite list from the ZIP topics, assuming they would be similar. Thanks for catching the redundancy.

The instruction to download Natives has been removed from the procedure.
Comment 8 Michal Karm Babacek 2013-11-05 04:51:07 EST
OK

Note You need to log in before you can comment on or make changes to this bug.