본문 바로가기

리눅스/centos

[centos]APM 설치 4 - apache 2.4.7 설치

반응형

[centos]APM 설치 1 -APM 이란

[centos]APM 설치 2 - 설치하기전 필요 패키지 설치

[centos]APM 설치 3 - mysql 5.7 설치

[centos]APM 설치 4 - apache 2.4.7 설치

[centos]APM 설치 5 - php 5.3.28 설치

[centos]APM 설치 6 - 설시치 문제점 해결책


설치 버전: apache 2.4.7

다운 경로: http://mirror.apache-kr.org/httpd/

위와 같이 미러 사이트를 볼 수 있습니다.

apache 설치 전 선수 작업이 있습니다. 선수 작업은 아래와 같습니다.

# wget http://mirror.apache-kr.org/apr/apr-1.5.0.tar.gz
# tar xvpf apr-1.5.0.tar.gz
# cd apr-1.5.0
# ./configure --prefix=/usr/local/apr
# make && make install

# wget http://mirror.apache-kr.org/apr/apr-util-1.5.3.tar.gz
# tar xvpf apr-util-1.5.3.tar.gz
# cd apr-util-1.5.3
# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/
# make && make install

# wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.34.tar.gz
# tar xvpf pcre-8.34.tar.gz
# cd pcre-8.34
# ./configure --prefix=/usr/local/pcre
# make && make install

선수작업이 끝났다면 apache 시작 하겠습니다.

# cd /usr/local/src

# wget http://mirror.apache-kr.org/httpd/httpd-2.4.7.tar.gz

#  tar xvpf httpd-2.4.7.tar.gz

# cd httpd-2.4.7

# ./configure --prefix=/usr/local/apache --enable-mods-shared=all --enable-so --enable-ssl --enable-modules=ssl --enable-rewrite --with-mpm=prefork --enable-auth-digest --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre

# make && make install

# cp /usr/local/apache/bin/apachectl /etc/init.d/httpd

# vi /etc/init.d/httpd

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

<----2번째 라인에 추가

# chkconfig --add httpd

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

User daemon        변경전
Group daemon      변경전
User nobody         변경후
Group nobdoy       변경후

#ServerName www.example.com:80 변경전

ServerName localhost 변경후

# service httpd start

# ps -ef | grep httpd

프로세스 확인

웹페이지  접속확인후 It works! 나온다면 정상적으로 설치가 완료된것입니다.

반응형