PHP Open SSH2

Source: Internet
Author: User

First, two packages are required to install the SSH2 extension for PHP.Libssh2 and Ssh2 (php pecl extension). The latest versions of the two are libssh2-1.5.0.tar.gz and ssh2-0.12.tgz, respectively, http://www.libssh2.org/download/and HTTP://PECL.PHP.NET/PACKAGE/SSH2. Next, unzip and installLibssh2 and Ssh2. Among them, Libssh2 need to install first, SSH2 after installation. The installation steps are as follows:
# TAR-ZXVF libssh2-1.4. 2 . tar.gz# CD LIBSSH2-1.4. 2 # . /configure--prefix=/usr/local/&& make install
The above is to install the LIBSSH2, here need to remember LIBSSH2 installation directory, because in the installation of SSH2 will be used.
 # Locate Phpize 
#/usr/local/php/bin/phpize
# TAR-ZXVF Ssh2-0.12 Span style= "color: #000000;" >.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

Edit php.ini File Information

" /usr/local/php/lib/php/extensions/no-debug-zts-20131226/ " extension=mongo.soextension=redis.soextension=memcache.soextension=  Xcache.soextension=ssh2.so   //Add new information

Restart Apache

PHP Open SSH2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.