The example in this article describes how PHP installs SSH2 extensions. Share to everyone for your reference, specific as follows:
wget http://www.libssh2.org/download/libssh2-1.4.2.tar.gz
tar-zxvf libssh2-1.4.2.tar.gz
cd libssh2-1.4.2
./configure--prefix=/usr/local/libssh2 make
&& make install
wget http://pecl.php.net/get/ Ssh2-0.12.tgz
tar-zxvf ssh2-0.12.tgz
cd ssh2-0.12 phpize./configure--prefix=/usr/local/ssh2
-- With-ssh2=/usr/local/libssh2--with-php-config=/usr/local/php/bin/php-config
make
#复制到php的扩展目录
CP moduels/ssh2.so/usr/local/php/lib/php/extensions/no-debug-zts-20090626
/usr/local/php/sbin/php-fpm-t
/etc/init.d/php-fpm Restart
More about PHP Interested readers can view the site topics: "PHP object-oriented Program Design Introductory Course", "PHP Mathematical Arithmetic Skills summary", "PHP Array" operation Skills Encyclopedia, "PHP Data structure and algorithm tutorial", "PHP Programming Algorithm Summary", " PHP Regular Expression Usage summary and "PHP Common database Operation Skills Summary"
I hope this article will help you with the PHP program design.