Welcome! Log In Create A New Profile

Advanced

Installation instructions for dummies

Posted by jamengual 
jamengual
Installation instructions for dummies
November 05, 2009 03:30PM
Hi guys.

I have been using php-fpm on freebsd in production for long time and I
didn't have any problem, the installation was done by the port
provided and everything went well and no problems.

Now I'm trying to install that on a RHEL 5 machine and I saw a fpm.sh
script that someone wrote to do the job and I found some bugs so I fix
it, no I get php with fpm libraries loaded BUT , the php-fpm binary,
the init script and the configuration file are not there.

I think that I'm a little bit confused in proper installation of fpm.

are the Integrated and separated compilations both needed ?

How do I get the php-fpm binary, conf and int files in place ?

here is my script :

http://pastebin.com/m600e9634

Thanks.
Jason
Re: Installation instructions for dummies
November 05, 2009 03:44PM
A quick look, I believe you need:

--with-fpm

and not:

--enable-fpm


On Thu, Nov 5, 2009 at 2:41 PM, jamengual <jose.amengual@gmail.com> wrote:

>
> Hi guys.
>
> I have been using php-fpm on freebsd in production for long time and I
> didn't have any problem, the installation was done by the port
> provided and everything went well and no problems.
>
> Now I'm trying to install that on a RHEL 5 machine and I saw a fpm.sh
> script that someone wrote to do the job and I found some bugs so I fix
> it, no I get php with fpm libraries loaded BUT , the php-fpm binary,
> the init script and the configuration file are not there.
>
> I think that I'm a little bit confused in proper installation of fpm.
>
> are the Integrated and separated compilations both needed ?
>
> How do I get the php-fpm binary, conf and int files in place ?
>
> here is my script :
>
> http://pastebin.com/m600e9634
>
> Thanks.
>
>
>
>
jamengual
Re: Installation instructions for dummies
November 05, 2009 04:10PM
but that is going to install everything else ?

can you be a little bit more detail ?

On Nov 5, 12:42 pm, Jason <jason.giedy...@gmail.com> wrote:
> A quick look, I believe you need:
>
> --with-fpm
>
> and not:
>
> --enable-fpm
>
> On Thu, Nov 5, 2009 at 2:41 PM, jamengual <jose.ameng...@gmail.com> wrote:
>
> > Hi guys.
>
> > I have been using php-fpm on freebsd in production for long time and I
> > didn't have any problem, the installation was done by the port
> > provided and everything went well and no problems.
>
> > Now I'm trying to install that on a RHEL 5 machine and I saw a fpm.sh
> > script that someone wrote to do the job and I found some bugs so I fix
> > it, no I get php with fpm libraries loaded BUT , the php-fpm binary,
> > the init script and the configuration file are not there.
>
> > I think that I'm a little bit confused in proper installation of fpm.
>
> > are the Integrated and separated compilations both needed ?
>
> > How do I get the php-fpm binary, conf and int files in place ?
>
> > here is my script :
>
> >http://pastebin.com/m600e9634
>
> > Thanks.
>
>
jamengual
Re: Installation instructions for dummies
November 05, 2009 08:50PM
I got this :


Notice: Following unknown configure options were used:

--with-fpm
--with-libevent=/usr

If I use --enable-fpm works.

Plase che my script....


On Nov 5, 1:08 pm, jamengual <jose.ameng...@gmail.com> wrote:
> but that is going to install everything else ?
>
> can you be a little bit more detail ?
>
> On Nov 5, 12:42 pm, Jason <jason.giedy...@gmail.com> wrote:
>
> > A quick look, I believe you need:
>
> > --with-fpm
>
> > and not:
>
> > --enable-fpm
>
> > On Thu, Nov 5, 2009 at 2:41 PM, jamengual <jose.ameng...@gmail.com> wrote:
>
> > > Hi guys.
>
> > > I have been using php-fpm on freebsd in production for long time and I
> > > didn't have any problem, the installation was done by the port
> > > provided and everything went well and no problems.
>
> > > Now I'm trying to install that on a RHEL 5 machine and I saw a fpm.sh
> > > script that someone wrote to do the job and I found some bugs so I fix
> > > it, no I get php with fpm libraries loaded BUT , the php-fpm binary,
> > > the init script and the configuration file are not there.
>
> > > I think that I'm a little bit confused in proper installation of fpm.
>
> > > are the Integrated and separated compilations both needed ?
>
> > > How do I get the php-fpm binary, conf and int files in place ?
>
> > > here is my script :
>
> > >http://pastebin.com/m600e9634
>
> > > Thanks.
>
>
Re: Installation instructions for dummies
November 06, 2009 07:12AM
The script does not set:

