'make: *** [all-recursive]'에 해당되는 글 1건

  1. 2018.03.09 아파치 컴파일 설치
2018. 3. 9. 17:06


아파치 톰캣을 쓰려고 보니까,


아파치도 yum말고, 컴파일로 수동설치해야지 디테일한 세팅이 가능하더라.


그래서 아파치를 다운 받아서 직접 설치하는데 너무 중간중간 에러가 많이 나와서 정리해놓았다.


여기저기서 주워온것들이 많음.


> wget http://apache.mirror.cdnetworks.com/httpd/httpd-2.4.29.tar.gz

으로 파일을 받자, 

위경로는 버젼이 바뀔수있으므로 링크들어가서 파일 있는지 확인하자.


> tar xvfz httpd-2.4.29.tar.gz

압축을 풀고,


>cd httpd-2.4.29.tar.gz

폴더를 이동하고,


>./configure

>make

>make install


를 해본다.


근데, 이때 에러 나오는것들중에, 

 configure: error: Cannot use an external APR-util with the bundled APR

이런거나, 

checking for APR... configure: WARNING: APR version 1.4.0 or later is required, found 1.3.9
configure: WARNING: skipped APR at apr-1-config, version not acceptable
no
configure: error: APR not found. Please read the documentation.

이런 에러가 나오면, apr, apr-util을 설치 하자.

 다음 설치 할 것은 apr-util

 끝으로 pcre을 설치(이건 있으면 그냥 넘어가던지 없으면 다시 설치한다.)

 

여기까지 설치 하였다면 기본적은 패키지는 전부 설치되어 있다고 볼 수 있다.
이제 아파치를 세팅할 것이다.

이렇게 했는데, 또 밑에 같은 에러가 나온다.

APR을 yum에서도 설치했었는데, 중복이다보니까, 새로 설치한것을 못찾고 버젼 낮은거만 찾은거다. 그래서 yum으로 지워준다.


exports.c:1838: error: previous definition of 'ap_hack_apu_version' was here

exports.c:2884: error: redefinition of 'ap_hack_apu_version_string'

exports.c:1839: error: previous definition of 'ap_hack_apu_version_string' was here

make[2]: *** [exports.lo] 오류 1

make[2]: Leaving directory `/home/${사용자}/httpd-2.4.2/server'

make[1]: *** [all-recursive] 오류 1

make[1]: Leaving directory `/home/${사용자}/httpd-2.4.2/server'

make: *** [all-recursive] 오류 1


이 에러는 yum으로 낮은 버전의 APR을 설치한 후 다시 컴파일 설치로 최신버전의 APR이 설치되었을때 발생하는 문제로 낮은 버전의 APM을 지우면 됩니다.

1
#yum remove APR
1
#yum remove APR
> ./configure --prefix=/appls/apache2 --with-apr=/usr/local/apr

아니면, 뒤에 -with-apr하고 apr 설치한 경로를 입력해 준다.



이제 다했다.


> /usr/local/apache/bin/

아파치 설치한 폴더의 bin폴더로 가서,

> ./httpd start

를 해본다.


그리고 접속하면 밑에처럼 뜰거다.그럼 된거..ㅠㅠ



It works!



이제 서비스에 등록하자.


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


서비스 시작 폴더에 아파치 실행파일을 httpd 이름으로복사해준다.


그리고 서비스에 등록하자.


[root@localhost bin]# chkconfig --add httpd

httpd 서비스는 chkconfig 를 지원하지 않습니다


근데, 위와 같은 에러가 나온다.ㅠㅠㅠㅠ


그러면, httpd 폴더로 가서, 



[root@localhost /]# vi /etc/init.d/httpd


#!/bin/sh 밑에 추가 5줄



# chkconfig: 2345 90 90

# description: init file for Apache server daemon

# processname: /usr/local/server/apache/bin/apachectl

# config: /usr/local/server/apache/conf/httpd.conf

# pidfile: /usr/local/server/apache/logs/httpd.pid


빨간색은 아파치 자신이 지정해서 설치한경로


정상적으로 등록이 되는지 확인해 보자.


 


[root@localhost /]# chkconfig --add httpd 


[root@localhost /]# chkconfig --list | grep httpd



httpd           0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제




자, 이제 다 됬다...


'컴퓨터 > Java Spring Framework' 카테고리의 다른 글

JPA CascadeType 종류  (0) 2018.05.10
Spring Security logout Handler custom  (0) 2018.05.08
mod_jk연동 도메인 여러개  (0) 2018.03.09
톰캣 설치  (0) 2018.03.09
스프링에서 DB 연결하기(ver. mySQL)  (0) 2017.03.31
Posted by Tyson