PHP安装pecl

宝塔PHP7.4并没有pecl,安装如下

cd ~
wget http://pear.php.net/go-pear.phar
php go-pear.phar

#显示如下
Below is a suggested file layout for your new PEAR installation.To
 change individual locations, type the number in front of the
 directory.  Type 'all' to change all of them or simply press Enter to
 accept these locations.
1. Installation base ($prefix)                   : /www/server/php/74
2. Temporary directory for processing            : /tmp/pear/install
3. Temporary directory for downloads             : /tmp/pear/install
4. Binaries directory                            : /www/server/php/74/bin
5. PHP code directory ($php_dir)                 : /www/server/php/74/share/pear
6. Documentation directory                       : /www/server/php/74/docs
7. Data directory                                : /www/server/php/74/data
8. User-modifiable configuration files directory : /www/server/php/74/cfg
9. Public Web Files directory                    : /www/server/php/74/www
10. System manual pages directory                 : /www/server/php/74/man
11. Tests directory                               : /www/server/php/74/tests
12. Name of configuration file                    :/www/server/php/74/etc/pear.conf
1-12, 'all' or Enter to continue:

#可能会有报错,报错内容与函数禁用有关,根据报错提示将相应的函数解禁即可
#如果没有意外的话,上述路径会指定你安装PHP的位置,无需修改,直接回车,然后根据提示yes,再回车即安装成功。