How to get the latest php-fpm on Amazon Linux without hassle.
I needed the latest php-fpm (5.3.6) run on Amazon linux, so I got the Amazon's php source rpm and patched it to include the php-fpm. Here are the steps:
1. Install necessary build packages:
yum install -yy rpm-build gcc make redhat-rpm-config
2.Get the source rpm (will be downloaded to /usr/src/srpm/debug/)
get_reference_source -p php
3. Unpack it
rpm -i /usr/src/srpm/debug/php-5.3.6-1.13.amzn1.src.rpm
4. Install packages required to the build:
yum install -yy bzip2-devel curl-devel db4-devel gmp-devel httpd-devel pam-devel libstdc++-devel openssl-devel sqlite-devel pcre-devel libedit-devel libtool gcc-c++ libevent-devel libtool-ltdl-devel libc-client-devel mysql-devel postgresql-devel unixODBC-devel libxml2-devel net-snmp-devel libxslt-devel libxml2-devel libjpeg-devel libpng-devel freetype-devel libXpm-devel t1lib-devel libmcrypt-devel libtidy-devel freetds-devel aspell-devel libicu-devel
5. Edit the /usr/src/rpm/SPECS/php.spec file and add php-fpm or get mine: http://www.kuliyev.com/php.spec
5. Build the RPM (rpmbuild will ask to install
rpmbuild -bs --clean /usr/src/rpm/SPECS/php.spec
You can download the ready-to-build source rpm from here: http://www.kuliyev.com/php-5.3.6-1.13.amzn1.src.rpm
Or, even better, ready to install rpm (i686 version for now, sorry): http://www.kuliyev.com/php-fpm-5.3.6-1.13.amzn1.i686.rpm
Have fun.
Showing posts with label EC2 aws amazon linux php fpm php-fpm rpm src.rpm srpm build. Show all posts
Showing posts with label EC2 aws amazon linux php fpm php-fpm rpm src.rpm srpm build. Show all posts
Subscribe to:
Posts (Atom)