일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- 정보처리산업기사
- MYSQL
- 스프링
- CJ UNIT
- 알고리즘
- 파이썬
- 백준알고리즘
- SQL
- 백준
- C++
- 코딩교육봉사
- 백준 알고리즘
- 시나공
- SW봉사
- 소프티어
- 문제풀이
- 프로그래머스
- java
- softeer
- 공부일지
- 코딩봉사
- kotlin
- 코틀린
- 1과목
- programmers
- BFS
- python
- 데이터베이스
- 자바
- 회고
- Today
- Total
JIE0025
[Apache] Apache 2.4.x 아파치 설치 (pcre , apr, apr-util, tomcat-connectors) 본문
[Apache] Apache 2.4.x 아파치 설치 (pcre , apr, apr-util, tomcat-connectors)
Kangjieun11 2025. 2. 20. 21:35
우리는 이전에 웹서버의 역할을 알아본적이 있다.
https://jie0025.tistory.com/515
[WEB] Web Server, Web Application Server (WAS)의 차이점
✅ 개요 웹과 서버에 대해 공부를 하다보면 웹서버와 웹애플리케이션이라는 말을 자주 듣게된다. 둘의 차이를 확실하게 알고 있어야 웹 애플리케이션을 만들 때 각각이 어떤 역할을 하는지 이
jie0025.tistory.com
⏺ 웹서버
- 웹서버는 클라이언트로부터 HTTP요청을 받으면 요청된 정적 파일(html, css, js, img 등)을 응답으로 제공한다.
- 만약 동적인 컨텐츠가 필요한 경우, 웹서버는 웹어플리케이션서버로 해당요청을 전달
만약 동적인 요청이 너무나 많아지는 상황을 생각했을 때
요청을 나눠주기 위해 WAS를 여러개 추가하고 WEB에서 분산처리하도록 할 수 있는 역할도 한다.
웹서버IP/PORT번호로 접속 분산
Client --------------------------------------- > WEB ------------------> WAS 1
ㄴ----------------> WAS 2
여기에서 웹서버 ( WEB) 중 가장 유명한것이 바로 아파치이다.
이번 시간엔 아파치를 아카이브 파일로 설치하는 방법을 알아보자.
✅ 설치 전에 필요한 패키지/라이브러리 목록
gcc, gcc-c++
아파치는 C언어 기반으로 제작되어 C계열 컴파일러가 필요하다.
apr (Apache portable runtime) , apr-util
일관된 인터페이스를 만들 수 있게
설치된 플랫폼 상관없이 일정한 동작을 하기 위함
>> default가 1.3 인데 CentOS에선 1.4 이상이 요구되기 떄문에 apr-util apr의 패키지 설정을 --with옵션으로 따로 해주어야한다.
openssl-devel
: ssl 관련 라이브러리
perl (5이상)
: Perl 로 작성된 지원 스크립트가 존재하기 떄문에 필요하다.
pcre (Perl Comportable Regular Expression)
정규표현식 맥락/문법을 Perl5에서 사용가능하게 하는 라이브러리
✅ Apache 2.4.x 설치 방법
1. gcc/ gcc-c++/openssl-devel/perl을 설치한다.
rpm -qa | grep openssl //openssl 설치가 가능한지 검색
yum list openssl
yum install openssl
>> 위 네개는 같은 방식으로 설치한다.
2. 디렉터리를 생성한다.
${DEFAULT} == 설치하고 싶은 위치라고 가정한다.
${DEFAULT}/app/web
-- Apache 엔진 설치 위치
${DEFAULT}/app/package
-- 패키지 설치 위치
${DEFAULT}/app/web/pcre
${DEFAULT}/app/web/apr
${DEFAULT}/app/web/apr-util
${DEFAULT}/app/web/apache2.4.53
3. 패키지 등 설치파일 다운로드
아래 것들을 실제 웹사이트에서 받아오거나, 기존에 존재하던걸 전송받아 구성하려는 시스템에 다운받아둔다.
>> ${DEFAULT}/app/package
httpd-2.4.53
tomcat-connectors-1.2.46-src
pcre-8.38
apr-1.5.2
apr-util-1.5.4
httpd
https://httpd.apache.org/download.cgi
Download - The Apache HTTP Server Project
Downloading the Apache HTTP Server Use the links below to download the Apache HTTP Server from our download servers. You must verify the integrity of the downloaded files using signatures downloaded from our main distribution directory. The signatures can
httpd.apache.org
tomcat-connectors
http://mirror.navercorp.com/apache/tomcat/tomcat-connectors/jk
Index of /apache/tomcat/tomcat-connectors/jk
Index of /dist/tomcat/tomcat-connectors/jk Apache Tomcat Connectors Source Code Distributions This download page includes only the sources to compile and build Apache Tomcat Connectors yourself with the proper tools. Download the precompiled distribution f
mirror.navercorp.com
pcre-8.38
https://sourceforge.net/projects/pcre/files/pcre/8.38/pcre-8.38.tar.gz
PCRE - Browse /pcre/8.38 at SourceForge.net
Runn is a modern resource and capacity planning platform that gets remote teams on the same page. Runn is best suited for project managers, operations leads, resourcing managers and other people responsible for project delivery.
sourceforge.net
커맨드로 다운받기
# wget https://dlcdn.apache.org/apr/apr-1.5.2.tar.gz
# wget https://dlcdn.apache.org/apr/apr-util-1.5.4.tar.gz
설치파일 압축해제
# tar xvfz apr-1.7.0.tar.gz
# tar xvfz apr-util-1.6.1.tar.gz
# tar xvfz pcre-8.45.tar.gz
# tar xvfz httpd-2.4.53.tar.gz
.tar파일일 경우
tar xvf httpd=2.4.53.tar
${DEFAULT}/app/package 에서 차례차례 빌드하며 명령어를 수행하면 Apache를 설치할 수 있다.
✅ 빌드 순서
[PCRE, APR -> APR-UTIL ] -> Apache httpd -> tomcat-connectors
* 각각 tar파일을 압축해제 한 폴더로 들어가서 명령어를 실행해야한다.
예를 들어 pcre의 경우 >> ${DEFAULT}/app/package/pcre-8.38
위 폴더에 들어가면, configure 파일이 존재한다.
1. pcre
./configure --prefix=/${DEFAULT}/app/web/pcre
>> 이 위치에 pcre 설치하고 싶어~~
make & make install
2. apr
./configure --prefix=/${DEFAULT}/app/web/apr
make & make install
2-2 apr-util
./configure --prefix=/${DEFAULT}/app/web/apr-util --with-apr=/${DEFAULT}/app/web/apr
>> apr이거 사용해서 aprutil만드세요 하고 알려주는거
make & make install
3. httpd
./configure --prefix=/${DEFAULT}/app/web/apache2.4.53 --with-apr=/${DEFAULT}/app/web/apr --with-apr-util=/${DEFAULT}/app/web/apr-util --with-pcre=/${DEFAULT}/app/web/pcre --enable-mpms-shared=all
make & make install
4. tomcat-connector
tomcat-connector 폴더 밑 native 폴더로 이동하여 실행
./configure -with-apxs =/${DEFAULT}/app/web/apache2.4.53/bin/apxs
make & make install
references
내 실습 노트 !
'Infra > WEB, WAS' 카테고리의 다른 글
WebLogic의 구성요소 (0) | 2025.01.22 |
---|---|
가상 면접 사례로 배우는 대규모 시스템 설계 기초 1장 : 사용자 수에 따른 규모 확장성 (5) | 2024.12.19 |
[Tomcat] 톰캣의 구조와 동작방식을 알아보자. (1) | 2024.12.07 |
[미들웨어] WAS - 각 서버의 특징을 알아보자 (Tomcat, WebLogic, JBoss, Jeus) (1) | 2024.12.05 |
[미들웨어] WAS와 웹서버의 차이는 무엇일까? (0) | 2024.12.04 |