PHP 5설치.
원하는 버전을 다운받으려면
http://kr.php.net/releases/
php 버전 : php-5.2.6.tar.bz2
http://kr.php.net/get/php-5.2.6.tar.bz2/from/this/mirror
php 설치할 경로 : /usr/local/server/php
[root@sms APM]# wget http://museum.php.net/php5/php-5.2.6.tar.bz2
[root@sms APM]# tar xjf php-5.2.6.tar.bz2
[root@sms APM]# cd php-5.2.6
* 중요. Oracle lib 디렉토리 부분.
--with-oci8=instantclient,/usr/lib/oracle/10.2.0.3/client64/lib
./configure \
--prefix=/usr/local/server/php \
--with-apxs2=/usr/local/server/httpd/bin/apxs \
--with-mysql=/usr/local/server/mysql \
--with-mysqli=/usr/local/server/mysql/bin/mysql_config \
--with-pdo-mysql=/usr/local/server/mysql \
--with-oci8=instantclient,/usr/lib/oracle/10.2.0.3/client64/lib \
--with-config-file-path=/usr/local/server/httpd/conf \
--with-xsl=/usr/bin \
--enable-magic-quotes \
--enable-mod-charset \
--enable-mbstring \
--enable-sigchild \
--enable-safe-mode \
--enable-bcmath \
--enable-calendar \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--enable-ftp \
--enable-shared=max \
--enable-rule=SHARED_CORE \
--enable-module=most \
--enable-rewrite \
--with-snmp \
--with-openssl \
--with-zlib \
--with-zlib-dir \
--with-jpeg-dir \
--with-png-dir \
--with-freetype-dir \
--with-gd \
--enable-gd-native-ttf \
--with-ttf \
--with-gettext \
--enable-exif \
--with-xpm-dir \
--with-libxml-dir \
--with-pcre-dir \
--with-imap \
--with-imap-ssl \
--with-kerberos \
--with-curl \
--with-ncurses \
--enable-sqlite-utf8 \
--with-regex=php \
--with-bz2 \
--with-mcrypt
위 코드를 실행하면;;
... 생략.
Generating files
updating cache ./config.cache
creating ./config.status
creating php5.spec
creating main/build-defs.h
creating scripts/phpize
creating scripts/man1/phpize.1
creating scripts/php-config
creating scripts/man1/php-config.1
creating sapi/cli/php.1
creating main/php_config.h
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
Thank you for using PHP.
이게 나오면 성공.
# make && make install
*** 아래와 같은 Error 발생시 **************************
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp5.la] 오류 1
*** 아래처럼 해준다 **********************************
# vi /etc/ld.so.conf
/usr/local/lib 추가 , 저장
# ldconfig
# make distclean 후 다시.. ./configure \ 부터 실행.
# make && make install
Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1400
php 5.2.11 or 5.2.9 에서는 요런 에러가 남... 버그인듯.
5.2.11 로 업글 하기 위해서는..
일단 5.2.6 - 5.2.9 버전을 설치 후.. pear 가 실행될 여건을 만들어 놔야 가능함. 아니면 위의에러 작렬함.
* php 설치 후 php.ini를 위에서 약속한 실행 경로로 복사
[root@sms php-5.2.11]# pwd
/usr/local/src/APM/php-5.2.11
[root@sms php-5.2.11]# cp php.ini-dist /usr/local/server/httpd/conf/php.ini
일단 여기까지 PHP 끝,
이제 설정하러 가 보자.
0 개의 댓글:
댓글 쓰기