Linux environment Installation SSH2 expansion module

Source: Internet
Author: User

Environment: Linux Environment (Centos or RedHat)

1. Confirm that the environment is installed PHP-5

# Rpm-qa|grep Php-5
Php-5.3.3-48.el6_8.x86_64

2, installation Ssh2 depends on the RPM package, such as the gray part of the display, the installation sequence can be installed according to the gray part of the time sequence to install:

RPM Command:

Query command: Rpm-qa|grep XXX

Install command: RPM-IVH xxx.rpm

Remove installed rpm:rpm-e xxx (XXX: Installed rpm name to remove)

Note: RPM package version to choose according to the original package version of the Linux system, when installing the RPM, if you encounter installation errors, prompted the lack of dependency, please check whether the RPM version is compliant or to see if the dependent package is installed.

The RPM packages required for installation are as follows:

Libssh2-devel-1.4.2-2.el6_7.1.x86_64
Openssl-devel-1.0.1e-48.el6_8.1.x86_64
Krb5-devel-1.10.3-57.el6.x86_64
Zlib-devel-1.2.3-29.el6.x86_64
Libcom_err-devel-1.41.12-22.el6.x86_64
Libselinux-devel-2.0.94-7.el6.x86_64
Libsepol-devel-2.0.41-4.el6.x86_64
Keyutils-libs-devel-1.4-5.el6.x86_64
Php-devel-5.3.3-48.el6_8.x86_64
Php-pear-1.9.4-5.el6.noarch
Automake-1.11.1-4.el6.noarch
Autoconf-2.63-5.1.el6.noarch

3, Installation Ssh2-0.13.tgz

First download SSH2 source package ssh2-0.13.tgz (different versions may cause the installation to fail)

# TAR-XVF Ssh2-0.13.tgz

# CD ssh2-0.13
# phpize
#./configure--PREFIX=/USR/LOCAL/SSH2
# make
# make Install

4, Ssh2 extension in the php.ini file appended

# Vi/etc/php.ini
Extension=ssh2.so
# Cat/etc/php.ini | grep Extension=ss
Extension=ssh2.so
#

5, SSH2 installation Successful confirmation

# Php-m | grep SSH2
Ssh2

# Php-i | grep SSH2
Registered PHP Streams = HTTPS, FTPs, Compress.zlib, Compress.bzip2, PHP, file, glob, data, HTTP, FTP, Ssh2.shell, SSH 2.exec, Ssh2.tunnel, SSH2.SCP, ssh2.sftp, Phar, zip
Libssh Version = libssh2/1.4.2
PHP Warning:Unknown:It is not safe for rely on the system ' s timezone settings. You is *required* to use the Date.timezone setting or the Date_default_timezone_set () function. In case you used any of those methods and you is still getting this warning, your most likely misspelled the timezone Iden Tifier. We selected ' UTC ' for ' gmt/0.0/no DST ' instead in Unknown on line 0
Ssh2
LIBSSH2 Version = 1.4.2
Banner = ssh-2.0-libssh2_1.4.2

Linux environment Installation SSH2 expansion module

Related Article

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.