EC2 centos5.5 32bitにphp5.3.2をインストール 2010 年 5 月 22 日

■Apache
□バージョン隠匿
# vim /etc/httpd/conf/httpd.conf
526 ServerSignature Off
追記
DirectoryIndex index.php index.xhtml index.html index.html.var
AddType application/x-httpd-php .php

■PHP最新ソースをダウンロード
http://jp.php.net/get/php-5.3.2.tar.gz/from/this/mirror

■解凍
# tar zxvf php-5.3.2.tar.gz

■シンボリックリンク
# ln -s /usr/local/src/php-5.3.2 /usr/local/php

■各種モジュールインストール
# yum -y install libxml2-devel.i386
# yum -y install openssl-devel.i386 openssl-perl.i386 openssl097a.i386 xmlsec1-openssl.i386 xmlsec1-openssl-devel.i386
# yum -y install curl-devel.i386
# yum -y install libjpeg-devel.i386
# yum -y install libpng-devel.i386
# yum -y install libmcrypt.i386 libmcrypt-devel.i386
# yum -y install autoconf213.noarch
# yum -y install libtiff-devel.i386
# yum -y install php-mcrypt.i386
# yum install libxslt.i386 libxslt-devel.i386

■configure
./configure –with-apxs2=/usr/sbin/apxs –prefix=/usr/local/php –with-zlib -enable-zend-multibyte –enable-mbstring –enable-dom –enable-mbregex -with-gettext –with-kerberos –enable-ftp –with-openssl –enable-sysvsem –enable-sysvshm –enable-sysvmsg –enable-shmop –with-curl –with-iconv –enable-soap –with-config-file-path=/usr/local/php –with-pear=/usr/local/php/pear –with-mcrypt –with-gd –with-jpeg-dir=/usr/lib –with-libdir=lib –with-xsl –enable-pdo=shared –with-pdo-sqlite=shared –with-sqlite=shared –enable-sqlite-utf8

make
make test
make install

php-mcrypt php-readline
php.ini
/usr/local/php/php.ini
□PHPバージョン隠匿
expose_php = Off
□php.iniでタイムゾーン設定が必要
date.timezone = ‘Asia/Tokyo’

■ZendFrameworkインストール
# cd /usr/local/src
# svn co http://framework.zend.com/svn/framework/standard/trunk/
# mv trunk ZendFramework
# ln -s /usr/local/src/ZendFramework /usr/local/ZendFramework
# vim /usr/local/php/php.ini
include_path = “.:/usr/local/ZendFramework/library/”

関連する記事:

Leave a Reply