Install Guide

23 views
Skip to first unread message

SteveR

unread,
Dec 16, 2008, 11:44:20 PM12/16/08
to highload-php-en
Once upon a time I had saved a link to a page that listed the steps to
get a working copy of nginx and php-fpm installed and running for
Ubuntu Hardy Heron. I can't find it! I want to use a nice clean Ubuntu
AMI on EC2 to give a test drive of the packages (on a machine where I
can start up fresh and blank and try again as needed). English
documentation on both is a bit lacking, I understand, but a few
pointers of clear information and after that perhaps I can help fill
in with some notes.

mike

unread,
Dec 16, 2008, 11:52:25 PM12/16/08
to highloa...@googlegroups.com
Here's my build script. I noticed the suhosin patch has some hunk
offsets now (it applied in 5.2.6 using this method flawlessly) but I
expect it still will work just fine (the patch seemed to still apply
properly)

#!/bin/bash
VER=5.2.8
BD=`pwd`

rm -rf php-${VER}
wget -c http://us3.php.net/get/php-${VER}.tar.gz/from/this/mirror
tar xvfz php-${VER}.tar.gz
cd php-${VER}

# php-fpm
wget -c http://php-fpm.anight.org/downloads/head/php-${VER}-fpm-0.5.10.diff.gz
gunzip php-${VER}-fpm-0.5.10.diff.gz
patch -p1 < php-${VER}-fpm-0.5.10.diff

# suhosin
wget -c http://download.suhosin.org/suhosin-patch-${VER}-0.9.6.3.patch.gz
gunzip suhosin-patch-${VER}-0.9.6.3.patch.gz
patch -p1 < suhosin-patch-${VER}-0.9.6.3.patch

./configure \
--enable-fastcgi \
--enable-discard-path \
--enable-force-cgi-redirect \
--enable-fpm \
--with-fpm-pid=/var/run/php-fpm.pid \
--with-fpm-log=/var/log/php-fpm.log \
--with-fpm-conf=/etc/php-fpm.conf \
--enable-cli \
--enable-inline-optimization \
--disable-rpath \
--disable-ipv6 \
--enable-mbstring \
--enable-mbregex \
--enable-sqlite-utf8 \
--with-mysql \
--with-mysqli=/usr/bin/mysql_config \
--with-curl \
--with-zlib \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-freetype-dir \
--enable-gd-native-ttf \
--enable-exif \
--enable-shmop \
--with-xsl=shared \
--with-mssql=shared \
--enable-soap=shared \
--enable-sockets \
--enable-pcntl=shared \
--with-mcrypt \
--with-bz2 \
--with-tidy \
--with-pcre-dir \
--with-openssl \
--with-imap=shared \
--with-imap-ssl \
--with-kerberos \
--with-pear \
--with-gmp
make -j2
checkinstall --pkgname="php" --pkgversion=$VER
--maintainer="webm...@foo.com" --provides="php5-cgi, php5-cli,
php5-common, php5, php" --strip=yes --stripso=yes --backup=no -y
mv *.deb ..
cd $BD
rm -rf php-${VER} php-${VER}.tar.gz

Tom Liu

unread,
Dec 17, 2008, 9:36:15 AM12/17/08
to highloa...@googlegroups.com
I've already succeeded packaging it on ubuntu 8.10 with other small patches.
Now you have 2 choices.
One is you can have try hard to build packages in ubuntu layout, first
apt-get source php5, then modified the fpm patch and rebuild it use
pbuilder, or you can use the build script by mike to package it use
checkinstall.
The build script way is much more simple.

below is my ppa, you can find the php5-5.2.8 package with php-fpm and
suhosin patch(and many others)
https://launchpad.net/~tarkus/+archive

Tanc

unread,
Jan 4, 2009, 10:14:16 PM1/4/09
to highload-php-en
Hi Tom, is there any chance you could build those packages for Ubuntu
Hardy 8.04 LTS too?

