2010年1月5日火曜日

PHP5.4 php-fpm作成時のconfigureメモ

ローカルでHDDが飛んで記録が消えたので
一部残ってたものをBloggerに残す

x86_64 PHP5.3/5.4 php-fpm

# yum install make gcc gcc-c++ pcre-devel openssl-devel subversion autoconf \
libevent-devel libxml2-devel bzip2-devel libcurl-devel libjpeg-devel libpng-devel \
freetype-devel gmp-devel libmcrypt-devel aspell-devel libxslt-devel expat-devel libtool-ltdl-devel expat-devel libmcrypt-devel

//RPMforgeの設定
// epelでも可
#yum install yum-conf-rpmforge.x86_64
#yum --enablerepo=rpmforge install libmcrypt-devel

//5.3.3からphp-fpmが初期から組み込まれたので下記は不要
//svn co http://svn.php.net/repository/php/php-src/trunk/sapi/fpm sapi/fpm
//./buildconf --force

CFLAGS="-march=native -O3 -m64 -pipe -fomit-frame-pointer -mfpmath=sse -msse4 -msse4.1 -msse4.2" \
CXXFLAGS="-march=native -O3 -m64 -pipe -fomit-frame-pointer -mfpmath=sse -msse4 -msse4.1 -msse4.2" \
./configure \
--host=x86_64-redhat-linux-gnu \
--build=x86_64-redhat-linux-gnu \
--target=x86_64-redhat-linux \
--program-prefix= \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
--datadir=/usr/share \
--includedir=/usr/include \
--libdir=/usr/lib64 \
--libexecdir=/usr/libexec \
--localstatedir=/var \
--sharedstatedir=/usr/com \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--cache-file=./config.cache \
--with-libdir=lib64 \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d \
--disable-debug \
--with-pic \
--disable-rpath \
--with-bz2 \
--with-curl \
--with-freetype-dir=/usr \
--with-png-dir=/usr \
--enable-gd-native-ttf \
--without-gdbm \
--with-gettext \
--with-gmp \
--with-iconv \
--with-jpeg-dir=/usr \
--with-openssl \
--with-png-dir \
--with-pspell \
--with-libexpat-dir=/usr \
--with-pcre-regex \
--with-zlib \
--with-layout=GNU \
--enable-exif \
--enable-ftp \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--enable-wddx \
--with-kerberos \
--with-unixODBC=shared,/usr \
--enable-shmop \
--enable-calendar \
--with-libxml-dir=/usr \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-gd \
--enable-xml \
--enable-dom \
--with-xsl \
--disable-dba \
--without-unixODBC \
--enable-xmlreader \
--enable-xmlwriter \
--enable-bcmath \
--enable-fpm \
--with-fpm-user=www \
--with-fpm-group=www \
--disable-short-tags \
--enable-json \
--enable-mbstring \
--enable-mbregex \
--with-mcrypt \
--with-mhash
#除外(PDO使用)
--disable-pdo

#除外(PEAR使用)
--without-pear

#廃止(5.3)
--without-odbc
--enable-memory-limit
--enable-track-vars
--enable-trans-sid
--enable-yp
--enable-dbx
--enable-dio
--without-mime-magic

#廃止(5.4)
--disable-magic-quotes
--enable-ucd-snmp-hack
--without-sqlite
--enable-sqlite-utf8