XAMPP安装SSH2扩展

来源:互联网 发布:Windows的tmp路径 编辑:程序博客网 时间:2024/06/09 16:22

XAMPP安装SSH2扩展

wget http://pecl.php.net/get/ssh2-0.11.3.tgztar -xf ssh2-0.11.3.tgzcd 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

就没问题了

makemake installcd /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
看到这样就没问题了。

0 0
原创粉丝点击