Apache HTTP Server �汾2.2
���Ľ�����Apache��Unix����Unixϵͳ�еı���Ͱ�װ����Windows�еı���Ͱ�װ���Բο���Microsoft Windows��ʹ��Apache������ƽ̨���Բμ�����ض�ƽ̨��˵���ĵ���
��������Դ��Ŀһ����Apacheʹ��libtool
��autoconf
�������뻷����
�����ֻ���к�С�İ汾����(����2.2.54��2.2.55)����ֱ����ת��������������֡�
���� | $ lynx http://httpd.apache.org/download.cgi
|
��ѹ | $ gzip -d httpd-NN.tar.gz |
���� | $ ./configure --prefix=PREFIX
|
���� | $ make |
��װ | $ make install |
���� | $ vi PREFIX/conf/httpd.conf |
���� | $ PREFIX/bin/apachectl -k start
|
����NN�����õ�ǰ�ĸ��汾�������PREFIX�Ƿ���������װ���ļ�ϵͳ�е�·���������û��ָ��PREFIX��Ĭ�ϻ�װ��/usr/local/apache2
����ӱ���Ͱ�װApache httpd��Ҫ��ʼ��ϸ��������Ͱ�װ��ÿ�����衣
����Apache��Ҫ�����£�
PATH
�б������ָ��������빤�߱���make
��·����ntpdate
��xntpd
��ͬ��ʱ�䡣�й�NTP�����������μ�NTP��ҳ��apxs
��dbmmanage
����ҪPerl5������(5.003�����ϵİ汾���㹻��)�����ϵͳ�д��ڶ��Perl��������������ϵͳ�ṩ��Perl 4���������Լ���װ��Perl 5���Ƽ���ʹ�� --with-perl
ѡ����ȷ��configure
�ű�ʹ����ȷ�İ汾�����configure
û��û�ҵ�Perl 5Ҳû��ϵ���Ⲣ��Ӱ��Apache httpd�ı���Ͱ�װ��ֻ����ص�֧�ֽű�����ʹ�ö��ѡ�apr
��apr-util
������Apache httpd�ķ���Դ�����У������ھ�����������ʹ�ö�����������⡣��Ȼ�����apr
��apr-util
��1.0��1.1�汾�Ѿ���װ�����ϵͳ���ˣ�����뽫���apr
/apr-util
������1.2�汾�����߽�httpd�����ֿ����롣Ҫʹ�÷���Դ�������Դ���apr
/apr-util
Դ������а�װ��������ֶ���ɣ�
# ����Ͱ�װ apr 1.2
cd srclib/apr
./configure --prefix=/usr/local/apr-httpd/
make
make install
# ����Ͱ�װ apr-util 1.2
cd ../apr-util
./configure --prefix=/usr/local/apr-util-httpd/ --with-apr=/usr/local/apr-httpd/
make
make install
# ���� httpd
cd ../../
./configure --with-apr=/usr/local/apr-httpd/ --with-apr-util=/usr/local/apr-util-httpd/
Apache���Դ�Apache HTTP����������վ�����侵��վ�����ء��������UNIXϵͳ��Apache�û���õ�ѡ��������Դ���벢����һ���ʺ��Լ��İ汾���������(���潫Ҫ����)�Ǻܼģ�������������Լ���������ж��ơ���һ�������õĶ����ư汾ͨ��û�н��м�ʱ�ĸ��¡���������ص��DZ���õĶ����ư汾���밴�����е�INSTALL.bindist
�ļ����а�װ��
������Ϻ�Ӧ�ö���������tar����PGPǩ��У������ȷ������������δ���۸Ĺ���(PGP����ҳ��)
��ѹApache httpd��tar���ܼ�
$ gzip -d httpd-NN.tar.gz
$ tar xvf httpd-NN.tar
�������ڵ�ǰĿ¼���½���һ���������а�Դ�����Ŀ¼������cd
�������Ŀ¼�Լ����������ı��롣
��һ���Ǹ�������ض�ƽ̨������������Դ��������λ�ڷ���Դ�����Ŀ¼��configure
�ű�������������(������Apache CVS��Դ����Ŀ����ߣ���Ҫװ��autoconf
��libtool
������Ҫִ��buildconf
�����ڹٷ��ķ��а���û�����Ҫ)��
Ҫ�������е�Ĭ��ֵ����Դ������ֻҪ��ִ�� ./configure
����Ϳ����ˣ�ͬʱconfigure
�����Խ��������в����Ըı�Ĭ��ֵ��
����Ҫ��ѡ����Apache��װĿ¼��ǰ��--prefix
����ΪApache��Ҫ֪�����Ŀ¼���������������������ѡ����ο�����ѡ�������
��������Ϳ���ͨ��������ѡ����ָ��Ҫ���û������Щģ��������Apache��������Base���ģ��Ĭ�ϰ�����Apache�С��������ģ�����ͨ�� --enable-module
ָ�����á�����module��ģ����ȥ��"mod_
"�����»���ת�������ַ�����ַ�������Ҳ����ʹ�� --enable-module=shared
ָ�ģ�����Ϊ��������ʱ���غ�ж�ص���̬�������(DSO)��ͬ���ģ���Ҳ����ʹ�� --disable-module
ָ�����Base���ģ�顣ע�⣬ʹ����Щָ���ʱ��configure
�������ƴд�����ģ�鷢������˵�Ҳ���ijijģ�飬��ֻ�Ǽĺ������ѡ�
���⣬��ʱ�����ṩ��configure
�ű����ڱ��������⡢ͷ�ļ�λ�õĸ�����Ϣ����Щ����ͨ��������������������ѡ��ݸ�configure
�ű���Ҫ�˽������Ϣ����ο�����Դ������
��
Ϊ���������ָ��ʲô��һ����ӡ������ʾ����Apache �������䰲װ��/sw/pkg/apache
Ŀ¼��ָ����һ���ض��ı������Լ���������������������������ӵ�ģ��mod_rewrite
��mod_speling
ͨ��DSO����������ʱ��̬���أ�
$ CC="pgcc" CFLAGS="-O2" \
./configure --prefix=/sw/pkg/apache \
--enable-rewrite=shared \
--enable-speling=shared
configure
��Ҫ���м����ӣ��Բ���ָ���Ĺ��������ϵͳ���Ƿ���Ч���������Ժ����ʱ��������Makefile�ļ���
��������������Ϳ��Ա���Apache�ĸ��������ˣ�
$ make
�����ĵȺ���Ϊ��һ���������õı��룬��Ҫ���м��������ң�ʵ����Ҫ��ʱ�����Ϊ���Ӳ����ѡ���ģ�������кܴ�ͬ��
���ڿ�����PREFIXĿ¼(�μ������� --prefix
����)�°�װ�ˣ�ִ�У�
$ make install
�������������װ���Ḳ����������ļ����ĵ���
���ţ�ͨ����PREFIX/conf/
Ŀ¼�µ������ļ���������Apache HTTP��������
$ vi PREFIX/conf/httpd.conf
docs/manual/����Apacheʹ���ֲᣬhttp://httpd.apache.org/docs/2.2/�����µ��ĵ����㻹���Բ鿴������ָ��������
���ڣ�����ִ���������������������Apache HTTP��������
$ PREFIX/bin/apachectl -k start
��Ӧ�ÿ�����http://localhost/
��������ĵ�һ����ҳ�ˣ������ҳλ��DocumentRoot
Ŀ¼�£�ͨ����PREFIX/htdocs/
�����������ֹͣ��������
$ PREFIX/bin/apachectl -k stop
�����ĵ�һ�����Ķ�Դ����Ŀ¼�еķ�������(release announcement)��CHANGES
�ļ���Ѱ�ҿ��ܻ�����վ�����Ӱ��ı仯��������屾�ŵı仯(����1.3��2.0��2.0��2.2)��������ʱ������ʱ�����÷������ش�仯����Ҫ�ֶ�����������ģ��Ҳ��Ҫ�����Լ����°汾��ģ��API ��
С���ȵİ汾����(���磺2.2.55��2.2.57)�����ס�make install
�Ĺ��̲����д�κ��Ѿ����ڵ��ĵ�����־�������ļ������⣬������Ҳ�ᾡ��������һ�汾��configure
ѡ�����ʱ���á�ģ��API �����������£��㽫�ܹ�ʹ������һ�汾��ȫ��ͬ��configure
�����к�����ʱ���ã�����ԭ��������ģ��Ҳ������������
����㱣������һ�ΰ�װ��build
��Ŀ¼�е�config.nice
�ļ�������������ƽ��������ļ���ȷ�ر��������ж�Ŀ¼���������õ�configure
�����С���ֻ��Ҫ��config.nice
�ļ����Ƶ��µ�Դ����Ŀ¼���ĸ��ļ��в�������ϣ�����ĺ�Ȼ�������������������������
$ ./config.nice
$ make
$ make install
$ PREFIX/bin/apachectl -k graceful-stop
$ PREFIX/bin/apachectl -k start
--prefix
���ý��°汾��װ��һ����ͬ��Ŀ¼����ʹ��Listen
ָ����һ����ͬ�Ķ˿ڼ���������һ��ʱ��IJ����Է��ֿ��ܴ��ڵ����⣬Ȼ�����������ľ�����