2011. 4. 18. 11:06

[CENT OS 5.5] Apache 설치( httpd )


다운로드

http://httpd.apache.org/download.cgi

관련 패키지 설치

yum -y install gcc gcc-c++ ncurses-devel openssl-devel gd gd-devel libxml2-devel bzip2 bzip2-devel


다운로드한 파일 압축 해제

$ gzip -d httpd-2_1_NN.tar.gz
$ tar xvf httpd-2_1_NN.tar

메이크 파일 생성

./configure --prefix=/usr/local/apache2 --enable-so --enable-module=so --enable-shared=max --enable-module=rewrite --enable-shared=rewrite
(시간 걸림)

메이크 및 설치
make clean
make && make install  (root계정 실행)

자동 시작 설정

서비스 스크립트 복사
cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/apachectl


아파치 구동확인

ps -aux | grep httpd

아파치 기본 문서 폴더

cd /var/www/html/

/etc/httpd/conf/httpd.conf 

DocumentRoot "/var/www/html"  <<--수정



기타명령어

service httpd restart (재시작)
#apachectl -k graceful  (재시작하지 않고 설정적용)
httpd -v (아파치 버전확인)
rpm -e httpd --nodeps   (의존성 제거후 제거)


====================================
yum 설치 방법

아파치 설치
# yum -y install httpd

// Apache를 서비스에 등록 시켜 줍니다.
# chkconfig --levels 235 httpd on

등록 확인

# chkconfig --list httpd

httpd           0:해제 1:해제 2:활성 3:활성 4:해제 5:활성 6:해제

2.3.5 활성이면 완료
====================================





참조 링크 :
http://iwoohaha.tistory.com/123