미들웨어/Web Server

[Apache] Apache 설치 (httpd-2.2.31)

_주야 2017. 3. 15. 11:32

 

 

Apache 설치 (httpd-2.2.31)

 

1. 파일 다운로드

http://httpd.apache.org/

 

2. 설치 및 구성 전 필요 모듈 설치

$ yum install gcc gcc-c++ openssl-devel

 

3. 컴파일 및 설치

$ tar -xvzf httpd-2.2.31.tar.gz

$ cd httpd-2.2.31

$ ./configure -C --enable-module=so --enable-rule=SHARED_CORE --enable-rewrite --enable-ssl=shared --enable-so --enable-ssl --enable-mods-shared=ssl --prefix=/apache/apache

$ make && make install

 

4. 설치 확인 및 기동/정지

$ cd /apache/apache/bin

$ ./httpd -V
Server version: Apache/2.2.31 (Unix)
Server built:   Mar 15 2017 11:23:58
Server's Module Magic Number: 20051115:40
Server loaded:  APR 1.5.2, APR-Util 1.5.4
Compiled using: APR 1.5.2, APR-Util 1.5.4
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/apache/apache"
 -D SUEXEC_BIN="/apache/apache/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

 

$ ./apachectl start
$ ps -ef | grep httpd
root         25242     1    0 11:27 ?        00:00:00 /apache/apache/bin/httpd -k start
daemon   25243 25242  0 11:27 ?        00:00:00 /apache/apache/bin/httpd -k start
daemon   25244 25242  0 11:27 ?        00:00:00 /apache/apache/bin/httpd -k start
daemon   25245 25242  0 11:27 ?        00:00:00 /apache/apache/bin/httpd -k start
daemon   25246 25242  0 11:27 ?        00:00:00 /apache/apache/bin/httpd -k start
daemon   25247 25242  0 11:27 ?        00:00:00 /apache/apache/bin/httpd -k start

$ ./apachectl stop
$ ps -ef | grep httpd