免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2534 | 回复: 7
打印 上一主题 下一主题

[Web] 请问Apache安装后怎样再加入新模块 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-03-01 21:38 |只看该作者 |倒序浏览
用tar包安装Apache,在后来使用中发现没有mod_dav模块,请问怎么才能在不影响正常使用的情况下加入对该模块的支持

论坛徽章:
0
2 [报告]
发表于 2006-03-02 00:10 |只看该作者
用tar包安装Apache,在后来使用中发现没有mod_dav模块,请问怎么才能在不影响正常使用的情况下加入对该模块的支持



首先问楼主,tar安装编译的时候,是否 --enable-so ?
只有编译的时候,加入此项,才可以动态加载模块

论坛徽章:
0
3 [报告]
发表于 2006-03-02 09:31 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
4 [报告]
发表于 2006-03-02 13:07 |只看该作者
我只在编译时加入了enable-modules选项,是不是我要实现mod_dav的支持,必须要重新编译安装呀?

论坛徽章:
0
5 [报告]
发表于 2006-03-02 15:25 |只看该作者
  1. 我只在编译时加入了enable-modules选项,是不是我要实现mod_dav的支持,必须要重新编译安装呀?
复制代码


不需要重装apache
编译 mod_dav得到模块,在httpd.conf 加入模块读取,就Ok

论坛徽章:
0
6 [报告]
发表于 2006-03-02 23:18 |只看该作者
再请教楼上的大哥,我下载mod_dav的tar包后安装,无法编译通过,看说明是缺少expat文件,再下载expat文件夹,如下
[root@server expat]# ls
bin        expat.html  lib       sample    xmltok
expat.dsw  gennmtab    Makefile  xmlparse  xmlwf

按照mod_dav对expat有如下说明

For Unix
          Note that the expat Makefile does not automatically build the
          expat library. Add this rule to the Makefile:

  libexpat.a: $(OBJS)
        ar -rc $@ $(OBJS)
        ranlib $@

          (don't forget to use tabs before the ar and ranlib lines there)

          Then type: make libexpat.a
但我半天也不明白
         
        libexpat.a: $(OBJS)
        ar -rc $@ $(OBJS)
        ranlib $@

          (don't forget to use tabs before the ar and ranlib lines there)
这些话是什么意思,能不能给指点下,谢谢

论坛徽章:
0
7 [报告]
发表于 2006-03-02 23:47 |只看该作者
能把编译过程帖一下吗?

论坛徽章:
0
8 [报告]
发表于 2006-03-03 21:16 |只看该作者
这是编译mod_dav的结果
[root@server mod_dav-1.0.3-1.3.6]# ./configure --with-apxs=/usr/local/apache2/bin/apxs
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for static Apache module support... no
checking for dynamic Apache module support (via APXS)... found at /usr/local/apache2/bin/apxs
configure: error: Your APXS installation is broken and cannot be used.
    Please see http://www.webdav.org/mod_dav/install.html#apxs for
    more information.
下边是不管mod_dav中的说明直接运行expat中 Makefile的结果
[root@server expat]# Makefile
-bash: Makefile: command not found
[root@server expat]# ./Makefile
./Makefile: line 8: -O2: command not found
./Makefile: line 13: xmltok/xmlrole.o: No such file or directory
./Makefile: line 1: FILEMAP_OBJ: command not found
./Makefile: line 17: xmlwf/xmlfile.o: No such file or directory
./Makefile: line 1: EXE: command not found
./Makefile: line 1: XMLWF: command not found
./Makefile: line 25: all:: command not found
./Makefile: line 1: XMLWF: command not found
./Makefile: line 1: OBJS: command not found
./Makefile: line 1: LIB: command not found
./Makefile: line 1: CC: command not found
./Makefile: line 1: CFLAGS: command not found
./Makefile: line 1: OBJS: command not found
./Makefile: line 1: LIB: command not found
./Makefile: line 28: -o: command not found
./Makefile: line 1: LIB: command not found
./Makefile: line 1: LIBOBJS: command not found
./Makefile: line 1: AR: command not found
./Makefile: line 1: LIB: command not found
./Makefile: line 1: LIBOBJS: command not found
./Makefile: line 31: rc: command not found
./Makefile: line 33: clean:: command not found
./Makefile: line 1: OBJS: command not found
./Makefile: line 1: LIBOBJS: command not found
./Makefile: line 1: LIB: command not found
./Makefile: line 1: XMLWF: command not found
./Makefile: line 1: EXE: command not found
./Makefile: line 36: xmltok/nametab.h:: No such file or directory
./Makefile: line 1: EXE: command not found
./Makefile: line 38: $@: ambiguous redirect
./Makefile: line 1: EXE: command not found
./Makefile: line 40: gennmtab/gennmtab:: No such file or directory
./Makefile: line 1: CC: command not found
./Makefile: line 1: CFLAGS: command not found
./Makefile: line 41: -o: command not found
./Makefile: line 43: xmltok/xmltok.o:: No such file or directory
./Makefile: line 45: .c.o:: command not found
./Makefile: line 46: syntax error near unexpected token `newline'
./Makefile: line 46: `  $(CC) $(CFLAGS) -c -o $@ $<'

下边是mod_dav中install的部分关于expat的说明
Note: sometimes, the APXS installation may be broken. If the
     configure process reports this, then please refer to a [10]FAQ
     entry written by the PHP folks. It explains the problem quite well.

          The configuration process will do its stuff. One of its tasks
          is to locate the Expat library (an XML parsing library). This
          library is included with Apache 1.3.9 and will automatically be
          found. If you have a previous version of Apache 1.3 (it must be
          at least Apache 1.3.4), then you will need a copy on your
          system. configure will look for it in /usr/{include,lib} and in
          /usr/local/{include,lib}. If it can't find it, then you will
          need to tell configure where it is on your system using the
          --with-expat=<dir> command line option. For example:

     ./configure --with-apxs=/usr/local/apache/bin/apxs
     --with-expat=/home/gstein/expat
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP