寶塔面板安裝SSH2拓展教程
第一步:
首先安裝寶塔面板
寶塔面板安裝需要注意,PHP的環(huán)境必須選擇編譯安裝.(其他的隨意)
PHP版本推薦5.3雖然版本比較落后,但是做頁(yè)端的API接口這個(gè)版本是最穩(wěn)定的.
環(huán)境安裝好后我們進(jìn)入第二步
第二步:
復(fù)制下面指令登陸服務(wù)器直接粘貼回車(chē)執(zhí)行
yum?install?-y?libssh2.x86_64?php-pecl-ssh2.x86_64
yum?install?-y?openssl
yum?install?-y?openssl-devel
wget?https://www.libssh2.org/download/libssh2-1.8.0.tar.gz
wget?https://pecl.php.net/get/ssh2-0.13.tgz
tar?-zxvf?libssh2-1.8.0.tar.gz
cd?libssh2-1.8.0
./configure?--prefix=/usr/local/libssh2
make?&&?make?install
cd
tar?-zxvf?ssh2-0.13.tgz
cd?ssh2-0.13
/www/server/php/53/bin/phpize
./configure?--prefix=/usr/local/ssh2?--with-ssh2=/usr/local/libssh2?--with-php-config=/www/server/php/53/bin/php-config
make?&&?make?install
這里我設(shè)置的以5.3為例,如果不懂,請(qǐng)不要換其他php.
原文地址:https://www.baiyaodao.com/post/91.html