Search This Blog

Saturday, July 16, 2011

php mongo 1.2.1 on Amazon Linux

The src rpm is here: http://www.kuliyev.com/php-pecl-mongo-1.2.1-4.amzn1.src.rpm

The i686 (no x64 yet, sorry) rpm is here: http://www.kuliyev.com/php-pecl-mongo-1.2.1-4.amzn1.i686.rpm

Have fun.

php-fpm for EC2 Amazon Linux

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.

tmux on Amazon Linux

I need tmux for my daily job and Amazon Linux lacks it, so I compiled mine from the tmux-1.4-3.el5.1.src.rpm. It was required the libevent-1.4.13-1 and not the amazon's one, however. So, I compiled libevent too.

i686:

x64:

src:

Have fun.