-
Notifications
You must be signed in to change notification settings - Fork 1
Install ssh2, libpssh and pssh extension
Ilyas Salikhov edited this page Feb 11, 2014
·
5 revisions
Instructions for CentOS/RedHat. All commands require root rights.
libpssh requires patched by Badoo version of libssh2.
yum install libtoolize
cd /usr/local/src
git clone https://github.com/badoo/libssh2
cd libssh2/
./buildconf
./configure
make
make installlibpssh requires libevent version 2 or higher.
Check version of libevent:
yum list installed | grep libeventInstallation of libevent:
cd /usr/local/src/
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar xfz libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure
make
make installInstallation of libpssh:
cd /usr/local/src/
git clone https://github.com/badoo/libpssh
cd libpssh/
./autogen.sh
./configure --with-event=/usr/local
make
make installgit clone https://github.com/badoo/pssh_extension
cd pssh_extension/
phpize
./configure
make
make installInclude extension in PHP. Add
cat > /etc/php.d/pssh.inivalues
extension=pssh.so
Check extension including:
$ php -v
PHP 5.5.5 (cli) (built: Oct 27 2013 13:14:07)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend TechnologiesYou can get message if you include php extensions pssh and curl simultaneously:
$ php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pssh.so' - /usr/local/lib/libpssh.so.1: undefined symbol: libssh2_session_last_io in Unknown on line 0
PHP 5.5.5 (cli) (built: Oct 27 2013 13:14:07)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend TechnologiesExtension curl includes standard libssh2 before pssh which uses patched libssh2. Solution described here.
Simple way is deleting of curl extension. But if you really need curl you can rebuild libcurl without ssh support.