On Dec 18 2008, 1:36 am, Tom Liu <tarkus.n...@gmail.com> wrote:
> I've already succeeded packaging it on ubuntu 8.10 with other small patches.
> Now you have 2 choices.
> One is you can have try hard to build packages in ubuntu layout, first
> apt-get source php5, then modified the fpm patch and rebuild it use
> pbuilder, or you can use the build script by mike to package it use
> checkinstall.
> The build script way is much more simple.
>
> below is my ppa, you can find the php5-5.2.8 package with php-fpm and
> suhosin patch(and many others)https://launchpad.net/~tarkus/+archive

Tanc

unread,
Jan 5, 2009, 6:38:38 PM1/5/09
to highload-php-en
Thanks Tom for providing the Hardy packages at https://launchpad.net/~tarkus/+archive
Unfortunately there are dependencies on a version of libgd2-xpm which
are only available for Intrepid so I think I'll set about upgrading to
that release.

Tom Liu

unread,
Jan 6, 2009, 6:42:34 AM1/6/09
to highloa...@googlegroups.com
Hardy is far more stable than Intrepid, especially in product environment.Please wait a few more days I'll update packages for you.

Tom Liu

unread,
Jan 6, 2009, 9:19:01 AM1/6/09
to highloa...@googlegroups.com, tanc.wh...@gmail.com
Now it's ready for you, I've tested them in my ubuntu hardy server.
you can add two sources.list line
deb http://ppa.launchpad.net/tarkus/ubuntu hardy main
deb-src http://ppa.launchpad.net/tarkus/ubuntu hardy main
or directly download them from https://launchpad.net/~tarkus/+archive

Tanc

unread,
Jan 6, 2009, 5:29:38 PM1/6/09
to highload-php-en
Fantastic! I'll test later today and report back.


On Jan 7, 1:19 am, Tom Liu <tarkus.n...@gmail.com> wrote:
> Now it's ready for you, I've tested them in my ubuntu hardy server.
> you can add two sources.list line
>
> debhttp://ppa.launchpad.net/tarkus/ubuntuhardy main
> deb-srchttp://ppa.launchpad.net/tarkus/ubuntuhardy main

Tanc

unread,
Jan 28, 2009, 1:55:47 AM1/28/09
to highload-php-en
Tom,

I've been testing your php-fpm packages over the last couple of weeks
on a production server and everything looks great so far. Thanks so
much for releasing these Ubuntu packages, its made my life a lot
easier.


On Jan 7, 9:29 am, Tanc <tanc.whitesp...@gmail.com> wrote:
> Fantastic! I'll test later today and report back.
>
> On Jan 7, 1:19 am, Tom Liu <tarkus.n...@gmail.com> wrote:
>
> > Now it's ready for you, I've tested them in myubuntuhardy server.

Jauder Ho

unread,
Feb 26, 2009, 2:21:58 PM2/26/09
to highload-php-en
Maybe I'm missing something but I do not see php-fpm included in the
hardy build on the link above? Do I have to install a separate deb for
that?

--Jauder

On Jan 6, 6:19 am, Tom Liu <tarkus.n...@gmail.com> wrote:
> Now it's ready for you, I've tested them in my ubuntu hardy server.
> you can add two sources.list line
>
> debhttp://ppa.launchpad.net/tarkus/ubuntuhardy main
> deb-srchttp://ppa.launchpad.net/tarkus/ubuntuhardy main
>
> or directly download them fromhttps://launchpad.net/~tarkus/+archive
>
> Tom Liu wrote:
> > Hardy is far more stable than Intrepid, especially in product
> > environment.Please wait a few more days I'll update packages for you.
>
> > Tanc wrote:
> >> Thanks Tom for providing the Hardy packages athttps://launchpad.net/~tarkus/+archive
Reply all
Reply to author
Forward
0 new messages