--with-config-file-path=[PATH]
--with-config-file-scan-dir[=PATH]
--with-libevent="$LIBEVENT_SEARCH_PATH"

in the major php build phase.

Also it doesn't 'make install' or 'make install --dry-run' in the last
target at the very end.
Note that you don't need to compile FPM twice anyway.

The compiling libevent bit:
It should come at the very beginning because it is needed by the major
compilation stage. I have modified your script to fix the libevent
(but not the config paths).

"make install --dry-run" will help you see what files will be installed.
See the README.markdown for full details.

On Fri, Nov 6, 2009 at 1:48 AM, jamengual <jose.amengual@gmail.com> wrote:
>
> I got this :
>
>
> Notice: Following unknown configure options were used:
>
> --with-fpm
> --with-libevent=/usr
>
> If I use --enable-fpm works.
>
> Plase che my script....
>
>
> On Nov 5, 1:08 pm, jamengual <jose.ameng...@gmail.com> wrote:
>> but that is going to install everything else ?
>>
>> can you be a little bit more detail ?
>>
>> On Nov 5, 12:42 pm, Jason <jason.giedy...@gmail.com> wrote:
>>
>> > A quick look, I believe you need:
>>
>> > --with-fpm
>>
>> > and not:
>>
>> > --enable-fpm
>>
>> > On Thu, Nov 5, 2009 at 2:41 PM, jamengual <jose.ameng...@gmail.com> wrote:
>>
>> > > Hi guys.
>>
>> > > I have been using php-fpm on freebsd in production for long time and I
>> > > didn't have any problem, the installation was done by the port
>> > > provided and everything went well and no problems.
>>
>> > > Now I'm trying to install that on a RHEL 5 machine and I saw a fpm.sh
>> > > script that someone wrote to do the job and I found some bugs so I fix
>> > > it, no I get php with fpm libraries loaded BUT , the php-fpm binary,
>> > > the init script and the configuration file are not there.
>>
>> > > I think that I'm a little bit confused in proper installation of fpm.
>>
>> > > are the Integrated and separated compilations both needed ?
>>
>> > > How do I get the php-fpm binary, conf and int files in place ?
>>
>> > > here is my script :
>>
>> > >http://pastebin.com/m600e9634
>>
>> > > Thanks.
>>
>>
jamengual
Re: Installation instructions for dummies
November 06, 2009 12:44PM
I found a usefull link.

http://www.razvan.ws/linux-slackware-13-nginx-php-fastcgi-using-php-fpm/

I check their way to do it and I change my script so now looks like :

#!/bin/bash

#Defining variables for different versions
PHP_VER=5.2.11
FPM_VER=0.6
SUHOSIN=0.9.7
export PHP_VER=5.2.11
DIR=`pwd`

# Downloadin and installing libevent
export LE_VER=1.4.12-stable
wget "http://www.monkey.org/~provos/libevent-$LE_VER.tar.gz"
tar -zxvf "libevent-$LE_VER.tar.gz"
cd "libevent-$LE_VER"
../configure && make
make install

#cleaning up old compilation of php
cd $DIR
rm -rf php-${PHP_VER}
rm -f fpm.patch

#Downloading and uncompressing php
wget -c http://us3.php.net/get/php-${PHP_VER}.tar.gz/from/this/mirror
tar xvfz php-${PHP_VER}.tar.gz

# getting php-fpm
wget -c http://launchpad.net/php-fpm/master/0.6/+download/php-fpm-${FPM_VER}-${PHP_VER}.tar.gz
gunzip php-fpm-${FPM_VER}-${PHP_VER}.tar.gz
tar xvf php-fpm-${FPM_VER}-${PHP_VER}.tar

