From a48b1aad5aa9a88c48db3fdfd6dbf1eeea4682ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ertu=C4=9Frul=20Emre=20Ertekin?= Date: Sun, 13 Dec 2015 00:15:49 +0200 Subject: [PATCH] Installation recipe improved --- README | 54 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/README b/README index 44de3f1..1170115 100644 --- a/README +++ b/README @@ -1,38 +1,40 @@ -1.Install libbeanstalkclient -$mkdir php-beanstalk -$cd php-beanstalk/ -$wget https://github.com/bergundy/libbeanstalkclient/tarball/master --no-check-certificate -$mv master bergundy-libbeanstalkclient-b6ec294.tar.gz -$tar -xzvf bergundy-libbeanstalkclient-b6ec294.tar.gz -$mv bergundy-libbeanstalkclient-b6ec294 libbeanstalkclient -$cd libbeanstalkclient/ -$mkdir m4 -$sudo ./autogen.sh -$sudo vim /etc/ld.so.conf - /usr/lib -$sudo ldconfig +1.Install libbeanstalkclient + +$ mkdir php-beanstalk +$ cd php-beanstalk/ +$ wget https://github.com/bergundy/libbeanstalkclient/tarball/master --no-check-certificate -O - | tar -zxvf - +$ cd bergundy-libbeanstalkclient* +$ mkdir m4 +$ sudo ./autogen.sh +$ sudo echo "/usr/lib" >> /etc/ld.so.conf +$ sudo ldconfig 2.Install php-beanstalk -$wget https://github.com/nil-zhang/php-beanstalk/tarball/master --no-check-certificate -$mv master php-beanstalk.tar.gz -$tar -xzvf php-beanstalk.tar.gz -$cd php-beanstalk -$phpize -$./configure -$make -$sudo make install -$sudo vim /etc/php.d/beanstalk.ini - extension = "beanstalk.so" -$php -m + +$ wget https://github.com/nil-zhang/php-beanstalk/tarball/master --no-check-certificate -O - | tar -zxvf - +$ cd nil-zhang-php-beanstalk* +$ phpize +$ ./configure +$ make +$ sudo make install + +## PHP 5.3 on Ubuntu 12.04 +$ sudo echo 'extension = "beanstalk.so"' >> /etc/php5/conf.d/beanstalk.ini + +## PHP x.x (Unknown) +$ sudo echo 'extension = "beanstalk.so"' >> /etc/php.d/beanstalk.ini + +$ php -m 3.Using example + -----example.php---------- addserver("ip1", 11300); - $bsc->addserver("ip2", 11300); + $bsc->addserver($hostname = "127.0.0.1", $port = 11300, $weigth = 10); + // $bsc->addserver("ip2", 11300); $tubes = $bsc->list_tubes(); print_r($tubes);