红联Linux门户
Linux帮助

在centos上安装apache时出错了,谁能帮忙看看啊

发布时间:2009-12-10 16:17:25来源:红联作者:yongshun86
用的配置是:
./configure --prefix=/usr/local/apache2 --sysconfdir=/etc/httpd --with-z=/usr/local/zlib/ --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-static-support

启动时报错
/usr/local/apache2/bin/apachectl start
httpd: Syntax error on line 54 of /etc/httpd/httpd.conf: Cannot load /usr/local/apache2/modules/mod_deflate.so into server: /usr/local/apache2/modules/mod_deflate.so: cannot restore segment prot after reloc: Permission denied

如果只用
./configure --prefix=/usr/local/apache2
则能正常启动
文章评论

共有 4 条评论

  1. yongshun86 于 2009-12-11 19:36:46发表:

    下午找到原因了。
    --with-z=/usr/local/zlib/
    上面的配置写错了
    准确的为--with-zlib=/usr/local/zlib/
    :0lopw(1

  2. yongshun86 于 2009-12-11 17:16:47发表:

    谢谢大家,我再试试。

  3. marco.chan 于 2009-12-11 15:17:26发表:

    Permission denied

  4. ixdba 于 2009-12-10 17:33:27发表:

    [i=s] 本帖最后由 ixdba 于 2009-12-10 17:36 编辑 [/i]

    安全权限问题哦,
    http://www.linuxdiyf.com/bbs/viewthread.php?tid=167990

    你的安装太繁琐了,参考这个帖子的附件,里面有详细安装说明!


    解决方法是关闭selinux


    编辑/etc/selinux/config,找到这段:

    # 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=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:

    SELINUX=disabled

    保存,关闭。