- 论坛徽章:
- 0
|
谢谢楼上的啦,我试了下:
[root@localhost /]# /opt/apache2/bin/apxs -a -c -i -n ldap mod_ldap.so
/opt/apache2/build/libtool --silent --mode=link gcc -o mod_ldap.la -rpath /opt/apache2/modules -module -avoid-version mod_ldap.so
/opt/apache2/build/instdso.sh SH_LIBTOOL='/opt/apache2/build/libtool' mod_ldap.la /opt/apache2/modules
/opt/apache2/build/libtool --mode=install cp mod_ldap.la /opt/apache2/modules/
cp .libs/mod_ldap.so /opt/apache2/modules/mod_ldap.so
cp .libs/mod_ldap.lai /opt/apache2/modules/mod_ldap.la
cp .libs/mod_ldap.a /opt/apache2/modules/mod_ldap.a
chmod 644 /opt/apache2/modules/mod_ldap.a
ranlib /opt/apache2/modules/mod_ldap.a
PATH="$PATH:/sbin" ldconfig -n /opt/apache2/modules
----------------------------------------------------------------------
Libraries have been installed in:
/opt/apache2/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so( manual pages.
----------------------------------------------------------------------
chmod 755 /opt/apache2/modules/mod_ldap.so
[activating module `ldap' in /opt/apache2/conf/httpd.conf]
用楼上的方法,加上-n参数指定模块名字,看最后两行提示,已经成功生成了mod_ldap.so文件,并在httpd.conf里自动加上去了.
BUT.....
[root@localhost ~]# /opt/apache2/bin/httpd
httpd: Syntax error on line 55 of /opt/apache2/conf/httpd.conf: Can't locate API module structure `authnz_ldap_module' in file /opt/apache2/modules/mod_authnz_ldap.so: /opt/apache2/modules/mod_authnz_ldap.so: undefined symbol: authnz_ldap_module
运行httpd得到这提示,好像模块还是有点问题???
[ 本帖最后由 foxzenith 于 2008-9-4 15:56 编辑 ] |
|