리눅스로 아파치 HTTP 서버를 컴파일하고 인스톨하는 과정
개략 과정
다운로드 | $ lynx http://httpd.apache.org/download.cgi
|
추출 | $ gzip -d httpd-NN.tar.gz |
구성 설정 |
$ ./configure --prefix=PREFIX
|
컴파일 | $ make |
Install | $ make install |
Customize | $ vi PREFIX/conf/httpd.conf |
Test | $ PREFIX/bin/apachectl -k start
|
NN : 현재 버전 번호
PREFIX : 서버가 설치되는 파일 시스템 경로. 적지 않으면 기본값으로 '/usr/local/apache2'를 가진다
요구사항
아래 요구 사항은 Apache httpd를 설치하는데 필요하다 :
- APR and APR-Util
- Make sure you have APR and APR-Util already installed on
your system. If you don't, or prefer to not use the system-provided
versions, download the latest versions of both APR and APR-Util
from Apache APR, unpack
them into
/httpd_source_tree_root/srclib/apr
and/httpd_source_tree_root/srclib/apr-util
(be sure the directory names do not have version numbers; for example, the APR distribution must be under /httpd_source_tree_root/srclib/apr/) and use./configure
's--with-included-apr
option. On some platforms, you may have to install the corresponding-dev
packages to allow httpd to build against your installed copy of APR and APR-Util. - Perl-Compatible Regular Expressions Library (PCRE)
- This library is required but not longer bundled with httpd.
Download the source code from http://www.pcre.org,
or install a Port or Package. If your build system can't find
the pcre-config script installed by the PCRE build, point to it
using the
--with-pcre
parameter. On some platforms, you may have to install the corresponding-dev
package to allow httpd to build against your installed copy of PCRE. - Disk Space
- Make sure you have at least 50 MB of temporary free disk space available. After installation the server occupies approximately 10 MB of disk space. The actual disk space requirements will vary considerably based on your chosen configuration options, any third-party modules, and, of course, the size of the web site or sites that you have on the server.
- ANSI-C Compiler and Build System
- Make sure you have an ANSI-C compiler installed. The GNU C
compiler (GCC) from the Free Software Foundation (FSF)
is recommended. If you don't have GCC
then at least make sure your vendor's compiler is ANSI
compliant. In addition, your
PATH
must contain basic build tools such asmake
. - Accurate time keeping
- Elements of the HTTP protocol are expressed as the time of
day. So, it's time to investigate setting some time
synchronization facility on your system. Usually the
ntpdate
orxntpd
programs are used for this purpose which are based on the Network Time Protocol (NTP). See the NTP homepage for more details about NTP software and public time servers. - Perl 5 [OPTIONAL]
- For some of the support scripts like
apxs
ordbmmanage
(which are written in Perl) the Perl 5 interpreter is required (versions 5.003 or newer are sufficient). If no Perl 5 interpreter is found by theconfigure
script, you will not be able to use the affected support scripts. Of course, you will still be able to build and use Apache httpd.
참고 사이트
http://httpd.apache.org/docs/2.4/install.html