mod_wl.so,apxs,mod_so.c,--with-mpm=worker,selinux;apapche&weblogic链接配置

#cd /data/src

#tar -xvzf httpd-2.0.52.tar.gz

#cd httpd-2.0.52

#./configure --prefix=/usr/local/apache2 --enable-module=so --enable-rule=SHARED_CORE\

--enable-rewrite && make && make install

备注:不要添加参数:--with-mpm=worker了

[root@lc httpd-2.0.52]# cd /usr/local/apache2/

[root@lc apache2]# ./bin/httpd -l

Compiled in modules:

  core.c

  mod_access.c

  mod_auth.c

  mod_include.c

  mod_log_config.c

  mod_env.c

  mod_setenvif.c

  worker.c

  http_core.c

  mod_mime.c

  mod_status.c

  mod_autoindex.c

  mod_asis.c

  mod_cgid.c

  mod_negotiation.c

  mod_dir.c

  mod_imap.c

  mod_actions.c

  mod_userdir.c

  mod_alias.c

  mod_so.c-------------------------à说明已经支持so模块

[root@lc apache2]# cd /opt/bea/

[root@lc bea]# pwd

/opt/bea

# perl /usr/local/apache2/bin/apxs -i -a -n weblogic mod_wl.so

# ll /usr/lib/httpd/modules/mod_wl.so

ls: /usr/lib/httpd/modules/mod_wl.so: No such file or directory

 

[root@lc bea]# perl /usr/local/apache2/bin/apxs -i -a -n weblogic mod_wl.so

/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' mod_wl.so /usr/local/apache2/modules

/usr/local/apache2/build/libtool --mode=install cp mod_wl.so /usr/local/apache2/modules/

cp mod_wl.so /usr/local/apache2/modules/mod_wl.so

Warning!  dlname not found in /usr/local/apache2/modules/mod_wl.so.

Assuming installing a .so rather than a libtool archive.

chmod 755 /usr/local/apache2/modules/mod_wl.so

[activating module `weblogic' in /usr/local/apache2/conf/httpd.conf]

 

Httpd.conf文件配置

# cd /usr/local/apache2/conf/

# pwd

/usr/local/apache2/conf

[root@lc conf]# ../bin/apachectl start

 

[root@lc conf]# ../bin/apachectl start

WARNING: ThreadsPerChild of 100 exceeds ThreadLimit value of 64

threads, lowering ThreadsPerChild to 64. To increase, please see the

 ThreadLimit directive.

WARNING: MaxClients (10000) is not an integer multiple

 of ThreadsPerChild (64), lowering MaxClients to 9984

 for a maximum of 156 child processes,

WARNING: MaxClients of 9984 would require 156 servers,

 and would exceed the ServerLimit value of 100.

 Automatically lowering MaxClients to 6400.  To increase,

 please see the ServerLimit directive.

Syntax error on line 311 of /usr/local/apache2/conf/httpd.conf:

DocumentRoot must be a directory

 

当有如上报错后,去掉参数:--with-mpm=worker后,重新编译

[root@lc conf]# ../bin/apachectl start

Syntax error on line 311 of /usr/local/apache2/conf/httpd.conf:

DocumentRoot must be a directory

[root@lc conf]# ps aux|grep httpd

root      8625  0.0  0.0   5136  1736 ?        Ss   10:09   0:00 /usr/local/apache2/bin/httpd -k start

nobody    8626  0.0  0.0   4928  1140 ?        S    10:09   0:00 /usr/local/apache2/bin/httpd -k start

nobody    8627  0.0  0.0 281908  2068 ?        Sl   10:09   0:00 /usr/local/apache2/bin/httpd -k start

nobody    8629  0.0  0.0 281772  1700 ?        Sl   10:09   0:00 /usr/local/apache2/bin/httpd -k start

root     14739  0.0  0.0   4016  680 pts/1    S+   10:23   0:00 grep httpd

 

看到报错:DocumentRoot must be a directory,请查看SELinux的状态

# getenforce

Enforcing

请关闭SELinux

# setenforce 0

# getenforce

Permissive

# vim /etc/sysconfig/selinux

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

#       enforcing - SELinux security policy is enforced.

#       permissive - SELinux prints warnings instead of enforcing.

#       disabled - SELinux is fully disabled.

#SELINUX=enforcing

SELINUX=disabled

#reboot

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值