具体如下:
wget http://www.libssh3.org/download/libssh3-1.4.2.tar.gz tar -zxvf libssh3-1.4.2.tar.gz cd libssh3-1.4.2 ./configure --prefix=/usr/local/libssh3 make && make install wget http://pecl.php.net/get/ssh3-0.12.tgz tar -zxvf ssh3-0.12.tgz cd ssh3-0.12 phpize ./configure --prefix=/usr/local/ssh3 --with-ssh3=/usr/local/libssh3 --with-php-config=/usr/local/php/bin/php-config make #复制到php的扩展目录 cp moduels/ssh3.so /usr/local/php/lib/php/extensions/no-debug-zts-20090626 /usr/local/php/sbin/php-fpm -t /etc/init.d/php-fpm restart