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 vmware with centos 7 secret 2019.08.23 0
80 php-fpm tcp to socket secret 2020.01.25 0
79 net::ERR_CONNECTION_REFUSED secret 2021.10.11 0
78 my.cnf secret 2019.04.11 1
77 To download large files with rsync command. 2023.05.04 21
76 The best configuration of php7.4-fpm / 1.5GB 2023.05.04 23
75 The best configuration of php7.4-fpm / 8GB 2023.05.04 23
74 windows hardware encrypt ssd 2024.01.23 206
73 gearman 은 무엇인가? 2023.06.21 270
72 apache2 AllowOverride config 2023.05.23 278
71 php 에서 비동기 처리하는 방법 2023.06.22 288
70 mysqldump from remote db to my local server. 2023.05.04 421
69 yum install php 7.1 [6] 2018.10.10 687
68 mysql 백업 (shell script) file 2018.10.14 697
67 munin 설치 2018.10.13 787
66 yum install mariadb [2] 2018.10.10 1143
65 웹 백업 (쉘 스크립트) file 2018.10.14 1193
64 certbot apache multiple domain 2019.04.10 1416
63 yum install php-apcu 2019.03.12 1542
62 yum install latest redis file 2019.03.27 1682