본문 바로가기
System Engineering/Linux

2. Apache 설치

by 린지v 2010. 8. 8.

# tar -zxvf httpd-2.2.16.tar.gz
# cd httpd-2.2.16
# ./configure \
  > --prefix=/usr/local/server/apache \
  > --enable-mods-shared=all \
  > --enable-so \
  > --enable-rewrite
# make && make install

# cp /usr/local/server/apache/bin/apachectl /etc/init.d/httpd
# chkconfig --add httpd
만약, 지원하지 않는다고 하면
# vi /etc/init.d/httpd 에서 두번째 줄에 아래 내용을 추가한 뒤 다시 실행해본다.

# chkconfig: 2345 90 90
# description: init file for Apache server daemon
# processname: /usr/local/server/apache/bin/apachectl
# config: /usr/local/server/apache/conf/httpd.conf
# pidfile: /usr/local/server/apache/logs/httpd.pid

# vi /usr/local/server/apache/conf/httpd.conf 를 수정한다.

<IfModule !mpm_netware_module>
User nobody
Group nobody
</IfModule>
ServerName 아이피 또는 도메인

# /etc/init.d/httpd start

만약 파이어폭스에서 접속했을 때 페이지가 열리지 않으면
# vi /etc/sysconfig/iptables에 추가한다.

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

'System Engineering > Linux' 카테고리의 다른 글

4. phpMyAdmin & 텍스트큐브 설치  (0) 2010.08.08
3. PHP 설치  (0) 2010.08.08
1. MySQL 설치  (0) 2010.08.08
APM 설치전에 해야할 일  (0) 2010.08.08
VMware7에서의 CentOS 설치 - 0  (0) 2010.08.08