动态模块支持编译Apache Web服务器 [英] Compiling Apache web server with dynamic module support

查看:229
本文介绍了动态模块支持编译Apache Web服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚编上一个新的Apache 2.2.17安装Ubuntu 10.04.2的。这是一个学习的过程,发现什么是真正的推移,当你编译的东西,而不是仅仅使用上易于得到,因此使用的回避apt-get的赞成编写的东西我自己。

I have just compiled Apache 2.2.17 on a fresh install of Ubuntu 10.04.2. It's a learning exercise to discover what actually goes on when you compile something rather than just using apt-get hence the avoidance of using apt-get in favour of compiling the thing myself.

我跑:

sudo ./configure --prefix=/etc/apache --enable-module=so --enable-rule=SHARED_CORE --enable-shared=max --enable-ssl=shared --enable-rewrite=shared

其次强制性:

sudo make && sudo make install

一切似乎进展顺利(Apache的启动没有问题),除了在Apache的模块,我本来期望看到mod_rewrite.so和mod_ssl.so目录,而不是我看到的:

All seemed to go well (Apache starts up no problems) except that in the Apache modules directory where I would have expected to see mod_rewrite.so and mod_ssl.so, instead I see:

#cd /etc/apache/modules
#ls -l
mod_rewrite.a
mod_rewrite.la
mod_ssl.a
mod_ssl.la

我怎样才能把这些变成.so文件,所以我可以在Apache的配置用的LoadModule联系他们?

How can I turn these into .so files so I can link them with LoadModule in the Apache config?

先谢谢了。

推荐答案

您不应该运行一切以root身份。 ./配置制作将正常工作,没有root权限,使安装需要root权限,如的/ etc 和的/ usr / bin中

You should not run everything as root. ./configure and make will work fine without root permissions, make install requires root permissions for writing to directories like /etc and /usr/bin.

的/ etc 不适合的可执行文件,更不用说完整的Apache安装。如果你想要把你的配置文件中的的/ etc /阿帕奇,使用 - SYSCONFDIR =的/ etc /阿帕奇 。安装自定义编译Apache的正确位置是的/ usr /本地

/etc is not suitable for executables, let alone a full Apache installation. If you want to put your configuration files in /etc/apache, use the --sysconfdir=/etc/apache. The correct place to install a custom-build Apache is /usr/local.

要启用共享模块,您必须通过 - 启用 - 因此选项,为共享应加入 - 启用 - MODS共享

To enable shared modules, you have to pass the --enable-so option, the modules which should be compiled as shared should be added to --enable-mods-shared.

为Apache + mod_ssl的(共享模块)+ mod_rewrite的(共享模块)正确的配置线,安装在的/ usr /本地/ Apache 使用配置文件中的的/ etc /阿帕奇

The correct configure line for Apache + mod_ssl (shared module) + mod_rewrite (shared module) is, installed in /usr/local/apache with configuration files in /etc/apache:

./configure --prefix=/usr/local/apache --sysconfdir=/etc/apache --enable-so \
  --enable-rewrite --enable-ssl --enable-mods-shared='rewrite ssl'

成功配置Apache httpd的,运行后制作然后按须藤使安装

有关配置选项的详细信息可以在 apache httpd的文档

More information about the configure options can be found at the Apache HTTPd documentation.

这篇关于动态模块支持编译Apache Web服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