`
wind9984
  • 浏览: 48110 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

apache configure

阅读更多

APACHE CONFIGURATION

Apache 1.3 Autoconf-style Interface (APACI)

===========================================

APACI is an Autoconf-style interface for the Unix side of the Apache 1.3

HTTP server source distribution. It is actually not GNU Autoconf-based, i.e.

the GNU Autoconf package itself is not used. Instead APACI just provides a

similar batch configuration interface and a corresponding out-of-the-box

build and installation procedure.

The basic goal is to provide the following commonly known and expected

procedure for out-of-the-box building and installing a package like Apache:

$ gunzip <apache_1.3.X.tar.gz | tar xvf -

$ ./configure --prefix=PREFIX [...]

$ make

$ make install

NOTE: PREFIX is not the string "PREFIX". Instead use the Unix

filesystem path under which Apache should be installed. For

instance use "/usr/local/apache" for PREFIX above.

After these steps Apache 1.3 is completely installed under PREFIX and

already initially configured, so you can immediately fire it up the first

time via

$ PREFIX/sbin/apachectl start

to get your first success event with the Apache HTTP server without having

to fiddle around with various options for a long time. On the other hand

APACI provides a lot of options to adjust the build and installation process

for flexibly customizing your Apache installation. So, APACI provides both:

Out-of-the-box building and installation for the impatient and powerful

custom configuration for the experts.

Detailed Description

====================

For a detailed description of all available APACI options please read the

file INSTALL or at least run the command

$ ./configure --help

for a compact one-page summary of the possibilities you have.

Alternatively, you can start from the following examples.

Examples

========

In the following typical or even interesting variants of the available

configuration steps are shown to give you an impression what APACI is good

for and what APACI can do for you to be able to install Apache without much

pain.

Standard installation

---------------------

The standard installation is done via

$ ./configure --prefix=/path/to/apache

$ make

$ make install

This builds Apache 1.3 with the standard set of enabled modules

(automatically determined from src/Configuration.tmpl) with an Apache 1.2

conforming subdirectory layout under /path/to/apache. For using the GNU

style subdirectory layout additionally use the --with-layout=GNU option:

$ ./configure --with-layout=GNU --prefix=/path/to/apache

$ make

$ make install

If you are not sure which directory layout you want, you can use the

--show-layout option. It displays the directory layout which would be used

but immediately exits without configuring anything. Examples:

$ ./configure --show-layout

$ ./configure --prefix=/path/to/apache --show-layout

$ ./configure --with-layout=GNU --prefix=/path/to/apache --show-layout

Additionally if some of the shown paths still don't fit for your particular

situation, you can use the --bindir, --sbindir, --libexecdir, --mandir,

--sysconfdir, --datadir, --localstatedir, --runtimedir, --logfiledir and

--proxycachedir options to adjust the layout as required. Always check with

--show-layout the resulting directory layout which would be used for

installation.

suEXEC support

--------------

The suEXEC feature of Apache provides a mechanism to run CGI and SSI

programs under the user and group id of the owner of the program. It is

neither installed nor configured per default for Apache 1.3, but APACI

supports it with additional options:

$ ./configure --prefix=/path/to/apache \

--enable-suexec \

--suexec-caller=www \

--suexec-userdir=.www \

--suexec-docroot=/path/to/root/dir \

--suexec-logfile=/path/to/logdir/suexec_log \

--suexec-uidmin=1000 \

--suexec-gidmin=1000 \

--suexec-safepath="/bin:/usr/bin"

$ make

$ make install

This automatically builds and installs Apache 1.3 with suEXEC support for

the caller uid "www" and the user's homedir subdirs ".www". The default

paths for --suexec-docroot is the value from the --datadir option with

the suffix "/htdocs" and the --logfiledir value with the suffix

"/suexec_log" for the --suexec-logfile option. The access paths for the

suexec program are automatically adjusted and the suexec program is

installed, so Apache can find it on startup.

Building multiple platforms in parallel

---------------------------------------

When you want to compile Apache for multiple platforms in parallel it is

useful to share the source tree (usually via NFS, AFS or DFS) but build the

object files in separated subtrees. This can be accomplished by letting

APACI create a source shadow tree and build there:

$ ./configure --shadow --prefix=/path/to/apache

$ make

$ make install

Then APACI first determines the GNU platform triple, creates a shadow tree

in src.<gnu-triple> plus corresponding Makefile.<gnu-triple> and then

performs the complete build process inside this shadow tree.

Dynamic Shared Object (DSO) support

-----------------------------------

Apache 1.3 supports building modules as shared objects on all major Unix

platforms (see section "Supported Platforms" in document

htdocs/manual/dso.html for details). APACI has a nice way of enabling the

building of DSO-based modules and automatically installing them:

$ ./configure --prefix=/path/to/apache \

--enable-module=rewrite \

--enable-shared=rewrite

$ make

$ make install

This builds and installs Apache with the default configuration except that

it adds the mod_rewrite module and automatically builds and installs it as a

DSO, so it is optionally available for loading under runtime. To make your

life even more easy APACI additionally inserts a corresponding `LoadModule'

