Install SSH2 extension for PHP on RHEL/CentOS 7

Spread the love
Update and install the necessary packages
#  yum update
#  yum install  make gcc  libssh2  php-devel php-pearlibssh2-devel
#  pecl install -f ssh2
Once the package has been installed in your system, we need to configure the extension to PHP (php.ini  or ssh2.ini)
# echo “” >  /etc/php.d/ssh2.ini
# echo “”  > /etc/php.ini
Finally restart your web server
# service restart httpd.service
Now, check the module whether is configure with PHP,
# php -m | grep ssh2
Also can  check in your phpinfo();

Leave a Reply

Your email address will not be published. Required fields are marked *