상세 컨텐츠

본문 제목

Apache 2.4.52 및 Mod_JK 수동설치 (Source Compile)

카테고리 없음

by Keunwoo.LEE 2023. 1. 4. 15:25

본문

반응형

0. 배경

- 최신버전의 apache를 설치하기 위해 yum 및 rpm을 찾아봤지만 제공해주는 곳이 마땅하지 않음

- apache를 쉽게 업그레이드 하기 위해 별도의 디렉토리에 설치 후 설정파일에서 apache 설치 경로만 변경하는 방식으로 업그레이드가 가능하게 할 수 있음

 

1. 사전 준비 작업

1. Apache 설치에 필요한 필수 프로그램 설치

> sudo yum install gcc gcc-c++ expat-devel zlib-devel openssl-devel libtool

2. 설치할 디렉토리 생성

> mkdir /apache
> mkdir /apache/sources

3. 소스파일 업로드

# /apache/sources 디렉토리에 아래 소스파일 업로드
# apache를 설치하기 위해서는 apr, apr-util, pcre 함께 필요
apr-1.7.0.tar                    # https://apr.apache.org 에서 다운로드
apr-util-1.6.1.tar               # https://apr.apache.org 에서 다운로드
pcre-8.45.tar                    # https://www.pcre.org 에서 다운로드
httpd-2.4.52.tar                 # https://httpd.apache.org 에서 다운로드
tomcat-connectors-1.2.48-src.tar # https://tomcat.apache.org 에서 다운로드

 

2. 설치 (Compile)

1. PCRE 설치

# 소스파일 압축 풀기
/apache/sources> tar -xvf pcre-8.45.tar

# compile
/apache/sources/pcre-8.45> ./configure --prefix=/apache/pcre-8.45
/apache/sources/pcre-8.45> make
/apache/sources/pcre-8.45> make install

2. httpd, apr, apr-util 설치

# 소스파일 압축풀기
/apache/sources> tar -xvf httpd-2.4.52.tar
/apache/sources> tar -xvf apr-1.7.0.tar
/apache/sources> tar -xvf apr-util-1.6.1.tar

# apr 관련 소스를 compile에 필요한 디렉토리로 이동
/apache/sources> mv apr-1.7.0 /apache/sources/httpd-2.4.52/srclib/apr
/apache/sources> mv apr-util-1.6.1 /apache/sources/httpd-2.4.52/srclib/apr-util

# compile
# 필자는 SSL 및 데이터 압축을 위해 ssl 과 deflate를 enable 했음
/apache/sources/httpd-2.4.52> ./configure --prefix=/apache/apache2.4.52 --with-pcre=/apache/pcre-8.45 --with-include-apr --enable-ssl --enable-deflate
/apache/sources/httpd-2.4.52> make
/apache/sources/httpd-2.4.52> make install

3. mod_jk 설치

# 압축파일 풀기
/apache/sources> tar -xvf tomcat-connectors-1.2.48-src.tar

# compile
/apache/sources/tomcat-connectors-1.2.48-src/native> ./configure --with-apxs=/apache/apache2.4.52/bin/apxs --prefix=/apache/apache2.4.52/modules/
/apache/sources/tomcat-connectors-1.2.48-src/native> make
/apache/sources/tomcat-connectors-1.2.48-src/native> make install

 

반응형

댓글 영역