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

기타..

번호 제목 날짜 조회 수
21 유닉스 계정 관리 2013.10.15 14650
20 PHP 설치 file 2010.05.11 15057
19 솔라리스 mount options 2013.10.06 15323
18 ftp file 2010.07.23 15443
17 리눅스 자동 시작 file 2010.05.21 15895
16 ssh 로그인 제한 2011.04.05 16470
» Apache 설치 file 2010.05.11 16658
14 CentOS 6.2 다운로드 / 설치 [1] file 2012.04.15 17029
13 MySQL 설치 file 2010.05.11 17280
12 Zend Optimizer + eAccelerator + Suhosin file 2010.05.11 18249
11 Linux 설치시 파티션 관리 file 2012.05.12 19206
10 php + ssh2 file 2010.06.05 20199
9 sAPM file 2010.05.12 20261
8 Lighttpd 설치 file 2010.05.11 20679
7 CentOS 6 - MySQL 5.5 설치 [1] file 2012.04.15 21725
6 Linux Memory 사용량 file 2012.05.16 25005
5 리눅스 계정 생성/변경 [67] 2011.04.02 29129
4 CentOS 6 - Apache 2.4.1 컴파일 / 보안 설정 [1] 2012.04.15 30240
3 마인크래프트 조합법 1 file 2011.04.01 38374
2 VPS (가상 호스팅) 비교 file 2010.05.12 62201