# yum update
# yum remove http* php* mysql*
# rpm | grep mysql
# rpm | grep http
# rpm | grep php
--> 패키지 삭제
yum -y install gd-* freetype-* libpng* libmng* libtiff* libungif* libjpeg* libc-client* libc-client-devel imap* libmcrypt* mhash* mhash-devel libtool-ltdl-devel* pcre* apr* openssl* dialog cc* gcc* cmake vsftpd net-snmp* ncurses* gmp* expat* libxml2* pspell* libxml* gdbm* ntp mhash* cyrus-imapd* sendmail* libXaw* fontconfig* libtermcap* krb5* libcurl* curl curl-devel
# yum install -y libicu-dev*
# yum install -y libtermcap-devel
# yum install libxml* libjpeg* -y
# yum -y install gd gd2 gd-devel gd2-devel wget pcre openssl* perl libaio
# yum -y install –enablerepo=c6-media install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel libtool libtool-libs openldap openldap-devel nss_ldap openldap-clients openldap-servers libtool-ltdl libtool-ltdl-devel bison
# ./configure --prefix=/usr/local/php \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql \
--with-config-file-path=/usr/local/apache/conf \
--with-openssl \
--with-imap --with-imap-ssl --with-kerberos \
--disable-debug --enable-safe-mode \
--enable-track-vars --enable-sockets \
--with-mod_charset --with-charset=utf8 --with-xml \
--with-language=korean --enable-sysvshm=yes --enable-calender \
--enable-sysvsem=yes --enable-sysvshm=yes --enable-ftp \
--enable-magic-quotes --enable-gd-native-ttf --enable-url-include \
--enable-trans-id --enable-inline-optimization --enable-bcmath \
--with-jpeg --with-png --with-zlib --with-jpeg-dir=/usr \
--with-png-dir=/usr/lib --with-freetype-dir=/usr \
--with-libxml-dir=/usr --enable-exif --with-gd \
--with-ttf --with-gettext --enable-sigchild --enable-mbstring \
--with-libxml-dir=/usr/local/libxml12
* 설치 시 컴파일 에러
configure: error: libjpeg.(a|so) not found. -> 에러메세지 출력 시
다음과 같이 해결
ln -s /usr/lib64/libjpeg.so /usr/lib/libjpeg.so
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
wget ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz
tar xvfz imap-2007f.tar.gz
/usr/local/src/imap-2007f/src/c-client
cp *.h /usr/local/include/
cp * /usr/local/lib
php 재컴파일
mv /usr/local/src/imap-2007f /usr/local/imap-2007f
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen
yum install openssl openssl-devel pam-devel
wget ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz
tar zxvf imap-2007f.tar.gz
Then I had to make a soft link so the compiler could find the libraries. In my case I did the following:
mkdir /usr/local/ssl
ln -s /usr/include /usr/local/ssl/include
and then compile:
cd imap-2007f
make lnp SSLTYPE=unix EXTRACFLAGS=-fPIC
Then I was able to compile PHP by adding the imap source path to the config param like so:
/path/to/php/src> ./configure ...other_params... '--with-imap=/path/to/imap-2007f' '--with-imap-ssl'
make
make install
configure: error: Kerberos libraries not found.
옵션 변경
--with-kerberos
to
--with-kerberos-inc=/usr/include
make: *** [ext/openssl/openssl.lo] Error 1
--> 우선 openssl 옵션을 지우고 설치 후에 필요시 연동시킨다.
****** 최종 컴파일 옵션
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-imap=/usr/local/imap-2007f --with-imap-ssl --with-kerberos-inc=/usr/include --disable-debug --enable-safe-mode --enable-track-vars --enable-sockets --with-mod_charset --with-charset=utf8 --with-xml --with-language=korean --enable-sysvshm=yes --enable-calender --enable-sysvsem=yes --enable-sysvshm=yes --enable-ftp --enable-magic-quotes --enable-gd-native-ttf --enable-url-include --enable-trans-id --enable-inline-optimization --enable-bcmath --with-jpeg --with-png --with-zlib --with-jpeg-dir=/usr --with-png-dir=/usr/lib --with-freetype-dir=/usr --with-libxml-dir=/usr --enable-exif --with-gd --with-ttf --with-gettext --enable-sigchild --enable-mbstring --with-libxml-dir=/usr/local/libxml12
apache 포함 옵션
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-imap=/usr/local/imap-2007f --with-imap-ssl --with-kerberos-inc=/usr/include --disable-debug --enable-safe-mode --enable-track-vars --enable-sockets --with-mod_charset --with-charset=utf8 --with-xml --with-language=korean --enable-sysvshm=yes --enable-calender --enable-sysvsem=yes --enable-sysvshm=yes --enable-ftp --enable-magic-quotes --enable-gd-native-ttf --enable-url-include --enable-trans-id --enable-inline-optimization --enable-bcmath --with-jpeg --with-png --with-zlib --with-jpeg-dir=/usr --with-png-dir=/usr/lib --with-freetype-dir=/usr --with-libxml-dir=/usr --enable-exif --with-gd --with-ttf --with-gettext --enable-sigchild --enable-mbstring --with-libxml-dir=/usr/local/libxml12 --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/apache/conf
'OS' 카테고리의 다른 글
파일 속성 변경 (chattr 과 lsattr.pdf) (0) | 2015.02.05 |
---|---|
CentOS Cacti 구축_최신 (0) | 2015.01.21 |
APM 설치 (apache 2.4.7 / php 5.5.9 /mysql 5.6 /) (0) | 2015.01.15 |
my.cnf 위치 찾기 (0) | 2015.01.10 |
centos vim 설치 (0) | 2015.01.09 |