使用Apache 2.2安装mod_jk

时间:2022-06-16 22:46:22

I have downloaded mod_jk-1.2.28-httpd-2.2.X.so for Apache 2.2 running on CentOS, and set up as per http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html. When I try to start httpd it fails with the following error: "Starting httpd: httpd: Syntax error on line 993 of /etc/httpd/conf/httpd.conf: Syntax error on line 2 of /opt/apache-tomcat-6.0.26/conf/jk/mod_jk.conf-auto: Cannot load /etc/httpd/modules/mod_jk-1.2.28-httpd-2.2.X.so into server: /etc/httpd/modules/mod_jk-1.2.28-httpd-2.2.X.so: wrong ELF class: ELFCLASS32"

我已经下载了mod_jk-1.2.28-httpd-2.2.X。对于运行在CentOS上的Apache 2.2,并按照http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html进行设置。当我尝试启动httpd时,它失败了,错误如下:“启动httpd: httpd:语法错误,在/etc/ httpd/con/httpd .第993行。conf: /opt/apache-tomcat-6.0.26/conf/jk/mod_jk第2行语法错误。conf-auto:无法加载/etc/httpd/modules/mod_jk-1.2.28-httpd-2.2.X。所以到服务器:/etc/httpd/modules/mod_jk-1.2.28-httpd-2.2.X。所以:错误的精灵类:ELFCLASS32"

Does that mean that mod_jk-1.2.28-httpd-2.2.X.so has not been properly compiled?. What can I do about that? Thanks

这是否意味着mod_jk-1.2.28-httpd-2.2.X。所以还没有正确的编译?我该怎么办呢?谢谢

Peter

彼得

2 个解决方案

#1


2  

It means that you have a 32-bit module, but are not running a 32-bit httpd. Install the proper gcc package from the repositories and rebuild the module.

这意味着您有一个32位的模块,但是没有运行一个32位的httpd。从存储库中安装适当的gcc包并重新构建模块。

#2


0  

To fix, I installed the Tomcat Connector using yum:

为了修复,我使用yum安装了Tomcat连接器:

yum search mod_jk

mod_jk-ap20.x86_64 : Tomcat mod_jk connector for Apache 2.0.x

mod_jk-ap22.x86_64 : Tomcat mod_jk connector for Apache 2.x

yum install mod_jk

#1


2  

It means that you have a 32-bit module, but are not running a 32-bit httpd. Install the proper gcc package from the repositories and rebuild the module.

这意味着您有一个32位的模块,但是没有运行一个32位的httpd。从存储库中安装适当的gcc包并重新构建模块。

#2


0  

To fix, I installed the Tomcat Connector using yum:

为了修复,我使用yum安装了Tomcat连接器:

yum search mod_jk

mod_jk-ap20.x86_64 : Tomcat mod_jk connector for Apache 2.0.x

mod_jk-ap22.x86_64 : Tomcat mod_jk connector for Apache 2.x

yum install mod_jk