apache 홈페이지에 보면 다음과 같이 설명이 되어 있다.
다운로드 | $ lynx http://httpd.apache.org/download.cgi |
압축 풀기 | $ gzip -d httpd-2_1_NN.tar.gz $ tar xvf httpd-2_1_NN.tar |
구성 | $ ./configure --prefix=PREFIX |
컴파일 | $ make |
설치 | $ make install |
설정 | $ vi PREFIX/conf/httpd.conf |
검사 | $ PREFIX/bin/apachectl start |
구성파일 설치
sudo apt install libapr1 libaprutil1 libaprutil1-dev -y
Apache 다운로드
curl -O https://dlcdn.apache.org/httpd/httpd-2.4.57.tar.gz
압축해제
tar -zxf httpd-2.4.57.tar.gz
Apache 설치
설치경로 설정
압축해제한 폴더로 들어갑니다.
cd httpd-2.4.57
./configure --prefix=PREFIX
PREFIX에 apache 설치할 경로를 입력하여 설정을 합니다.
설치
make
make install
Apache 설정
vi 설치폴더/conf/httpd.conf
httpd.conf 파일에서 포트와 servername 을 수정합니다.


실행 및 종료
설치폴더/bin/apachectl start
설치폴더/bin/apachectl stop
기타 특이사항
권한 때문에 실행이 안될수도 있는데 제가 겪은 오류는 다음과 같이 처리하면 됩니다.
1024 이상 포트안하면 root 권한으로 실행해야 가능합니다.
그래서 sudo 로 실행하거나 1024포트 이상을 주시면됩니다.
(13)Permission denied: AH00091: httpd: could not open error log file /home/ubuntu/app/httpd/logs/error_log.
파일 접근 권한이 없다고 나오는데 설치한 폴더 통째로 실행 유저로 소유자를 변경해줍니다.ㅏ
sudo chown -R ubuntu:ubuntu [Apache설치폴더경로]

Reference
https://httpd.apache.org/download.cgi#apache24
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
끝
'WEB,WAS' 카테고리의 다른 글
Angular 버전 마이그레이션 (0) | 2023.10.17 |
---|---|
angular build (0) | 2023.10.12 |
go fiber 사용하여 간단한 웹페이지 구성 (0) | 2023.05.03 |
uWSGI (0) | 2023.02.16 |
flask 설치 (0) | 2023.02.13 |
댓글