XAMPP安装SSH2扩展

前端之家收集整理的这篇文章主要介绍了XAMPP安装SSH2扩展前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

XAMPP安装SSH2扩展

wget http://pecl.PHP.net/get/ssh2-0.11.3.tgz
tar -xf ssh2-0.11.3.tgz
cd ssh2-0.11.3/
/opt/lampp/bin/PHPize

报错
cannot find autoconf. please check your autoconf installation Xampp in CentOS

需要安装

yum install autoconf

再次

/opt/lampp/bin/PHPize
./configure  --with-PHP-config=/opt/lampp/bin/PHP-config

报错,缺少libssh2
需要安装

yum install libssh2-devel

再次

./configure  --with-PHP-config=/opt/lampp/bin/PHP-config

报错,缺少c
需要安装

yum install gcc

再次

./configure  --with-PHP-config=/opt/lampp/bin/PHP-config

就没问题了

make
make install
cd /opt/lampp/lib/PHP/extensions/no-debug-non-zts-20121212/
ls -al ssh*
vi /opt/lampp/etc/PHP.ini

增加
extension=”ssh2.so”

重启

/opt/lampp/lampp restart
/opt/lampp/bin/PHP -i | grep ssh2

[root@VM_68_206_centos ~]# /opt/lampp/bin/PHP -i | grep ssh2 Registered PHP Streams => https,ftps,compress.zlib,compress.bzip2,PHP,file,glob,data,http,ftp,phar,zip,ssh2.shell,ssh2.exec,ssh2.tunnel,ssh2.scp,ssh2.sftp ssh2 libssh2 version => 1.4.3 banner => SSH-2.0-libssh2_1.4.3 看到这样就没问题了。

原文链接:https://www.f2er.com/centos/377861.html

猜你在找的CentOS相关文章