本文实例讲述了php安装ssh2扩展的方法。分享给大家供大家参考,具体如下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
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 |
希望本文所述对大家PHP程序设计有所帮助。