2010년 3월 10일 수요일

아파치가 설치되어 있는 상태에서 PHP의 gd lib만 추가 설치

아파치가 설치되어 있는 상태에서 PHP의 gd lib만 추가 설치하고 싶은경우
php를 다시 설치해주어야 한다.
하지만 추후에는 enable-module=so 를 통해 php.ini파일을 변경해 ext를 추가해줄 수 있다

1. RPM삭제
rpm -e --nodeps zlib
rpm -e --nodeps zlib-devel
rpm -e --nodeps freetype
rpm -e --nodeps freetype-devel
rpm -e --nodeps freetype-utils
rpm -e --nodeps gd
rpm -e --nodeps gd-devel
rpm -e --nodeps libjpeg
rpm -e --nodeps libjpeg-devel
rpm -e --nodeps libpng
rpm -e --nodeps libpng-devel

2. zlib설치(이놈을 설치하지 않으니 gd가 제대로 안깔림)
[다운로드] http://www.gzip.org/zlib/
shell>tar -xvzf zlib-1.2.1.tar.gz
shell>cd zlib-1.2.1
shell>./configure -s // libz.so 동적모듈생성
shell>make
shell>./configure // libz.a 정적모듈생성
shell>make test
shell>make install

shell>cp libz.so* /usr/local/lib

shell>cd /usr/local/lib
shell>rm -rf libz.so
shell>rm -rf libz.so.1
shell>ln -s libz.so.1.2.1 libz.so
shell>ln -s libz.so.1.2.1 libz.so.1

shell>vi /etc/ld.so.conf
/usr/local/lib추가 // 라이브러리 경로 추가

shell>ldconfig // 라이브러리 경로 적용명령

3. libpng설치
[다운로드] ftp://swrinde.nde.swri.edu/pub/png/src
[설치]
shell>tar -xvzf libpng-1.2.5.tar.gz
shell>cd libpng-1.2.5
shell>cp scripts/makefile.linux Makefile
shell>make
shell>make test
shell>make install

4. freetype설치
[다운로드] http://prdownloads.sourceforge.net/freetype/
[설치]
shell>tar -xvzf freetype-2.1.8.tar.gz
shell>cd freetype-2.1.8
shell>./configure
shell>make
shell>make install

5. jpge설치
[다운로드] ftp://ftp.uu.net/graphics/jpeg/
[설치]
shell>tar -xvzf jpegsrc.v6b.tar.gz
shell>cd jpeg-6b
shell>./configure --enable-shared --enable-static
shell>make
shell>make test
shell>make install

6. gd설치
[다운로드] http://www.boutell.com/gd/http/
[설치]
shell>tar xvzf gd-2.0.9.tar.gz
shell>cd gd-2.0.9
shell>./configure
shell>make
shell>make install

7. PHP설치
[다운로드] http://www.php.net/downloads.php
[설치]
shell> ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php --with-mysql --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-gif-dir=/usr/local --with-zlib-dir=/usr/local --with-gd --with-freetype --with-language=korean --with-charset=euc_kr --with-regex=php --enable-module=so --enable-gd-native-ttf --enable-sockets --disable-debug --with-iconv
shell>make
shell>make install

shell>cp php.ini-dist /usr/local/php/php.ini //with-config-file-path위치로 복사

댓글 없음:

댓글 쓰기