server Apache 설치

2010.05.11 16:50

Elkha 조회 수:16658

참고 문서  

apache.gif

이 게시물은 리눅스 서버 구축의 포스팅을 따라하면서 막힌 부분을 수정한 것입니다.
저는 이 분야에 관한 지식이 깊지 않으며, 정확하지 않은 내용이 있을 수도 있습니다.

Apache 다운로드

Apache를 다운로드 받습니다.
저는 원문을 따라서 2.2.14 버전으로 설치했었습니다.
XE 설치를 위해 gcc 라이브러리도 설치해줍니다.

# yum install gcc libtool
# tar xvfz httpd-2.2.14.tar.gz
# mv httpd-2.2.14 /root/httpd
# cd /root/httpd

Apache 설치

Apache를 설치합니다. --with-mpm=worker 명령어는 서버 성능을 향상시켜주지만, 많은 메모리를 차지하기 때문에 서버사양이 제한적이라면 빼는게 좋습니다.
제가 사용했던 서버는 mpm=worker 옵션을 달고 평소 1G 메모리를 차지하더군요.
mpm=worker 옵션을 달지 않아도 Zend Optimizer, eAccelerator 설치하면 XE 구동시에 만족할만한 속도를 보였었습니다.

# ./configure --prefix=/usr/local/apache --enable-so --enable-modules=so --with-mpm=worker --enable-rewrite
# make && make install

Apache 설정

Apache를 사용하는데 유용한 설정입니다.

# vi /usr/local/apache/conf/httpd.conf

<Directory "/usr/local/apache/htdocs">
AllowOverride FileInfo # XE에서 rewrite mod 사용할 때 필요
</Directory>
Options FollowSymLinks # Options Indexes FollowSymLinks
CustomLog "logs/access_log" commo 로그 생성안함 (예전 서버는 로그파일이 1G 쌓였던가 -_-)

VPS(가상호스팅) 사용자는 rpaf_module 모듈을 설치해서 아이피가 정상적으로 찍히도록 합니다.

# wget http://stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz
# tar xvfz mod_rpaf-0.6.tar.gz
# cd mod_rpaf-0.6
# apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c
# vi /usr/local/apache/conf/httpd.conf

LoadModule rpaf_module /usr/lib/httpd/modules/mod_rpaf-2.0.so
RPAFenable On
RPAFsethostname On
RPAFproxy_ips 61.251.165.104
RPAFheader X-Forwarded-For

기타..

번호 제목 날짜 조회 수
81 검색엔진 등록 file 2010.05.12 142341
80 VPS (가상 호스팅) 비교 file 2010.05.12 62201
79 마인크래프트 조합법 1 file 2011.04.01 38372
78 CentOS 6 - Apache 2.4.1 컴파일 / 보안 설정 [1] 2012.04.15 30240
77 리눅스 계정 생성/변경 [67] 2011.04.02 29128
76 Linux Memory 사용량 file 2012.05.16 24984
75 CentOS 6 - MySQL 5.5 설치 [1] file 2012.04.15 21720
74 Lighttpd 설치 file 2010.05.11 20679
73 sAPM file 2010.05.12 20261
72 php + ssh2 file 2010.06.05 20199
71 Linux 설치시 파티션 관리 file 2012.05.12 19206
70 Zend Optimizer + eAccelerator + Suhosin file 2010.05.11 18249
69 MySQL 설치 file 2010.05.11 17280
68 CentOS 6.2 다운로드 / 설치 [1] file 2012.04.15 17029
» Apache 설치 file 2010.05.11 16658
66 ssh 로그인 제한 2011.04.05 16470
65 리눅스 자동 시작 file 2010.05.21 15895
64 ftp file 2010.07.23 15443
63 솔라리스 mount options 2013.10.06 15323
62 PHP 설치 file 2010.05.11 15057