# Generatin ths patch
php-fpm-${FPM_VER}-${PHP_VER}/generate-fpm-patch
echo "patching FPM"

# Appling the patch to php
cd php-${PHP_VER}
patch -p1 < ../fpm.patch

# Downloading suhosin
wget -c http://download.suhosin.org/suhosin-patch-${PHP_VER}-${SUHOSIN}.patch.gz
gunzip suhosin-patch-${PHP_VER}-${SUHOSIN}.patch.gz

# Patching php with suhosin
patch -p1 < suhosin-patch-${PHP_VER}-${SUHOSIN}.patch

# Building php

# without this option --with-fpm will not be recognized
../buildconf --force

../configure \
--enable-fastcgi \
--enable-discard-path \
--enable-force-cgi-redirect \
--with-fpm \
--with-libevent=/usr \
--with-libdir=lib64 \
--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


# You can add more option to be compiled with php, but you will need
the packages installed in your system.
# This script works in any system, but I recomend to use the Freebsd
port for freebsd
# this was tested in a RHEL 5

Hopefully this will help others, this proyect is really cool but lacks
on good documentation.

On Nov 6, 4:09 am, dreamcat four <dreamc...@gmail.com> wrote:
> The script does not set:
>
> --with-config-file-path=[PATH]
> --with-config-file-scan-dir[=PATH]
> --with-libevent="$LIBEVENT_SEARCH_PATH"
>
> in the major php build phase.
>
> Also it doesn't 'make install' or 'make install --dry-run' in the last
> target at the very end.
> Note that you don't need to compile FPM twice anyway.
>
> The compiling libevent bit:
> It should come at the very beginning because it is needed by the major
> compilation stage. I have modified your script to fix the libevent
> (but not the config paths).
>
> "make install --dry-run" will help you see what files will be installed.
> See the README.markdown for full details.
>
> On Fri, Nov 6, 2009 at 1:48 AM, jamengual <jose.ameng...@gmail.com> wrote:
>
> > I got this :
>
> > Notice: Following unknown configure options were used:
>
> > --with-fpm
> > --with-libevent=/usr
>
> > If I use --enable-fpm works.
>
> > Plase che my script....
>
> > On Nov 5, 1:08 pm, jamengual <jose.ameng...@gmail.com> wrote:
> >> but that is going to install everything else ?
>
> >> can you be a little bit more detail ?
>
> >> On Nov 5, 12:42 pm, Jason <jason.giedy...@gmail.com> wrote:
>
> >> > A quick look, I believe you need:
>
> >> > --with-fpm
>
> >> > and not:
>
> >> > --enable-fpm
>
> >> > On Thu, Nov 5, 2009 at 2:41 PM, jamengual <jose.ameng...@gmail.com> wrote:
>
> >> > > Hi guys.
>
> >> > > I have been using php-fpm on freebsd in production for long time and I
> >> > > didn't have any problem, the installation was done by the port
> >> > > provided and everything went well and no problems.
>
> >> > > Now I'm trying to install that on a RHEL 5 machine and I saw a fpm.sh
> >> > > script that someone wrote to do the job and I found some bugs so I fix
> >> > > it, no I get php with fpm libraries loaded BUT , the php-fpm binary,
> >> > > the init script and the configuration file are not there.
>
> >> > > I think that I'm a little bit confused in proper installation of fpm.
>
> >> > > are the Integrated and separated compilations both needed ?
>
> >> > > How do I get the php-fpm binary, conf and int files in place ?
>
> >> > > here is my script :
>
> >> > >http://pastebin.com/m600e9634
>
> >> > > Thanks.
>
>
grigori
Re: Installation instructions for dummies
November 13, 2009 04:46PM
> I got this :
>
> If I use --enable-fpm works.
>
> Plase che my script....

Things changed. Old FPM used "enable" and contained libevent bundled.

Now you need to do more:
* after applying the patch run the command
#./buildconf --force
* set up last libevent from sources
* use "--with-fpm --with-libevent" configure options.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 296
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready