PHP 开启 ssh2
# tar -zxvf libssh2-1.4.2.tar.gz # cd libssh2-1.4.2 # ./configure --prefix=/usr/local/libssh2 # make && make install
# locate phpize
# /usr/local/php/bin/phpize
# tar -zxvf ssh2-0.12.tgz # cd ssh2-0.12 # /usr/local/php/bin/phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
# locate php-config
/usr/local/php/bin/php-config # ./configure --prefix=/usr/local/ssh2 --with-ssh2=/usr/local/libssh2 --with-php-config=/usr/local/php/bin/php-config # make
# make install
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-zts-20131226/
/usr/local/php/lib/php/extensions/no-debug-zts-20131226# ls
memcache.so mongo.so opcache.so redis.so ssh2.so xcache.so
编辑php.ini文件信息
extension_dir = "/usr/local/php/lib/php/extensions/no-debug-zts-20131226/" extension=mongo.so extension=redis.so extension=memcache.so extension=xcache.so extension=ssh2.so //添加新的信息
重启apache
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。