반응형
리눅스 기준 패키지 설치 방법을 확인하려면 이 게시글 먼저 확인해주세요.

1. 설치할 APM 특정 버전이 있는가? (YES or No)

 

2. APM 버전 간 호환 여부를 확인해 보자. 

PHP 호환표 (참고 용도로만 봐주세요!!) (출처링크는 확인되면 기제 예정)

3. 컴파일 or 패키지(yum -> Rhel 기준) 설치 방식 선택 (컴파일 선택시)

 

3-1) 컴파일 설치

 

[root@localhost ~]# cd /usr/local/src
###### 필요 설치 패키지 툴 설치 ######
yum install -y make wget gcc g++ gcc-c++ autoconf automake libtool pkgconfig \
findutils openssl openssl-devel openldap-devel pcre-devel libxml2-devel lua-devel \
curl curl-devel libcurl-devel expat-devel flex zlib-devel

######  source zip 파일 다운로드 #######
[root@localhost ~]# cd /usr/local/src
wget http://apache.tt.co.kr//httpd/httpd-2.4.41.tar.gz
wget http://mirror.23media.de/apache/apr/apr-1.6.2.tar.gz
wget http://mirror.23media.de/apache/apr/apr-util-1.6.0.tar.gz
wget http://mirror.23media.de/apache/apr/apr-iconv-1.2.1.tar.gz
wget https://ftp.pcre.org/pub/pcre/pcre-8.41.tar.gz

#####  압축 풀기 #####
tar xvf httpd-2.4.41.tar.gz
tar xvf apr-1.6.2.tar.gz
tar xvf apr-util-1.6.0.tar.gz
tar xvf apr-iconv-1.2.1.tar.gz
tar xvf pcre-8.41.tar.gz

##### 파일 이동 ######
mv apr-1.6.2 ./httpd-2.4.41/srclib/apr
mv apr-util-1.6.0 ./httpd-2.4.41/srclib/apr-util

 

3-2) 설치 순서

 

Apr -> pcre -> httpd 설치 순서

 

##### 컴파일 설치 진행 #####
cd apr-1.6.2
./configure --prefix /usr/local/apr-1.6.2
make && make install

##### 컴파일 설치 진행(2) #####
cd /usr/local/src/pcre-8.41
./configure
make
make install

##### 컴파일 설치 진행(3) ######
cd /usr/local/src/httpd-2.4.27
./configure --prefix=/usr/local/apache2
make
make install

### 추가 옵션 넣을 경우 ###
./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre \
--enable-so --enable-rewrite --with-mpm=worker --enable-ssl --with-ssl=/usr

(--with-mpm=prefork or --with-mpm=worker)
--enable-mods=shared 넣으면 동적 설치 =? /usr/local/apache/modules 들어가서 .so인거 확인 가능.
--> ServerName : Localhost 로 수정 필요할수도 있음

make
make install

 

httpd(아파치) 옵션 등 자세히 알고 싶으면 클릭

 

 

※ 에러 발생시

 

##### 오류 1 #####
[ xml/apr_xml.c:35:19: error: expat.h: No such file or directory ]
--> 모듈 설치 안되어 있음

sol : yum install expat-devel + gcc*

##### 오류 2 ######
config.status: executing libtool commands
rm: cannot remove `libtoolT': No such file or directory
config.status: executing default commands
config.status: include/apr.h is unchanged
config.status: include/arch/unix/apr_private.h is unchanged
----> libtool 복사

sol : cp -arp libtool libtoolT


##### 오류 3 ######
make[1]: Entering directory `/usr/local/src/APM_setup/apr-1.6.2'
/bin/sh /libtool --silent --mode=compile gcc -g -O2 -pthread   -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE   -I./include -I/usr/local/src/APM_setup/apr-1.4.2/include/arch/unix -I./include/arch/unix -I/usr/local/src/APM_setup/apr-1.4.2/include/arch/unix -I/usr/local/src/APM_setup/apr-1.4.2/include  -o passwd/apr_getpass.lo -c passwd/apr_getpass.c && touch passwd/apr_getpass.lo
/bin/sh: /libtool: No such file or directory
make[1]: *** [passwd/apr_getpass.lo] Error 127
make[1]: Leaving directory `/usr/local/src/APM_setup/apr-1.6.2'
make: *** [all-recursive] Error 1
----> 심볼릭 링크 설정

sol : ln -s /usr/bin/libtool / 
sol : make clean
반응형

+ Recent posts