You are reading

Install PHP-FPM 5.3.2 on Ubuntu 9.10

Posted: March 28, 2010 | By: TJ | In Technology | One comment

Until PHP-FPM is included in PHP core, installing PHP-FPM is kind of a pain. Fortunately, it looks like it will be included in PHP 5.4. For now, installing PHP-FPM now can be done in a few different ways:

  • Using SVN. This version is based off of the 0.6.x series in Launchpad. This method is considered experimental and has a few known issues reported.
$ svn co http://svn.php.net/repository/php/php-src/branches/PHP_5_3_FPM php_5_3_fpm
$ cd php_5_3_fpm
$ ./buildconf --force
$ ./configure --enable-fpm --with-foo --enable-bar...
$ make && make install
  • The stable patch method works well however it still requires you to compile PHP manually. This is considered the most reliable method.
  • The easiest method is to use apt-get. This is what we’ll be using here.
$ cd /tmp
$ wget http://us.archive.ubuntu.com/ubuntu/pool/main/k/krb5/libkrb53_1.6.dfsg.4~beta1-5ubuntu2_amd64.deb
$ wget http://us.archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu38_3.8-6ubuntu0.2_amd64.deb
$ dpkg -i *.deb
$ echo "deb http://php53.dotdeb.org stable all" >> /etc/apt/sources.list
$ apt-get --force-yes update
$ apt-get --force-yes install php5-cli php5-common php5-mysql php5-suhosin
$ apt-get --force-yes install php5-fpm php5-cgi php-pear php5-memcache

Use the –force-yes flag in the commands above to roll past the package warnings. Now, start the daemon and clean up the /tmp directory:

$ /etc/init.d/php5-fpm start
$ rm -rf /tmp/lib*

To check if the install was successful, use the following:

$ php -v

You should see something like the following output:

PHP 5.3.2-0.dotdeb.1 with Suhosin-Patch (cli) (built: Mar  9 2010 11:42:01)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Suhosin v0.9.29, Copyright (c) 2007, by SektionEins GmbH

Notes:

  • To meet the required dependencies, you’ll need to install libxml2-dev and libevent-dev before you get started.
  • If you are running Karmic in 32-bit, replace amd64 with i386 in the dependencies used above.

Comments for this entry

How do you know if its using memcache rather than files?

How do you know if its using memcache rather than files? When I set the session save path and the other part of it, it asks me to download the files. What’s wrong?

The easiest way is to tail the memcached.log. If you’ve set up verbose logging, you can watch the sessions being logged as they happen. Using something like:

$ tail -f /var/log/memecached.log

Karan

Thanks for the article, however, I get the following error when i try to run the make command: http://pastie.org/private/ndnoqi2defntxouhshtona

Any ideas? Thanks again :)

[...] is a rehash of this tutorial but for Debian [...]

[...] http://longvnit.com/blog/?p=627 http://constantshift.com/installing-apc-for-php-5-3/ CentOS 5 – PHP SSH2CentOS – soporte PHP FFMPEGCentOS 5 – Php Zend y Sql [...]

Leave your comment



Copyright © 2010. All rights reserved.

This blog is powered by WordPress and proudly hosted by (mt) Media Temple.