Home>Article>Operation and Maintenance> How to install php ssh2 on centos

How to install php ssh2 on centos

藏色散人
藏色散人 Original
2021-05-27 09:33:30 3131browse

How to install php ssh2 on centos: 1. Install ssh2 dependencies through the "yum install libssh2 libssh2-devel" command; 2. Install ssh2 through the make command; 3. Edit php.ini and add the content "extension= ssh2.so"; 4. Restart php.

How to install php ssh2 on centos

The operating environment of this article: CentOS 7.2 system, PHP7.1 version, DELL G3 computer

centos7 Install php extension-ssh2

1. Install ssh2 dependencies

yum install libssh2 libssh2-devel

2. Install ssh2

First download ssh2 address: http://pecl.php.net/package/ssh2 v1 .0 The above is related to php7

wget http://pecl.php.net/get/ssh2-1.1.2.tgz tar zxvf ssh2-1.1.2.tgz cd ssh2-1.1.2 phpize ./configure make make test make install

After completing make install, an address will be returned:

[root@session113 ssh2-1.1.2]# make install Installing shared extensions: /usr/lib64/php/modules/

3. Edit php.ini

Add a line

extension=ssh2.so

4. Restart php

systemctl restart php-fpm php -m | grep ssh2

Recommended: "centos tutorial"

The above is the detailed content of How to install php ssh2 on centos. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn