RedHatEL5.6のPHP5.3を野良コンパイル
先日、RedHatEL5.6がリリースされた。
php53というパッケージが追加され、EL6に移行しなくてもPHP5.3が使えるようになる。
CentOS5.6が待てないので、とりあえずRedHatのphp53パッケージをCentOS5.5で野良コンパイルしてみた。
CentOS5.6にアップデートしてもたぶん大丈夫だろう。
SRPMをダウンロードしてくる
ここらへんから
http://ftp.redhat.com/redhat/linux/enterprise/5Server/en/os/SRPMS/
php53-5.3.3-1.el5.src.rpm
野良コンパイルの準備
一般ユーザーの場合は↓参照
http://www.atmarkit.co.jp/flinux/rensai/linuxtips/952rpmbuild.html
ビルドコマンド実行
$ rpmbuild --rebuild --target x86_64 --define 'dist .el5' php53-5.3.3-1.el5.src.rpm warning: InstallSourcePackage: Header V3 DSA signature: NOKEY, key ID 37017186 warning: user mockbuild does not exist - using root warning: group mockbuild does not exist - using root error: Failed build dependencies: bzip2-devel is needed by php53-5.3.3-1.el5.x86_64 curl-devel >= 7.9 is needed by php53-5.3.3-1.el5.x86_64 db4-devel is needed by php53-5.3.3-1.el5.x86_64 gmp-devel is needed by php53-5.3.3-1.el5.x86_64 httpd-devel >= 2.0.46-1 is needed by php53-5.3.3-1.el5.x86_64 pam-devel is needed by php53-5.3.3-1.el5.x86_64 openssl-devel is needed by php53-5.3.3-1.el5.x86_64 sqlite-devel is needed by php53-5.3.3-1.el5.x86_64 zlib-devel is needed by php53-5.3.3-1.el5.x86_64 pcre-devel >= 6.6 is needed by php53-5.3.3-1.el5.x86_64 libtool >= 1.4.3 is needed by php53-5.3.3-1.el5.x86_64 krb5-devel is needed by php53-5.3.3-1.el5.x86_64 libc-client-devel is needed by php53-5.3.3-1.el5.x86_64 cyrus-sasl-devel is needed by php53-5.3.3-1.el5.x86_64 openldap-devel is needed by php53-5.3.3-1.el5.x86_64 mysql-devel >= 4.1.0 is needed by php53-5.3.3-1.el5.x86_64 postgresql-devel is needed by php53-5.3.3-1.el5.x86_64 unixODBC-devel is needed by php53-5.3.3-1.el5.x86_64 libxml2-devel is needed by php53-5.3.3-1.el5.x86_64 net-snmp-devel is needed by php53-5.3.3-1.el5.x86_64 libxslt-devel >= 1.0.18-1 is needed by php53-5.3.3-1.el5.x86_64 libxml2-devel >= 2.4.14-1 is needed by php53-5.3.3-1.el5.x86_64 libXpm-devel is needed by php53-5.3.3-1.el5.x86_64 libjpeg-devel is needed by php53-5.3.3-1.el5.x86_64 libpng-devel is needed by php53-5.3.3-1.el5.x86_64 freetype-devel is needed by php53-5.3.3-1.el5.x86_64 aspell-devel >= 0.50.0 is needed by php53-5.3.3-1.el5.x86_64 libicu-devel >= 3.6 is needed by php53-5.3.3-1.el5.x86_64
なんかいっぱい要求されたw
warning〜は気にしなくていいらしい。
とりあえず、rootになって要求されたパッケージインストール
# yum install -y bzip2-devel curl-devel db4-devel gmp-devel httpd-devel pam-devel openssl-devel sqlite-devel zlib-devel pcre-devel libtool krb5-devel libc-client-devel cyrus-sasl-devel openldap-devel mysql-devel postgresql-devel unixODBC-devel libxml2-devel net-snmp-devel libxslt-devel libxml2-devel libXpm-devel libjpeg-devel libpng-devel freetype-devel aspell-devel libicu-devel
再度コンパイル実行
$ rpmbuild --rebuild --target x86_64 --define 'dist .el5' php53-5.3.3-1.el5.src.rpm
まだ何か足りなさそう。
checking for bison... no checking for byacc... no checking for bison version... invalid configure: WARNING: bison versions supported for regeneration of the Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 (found: none). checking for re2c... no configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. # yum install bison byacc Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: ftp.riken.jp * base: ftp.riken.jp * extras: ftp.riken.jp * updates: ftp.riken.jp Setting up Install Process Resolving Dependencies
-
- > Running transaction check
- > Finished Dependency Resolution
re2cも入れておく
# wget http://sourceforge.net/projects/re2c/files/re2c/0.13.5/re2c-0.13.5.tar.gz/download # tar xfz re2c-0.13.5.tar.gz # cd re2c-0.13.5 # ./configure # make # make install
なんかまだPHPのチェックでエラーでてる・・・
えい。めんどくさい。開発関係ぜんぶいれてやれ。
# yum groupinstall "Development Tools" # yum groupinstall "Development Libraries"
$ rpmbuild --rebuild --target x86_64 --define 'dist .el5' php53-5.3.3-1.el5.src.rpm (省略) ===================================================================== FAILED TEST SUMMARY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
なんかテストまだエラーでてるけど・・・。ま、いっか。
とりあえず、rpmはできたので。
$ cd ../RPMS $ ll -G -g total 13332 -rw-r--r-- 1 4345396 Jan 27 16:06 php53-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 85009 Jan 27 16:06 php53-bcmath-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 2751789 Jan 27 16:06 php53-cli-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 1247899 Jan 27 16:06 php53-common-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 137380 Jan 27 16:06 php53-dba-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 611538 Jan 27 16:06 php53-devel-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 347931 Jan 27 16:06 php53-gd-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 113370 Jan 27 16:06 php53-imap-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 343364 Jan 27 16:06 php53-intl-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 69120 Jan 27 16:06 php53-ldap-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 1535891 Jan 27 16:06 php53-mbstring-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 313225 Jan 27 16:06 php53-mysql-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 122708 Jan 27 16:06 php53-odbc-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 178956 Jan 27 16:06 php53-pdo-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 185038 Jan 27 16:06 php53-pgsql-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 105595 Jan 27 16:06 php53-process-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 43657 Jan 27 16:06 php53-pspell-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 48589 Jan 27 16:06 php53-snmp-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 382597 Jan 27 16:06 php53-soap-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 427156 Jan 27 16:06 php53-xml-5.3.3-1.el5.x86_64.rpm -rw-r--r-- 1 143052 Jan 27 16:06 php53-xmlrpc-5.3.3-1.el5.x86_64.rpm
php-mcryptはサポートされてないんだ・・・。
ショボーン(´・ω・`)
とりあえずできたものはこの辺に保存。
ftp://ns.cool-creators.com/pub/centos/5/RPMS/