본문 바로가기
Linux

LAMP 구성, AMP 컴파일설치(Apache)

by YoYoHa 2019. 3. 30.
728x90
반응형

LAMP 란 Linux, Apache, MySQL, PHP의 약자로 웹서버를 구성하기 위해 자주 쓰이는 요소임

Linux는 Ubuntu로 설치, AMP는 컴파일 설치를 해보겠음

 

Ubuntu 설치 : https://yoyostudy.tistory.com/3?category=326339

 

Apache 2.4 버전부터 apr, apr-util을 별도 설치해야함

PCRE는 Perl 호환 정규 표현식으로 정규식 패턴 일치를 구현하는 함수 집합임

아파치 2.4버전을 설치할 때는 pcre를 설치해야함

 

설치 시작전 gcc, gcc++가 설치되어있어야 함

apt-get install gcc

apt-get install g++

로 먼저 설치

 

1. 버전확인

http://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 one of our mirrors. You must verify the integrity of the downloaded files using signatures downloaded from our main distribution directory. Only current recommen

httpd.apache.org

https://apr.apache.org/download.cgi

 

Download - The Apache Portable Runtime Project

The currently selected mirror is http://apache.tt.co.kr/. If you encounter a problem with this mirror, please select another mirror. If all mirrors are failing, there are backup mirrors (at the end of the mirrors list) that should be available. You may als

apr.apache.org

위 두 링크에서 아파치와 apr, apr-util 버전을 확인

 

https://ftp.pcre.org/pub/pcre/

 

Index of /pub/pcre/

 

ftp.pcre.org

위 링크에서 pcre 버전을 확인

 

 

2. 다운로드 진행

아래와 같이 설치한 파일을 확인할 수 있음

 

3. 압축 해제

압축해제가 끝나면 apr, apr-util은 압축해제한 아파치 내부의 srclib 폴더 내부로 이동시킨다

 

이후는 sudo 치기 귀찮아서 root 권한으로 들어옴

 

apr 설치

옮겨진 apr이 있는곳으로 와서  위와같이 설치

 

pcre 설치

위 apr 설치와 동일하다

 

apr-util 설치

 

apr-util은 다음과같이 설치 (apr의 경로를 지정해줘야함)

이 뒤로는 위와 동일하게 make -> make install

 

make 부분에서 위와같은 에러가 뜬다면 아래와 같이 libexpat1-dev 를 설치 

 

 

apache 설치

위 apr, pcre 설치와 동일하다

cd 를 통해 apache경로에 들어가서 -> ./configure -> make -> make install

 

./configure의 추가옵션 : https://yoyostudy.tistory.com/9 

 

4. 서비스 실행

위 명령어로 서비스 시작

ifconfig로 ip주소를 얻는다 ( 패키지는 따로 설치해야함 )

 

위와같은 문구가 보이면 정상 실행 된것!

 

5. 추가 ( ServerName 등록, 서비스 등록, 자동실행 )

ServerName 등록

서비스를 실행시킬때 ServerName을 등록해야 한다는 경고?메세지를 보고 설정

 

 

위와같이 셋팅하면 서비스를 실행시키더라도 메세지가 뜨지 않는것을 확인

 

 

서비스 등록

위와같이 apache 실행파일을 /etc/init.d/httpd로 복붙

위 과정이 끝나면

service httpd start

service httpd restart

service httpd stop 

가능

 

서비스 정상 등록 확인

 

728x90
반응형

'Linux' 카테고리의 다른 글

Configure 옵션 (Apache)  (0) 2019.04.02
Ubuntu IP 고정할당  (0) 2019.04.01
Configure, make, make install  (0) 2019.04.01
VMware에 Ubuntu 설치  (0) 2019.03.30
리눅스란? && 배포판 종류  (0) 2019.03.29

댓글