본문으로 바로가기

AIX는 RPM 패키지를 사용하기 위해 TOOLBOX 를 먼저 설치해야 한다.

http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/download.html


그 후 컴파일에 필요한 GNU 라이브러리와 관련 패키지 설치한다. 목록은 리눅스에서 설치하는 목록과 유사하다. 패키지 파일은 아래에서 다운로드 가능하다.

ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc


* 아파치 

apxs 동적 모듈 사용 할 수 있게 컴파일 한다.


* PHP (5.4.6)

성공 configure

SHELL=/usr/bin/bash CC=gcc CXX=gcc CFLAGS=-g0 ./configure --prefix=/usr/local/php5 \

--with-config-file-path=/usr/local/apache22/conf \

--with-apxs2=/usr/local/apache22/bin/apxs \

--with-gd \

--with-zlib-dir=/opt/freeware/lib \

--with-zlib \

--with-jpeg-dir=/opt/freeware/lib \

--with-png-dir=/opt/freeware/lib \

--with-freetype-dir=/opt/freeware/lib \

--enable-mbstring \

--with-libxml-dir=/opt/freeware/lib \

--with-iconv \

--disable-cli


# make


# make install


* pecl oci8 (1.4.10)
압축 해제
# cd oci8-1.4.10
# phpize
# CC=gcc CXX=gcc ./configure --with-oci8=instantclient,/usr/lib/oracle/instantclient
# make
# make install
# cp ./modules/oci8.so /usr/local/php5/modules
# echo 'extension=oci8.so' >> /usr/local/apache22/conf/php.ini
# /usr/local/apache22/bin/apachectl restart
php의 bin 폴더가 $PATH에 설정되어 있어야 한다.

* php make 오류 
make: execvp: /bin/sh: Arg list too long
make: *** [sapi/cgi/php-cgi] 오류 127

인수 갯수 증가
# lsattr -El sys0 -a ncargs
# chdev -l sys0 -a ncargs=16

* php make install 오류 (.so 파일 삭제)

make install 오류. 컴파일 하면서 .so 파일 삭제한다.

chmod: /usr/local/apache22/modules/libphp5.so: No such file or directory

apxs:Error: Command failed with rc=65536


소스 디렉토리에 있는 파일 복사해도 된다.

cp .libs/libphp5.so /usr/local/apache22/modules/


.so 파일 삭제하는 부분을 스크립트에서 주석처리

# vi /usr/local/apache22/build/instdso.sh

42,43c42,43

< #if test "$SYS" = "AIX"

< #then

---

> if test "$SYS" = "AIX"

> then

47,50c47,50

<     #CMD="rm -f $TARGETDIR/$TARGET_NAME"

<     #echo $CMD

<     #$CMD || exit $?

< #fi

---

>     CMD="rm -f $TARGETDIR/$TARGET_NAME"

>     echo $CMD

>     $CMD || exit $?

> fi

75,81c75,81
< #if test -n "$LIBRARY_NAMES"
< #then
<     #for f in $LIBRARY_NAMES
<     #do
<         #rm -f $TARGETDIR/$f
<     #done
< #fi
---
> if test -n "$LIBRARY_NAMES"
> then
>     for f in $LIBRARY_NAMES
>     do
>         rm -f $TARGETDIR/$f
>     done
> fi
88,91c88,91
< #rm -f $TARGETDIR/$DSOARCHIVE_BASENAME
< #rm -f $TARGETDIR/$DSOBASE.a
< #rm -f $TARGETDIR/lib$DSOBASE.a
< #rm -f $TARGETDIR/lib$TARGET_NAME
---
> rm -f $TARGETDIR/$DSOARCHIVE_BASENAME
> rm -f $TARGETDIR/$DSOBASE.a
> rm -f $TARGETDIR/lib$DSOBASE.a
> rm -f $TARGETDIR/lib$TARGET_NAME


* 쉘 변경
# chsh  // bash 환경에서 컴파일을 추천하는 경우가 많음

* aio 관련 오류시