line into the httpd.conf file in the installation phase.

APACI also supports a variant of the --enable-shared option:

$ ./configure --prefix=/path/to/apache \

--enable-shared=max

$ make

$ make install

This enables shared object building for the maximum of modules, i.e. all

enabled modules (--enable-module or the default set) except for mod_so

itself (the bootstrapping module for DSO support). So, to build a

full-powered Apache with maximum flexibility by building and installing most

of the modules, you can use:

$ ./configure --prefix=/path/to/apache \

--enable-module=most \

--enable-shared=max

$ make

$ make install

This first enables most of the modules (all modules except some problematic

ones like mod_auth_db which needs third party libraries not available on

every platform or mod_log_agent and mod_log_referer which are deprecated)

and then enables DSO support for all of them. This way you get all these

modules installed and you then can decide under runtime (via the

`LoadModule') directives which ones are actually used. This is especially

useful for vendor package maintainers to provide a flexible Apache package.

On-the-fly added additional/private module

------------------------------------------

For Apache there are a lot of modules flying around on the net which solve

particular problems. For a good reference see the Apache Module Registory at

http://modules.apache.org/ and the Apache Group's contribution directory at

http://www.apache.org/dist/contrib/modules/. These modules usually come in a

file named mod_foo.c. APACI supports adding these sources on-the-fly to the

build process:

$ ./configure --prefix=/path/to/apache \

--add-module=/path/to/mod_foo.c

$ make

$ make install

This automatically copies mod_foo.c to src/modules/extra/, activates it in

the configuration and builds Apache with it. A very useful way is to combine

this with the DSO support:

$ ./configure --prefix=/path/to/apache \

--add-module=/path/to/mod_foo.c \

--enable-shared=foo

$ make

$ make install

This builds and installs Apache with the default set of modules, but

additionally builds mod_foo as a DSO and adds a `LoadModule' line to the

httpd.conf file to activate it for loading under runtime.

Apache and mod_perl

-------------------

The Apache/Perl integration project (http://perl.apache.org/) from Doug

MacEachern <dougm@perl.apache.org> is a very powerful approach to integrate

a Perl 5 interpreter into the Apache HTTP server both for running Perl

programs and for programming Apache modules in Perl. The distribution

mod_perl-1.XX.tar.gz can be found on http://perl.apache.org/src/. Here is

how you can build and install Apache with mod_perl:

$ gunzip <apache_1.3.X.tar.gz | tar xvf -

$ gunzip <mod_perl-1.XX.tar.gz | tar xvf -

$ cd mod_perl-1.XX

$ perl Makefile.PL APACHE_SRC=../apache_1.3.X/src \

DO_HTTPD=1 USE_APACI=1 \

[EVERYTHING=1 ...]

$ make

$ make install

[optionally you now have the chance to prepare or add more

third-party modules to the Apache source tree]

$ cd ../apache_1.3.X

$ ./configure --prefix=/path/to/apache \

--activate-module=src/modules/perl/libperl.a \

[--enable-shared=perl]

$ make

$ make install

Apache and PHP

--------------

The PHP language (http://www.php.net) is an HTML-embedded scripting language

which can be directly integrated into the Apache HTTP server for powerful HTML

scripting. The package can be found at http://www.php.net/downloads.php

1. How you can install Apache with a statically linked PHP:

$ gunzip <apache_1.3.X.tar.gz | tar xvf -

$ gunzip <php-3.0.tar.gz | tar xvf -

$ cd apache_1.3.X

$ ./configure --prefix=/path/to/apache

$ cd ../php-3.0

$ ./configure --with-apache=../apache_1.3.X

$ make

$ make install

[optionally you now have the chance to prepare or add more

third-party modules to the Apache source tree]

$ cd ../apache_1.3.X

$ ./configure --prefix=/path/to/apache \

--activate-module=src/modules/php3/libphp3.a

$ make

$ make install

2. You can also use APXS:

$ cd apache-1.3.X

$ ./configure --prefix=/path/to/apache --enable-shared=max

$ make

$ make install

$ cd php-3.0.X

$ ./configure --with-apxs=/path/to/apache/bin/apxs \

--with-config-file-path=/path/to/apache

$ make

$ make install

At this point don't forget to edit your conf/httpd.conf file and

make sure the file contains the line for PHP 3:

AddType application/x-httpd-php3 .php3

Or this line for PHP 4:

AddType application/x-httpd-php .php

Then restart your server.

分享到:
评论

相关推荐

    Arm板Apache+PHP环境搭建

    apr是Apache Portable Runtime的缩写,是一个Apache可移植运行库。编译apr需要执行以下步骤: 1. 解压apr-1.4.6.tar.gz文件 2. 进入apr-1.4.6目录,执行configure命令 3. 执行make命令 4. 执行make install命令 四...

    apache2.4编译安装包带mod_jk.so

    - 配置编译选项,使其指向Apache 2.4的安装位置,例如:`./configure --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config --...

    how configure php-fpm 5.x and apache 2.4.x for virtualmin on centos 6

    ./configure --prefix=/opt/apache2 --with-mpm=prefork --enable-rewrite --enable-ssl --enable-proxy-fcgi --with-included-apr make sudo make install ``` #### 三、配置Apache 2.4.x 1. **创建初始化...

    Apache Directory Server使用指南

    ApacheDS 的可嵌入性使得它可以被其他 Java 组件 configure、start 和 stop,例如应用服务器。该服务器可以在同一个虚拟机(VM)中运行。这使得 ApacheDS 可以轻松地集成到其他应用程序中。 可扩展性 ApacheDS 的...

    apache2源代码编译所需软件

    ./configure --prefix=/usr/local/apache2 --with-pcre=/usr/local/pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util ``` 配置完成后,进行编译和安装: ```bash make sudo make install ``` ...

    Apache-2.4.2交叉编译

    - 返回Apache目录,重新执行`./configure`,这次需要指定APR的安装路径,如:`./configure --with-apr=/usr/local/apr`。 4. **安装apr-util**: - 同样下载apr-util源码包并解压。 - 配置编译环境时需要指定APR...

    apache(httpd)源码

    在本文中,我们将深入探讨Apache的源码,以及如何在32位ARM架构,特别是Zynq7020平台上,使用特定的编译器进行编译,以处理超过4GB的大文件。 1. **Apache源码**:Apache的源码由C语言编写,包含了服务器的核心功能...

    linux下搭建Apache服务说明

    本文档主要介绍了 Linux 下搭建 Apache 服务器的一些操作说明,包括挂载光盘、安装 Apache 软件包、configure 和 make 命令、安装和启动 Apache 服务器、配置 Apache 服务器、启动和重启 Apache 服务器、查看 Apache...

    Apache&weblogic;安装及配置反向代理转发

    在 configure 命令中,我们指定了 Apache 服务器的安装目录为 /usr/local/apache。 二、 Weblogic 安装 接下来,我们需要安装 Weblogic 服务器。首先,需要安装 JDK 1.6.0_27。下载 jdk-6u17-linux-x64-rpm.bin ...

    Apache+php+mysql在windows下的安装与配置图解(最新版)

    配置 Apache 服务器需要编辑 Apache 的配置文件,可以通过“开始”、“所有程序”、“Apache HTTP Server 2.0.55”、“Configure Apache Server”、“Edit the Apache httpd conf Configuration file”打开配置文件...

    mysql+apache+php

    在Linux系统中,集成安装MySQL、Apache和PHP是构建一个LAMP(Linux、Apache、MySQL、PHP)服务器的基础。这个过程涉及到三个主要组件的下载、安装、配置以及它们之间的集成。 首先,我们来详细讲解MySQL的安装配置...

    apache 2.4.9

    4. 配置编译选项:`./configure --prefix=/usr/local/apache2` 5. 编译源代码:`make` 6. 安装到指定位置:`sudo make install` 在安装完成后,需要配置Apache的启动脚本和服务,以使其能在系统启动时自动运行,...

    Apache2.2.15安装及配置过程

    ./configure --prefix=/usr/local/web/apache \ --enable-proxy=shared \ --enable-ssl=shared \ --enable-mpm=worker \ --enable-so ``` 配置完成后,使用`make`和`make install`命令来编译和安装Apache。这将...

    linux下安装apache

    ./configure --prefix=/usr/local/apache --enable-so --enable-rewrite --enable-mods-shared=most --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ make make ...

    apache安装与配置文档

    ./configure --prefix=/home/zyb/apache2.2.20 该命令将 Apache 安装到指定的目录下。屏幕将显示安装配置信息。 三、Apache 编译 在配置完成后,需要执行编译命令: make 该命令将编译 Apache 服务器。屏幕将...

    linux离线安装apache

    ./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd --enable-so --enable-rewrite --enable-ssl --enable-cgi --enable-cgid --enable-modules=most --enable-mods-shared=most --enable-mpms-shared...

    Linux下安装APACHE

    Linux 下安装 APACHE Linux 作为一个开源的操作系统,广泛应用于服务器端,APACHE 是一个流行的 Web 服务器软件,而安装 APACHE 在 Linux 下则需要遵循特定的步骤,以避免安装过程中的错误。 下载必要的文件 在...

    apache安装依赖pcre2

    在安装Apache时,确保正确安装并配置PCRE2是至关重要的步骤。 首先,我们来了解一下PCRE2。PCRE2是一个库,提供了Perl风格的正则表达式功能,支持Unicode字符集和多种匹配模式。在Apache中,PCRE2被用作解析和执行....

    redhat6.6升级apache2.4.43升级相关包

    然后,配置Apache源码,通常使用`./configure --prefix=/usr/local/apache2 --enable-so`命令。接下来,编译源码(`make`),最后执行`make install`来安装新版本。 5. **配置文件的迁移**:Apache 2.4.x的配置文件...

Global site tag (gtag.js) - Google Analytics