`
wind9984
  • 浏览: 46753 次
  • 性别: 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.

分享到:
评论

相关推荐

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

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

    工作:这是我的AI工作所在的存储库

    工作 这是我的AI工作所在的存储库。 环境构筑(Mac) # brew install ...# Apache configure which httpd which apachectl sudo vi /etc/apache2/httpd.conf ## DocumentRootをProject Pathに変更 Docum

    apache-lenya-configure-impl-1.4-dev-r414579.jar

    jar包,亲测可用

    Apache HTTP Server Version 2.2 文档(2013.4.10最新)

    configure - 配置源代码树 dbmmanage - 管理DBM格式的用户认证文件 htcacheclean - 清理磁盘缓冲区 htdbm - 操作DBM密码数据库 htdigest - 管理用于摘要认证的用户文件 htpasswd - 管理用于基本认证的用户文件 httpd...

    Learning Apache Karaf

    Learning Apache Karaf teaches you everything you need to install, configure, and administer Apache Karaf. Learning Apache Karaf will help guide you through the complexity of an OSGi container using ...

    Apache Spark 2.x Cookbook

    Install and configure Apache Spark with various cluster managers & on AWS Set up a development environment for Apache Spark including Databricks Cloud notebook Find out how to operate on data in Spark...

    apache 2.2.21 -win32-x86

    这里我们还是要配置一下,有什么问题或修改,配置始终是要会的,如图所示,“开始”、“所有程序”、“Apache HTTP Server 2.0.55”、“Configure Apache Server”、“Edit the Apache httpd conf Configuration ...

    apache反向代理

    #./configure --prefix=/usr/local/apache --enable-module=most --enable-shared=max --enable-module=proxy --enable-shared=proxy --enable-module=rewrite --enable-shared=rewrite 设置安装默认目录 ...

    apache2.4完整安装

    apache2.4完整安装,解决configure: error: APR-util not found. Please read the documentation问题

    24小时教会PHP, MySQL and Apache(英文)

    The book teaches the reader to install, configure and set up the PHP scripting language, the MySQL database system, and the Apache Web server. By the end of this book the reader will understand how ...

    [Apache Flume] Apache Flume 分布式日志采集应用 (Hadoop 实现) (英文版)

    Configure failover paths and load-balancing to remove single points of failure Utilize Gzip Compression for files written to HDFS ☆ 出版信息:☆ [作者信息] Steve Hoffman [出版机构] Packt ...

    Apache Spark 2.x for Java Developers

    The book starts with an introduction to the Apache Spark 2.x ecosystem, followed by explaining how to install and configure Spark, and refreshes the Java concepts that will be useful to you when ...

    apache-lenya-configure-core-1.4-dev-r414579.jar

    jar包,亲测可用

    Packt.Mastering.Apache.Cassandra.3rd.Edition

    Build, manage, and configure high-performing, reliable NoSQL database for your applications with Cassandra ...Integrate Cassandra database with Apache Spark and build strong data analytics pipeline

    linux环境下安装apache2.4,附安装步骤说明

    在linux(redhat7.5版本)下安装apache2.4.33版本,说明文档详细描述了安装过程及操作命名与./configure参数

    apache 安装包(Linux全)

    版本: apr-1.6.3 apr-util-1.6.1 httpd-2.4.33 pcre-8.40 安装命令: tar ./configure make make install

    Apache Solr High Performance

    By the end of the book you will also learn how to set up, configure, and deploy ZooKeeper along with learning more about other applications of ZooKeeper. You will also learn how to handle data in ...

    apache-mesos-cookbook

    Set up Mesos on different ...Configure Mesos for high availability using Zookeeper Secure your Mesos clusters with SASL and Authorization ACLs Solve everyday problems and discover the best practices

    Apache Tomcat 7

    Efficiently configure Tomcat 7 with Apache Web server Configure data sources and mail sessions using JNDI in Tomcat Configure logging for web applications deployed on Tomcat server Who this book ...

    PHP编译configure时常见错误的总结

    其实不管是你是Apache类的应用还是Nginx类的,PHP的安装都不是很简单,虽然网上有很多configure参数,但是那不一定是适合你的,因为很多都直接关系着你的系统版本和内核。因此要自己亲自不断的调试,才能完全安装...

Global site tag (gtag.js) - Google Analytics