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.
Installation base ($prefix) : /www/server/php/74
Temporary directory for processing : /tmp/pear/install
Temporary directory for downloads : /tmp/pear/install
Binaries directory : /www/server/php/74/bin
PHP code directory ($php_dir) : /www/server/php/74/share/pear
Documentation directory : /www/server/php/74/docs
Data directory : /www/server/php/74/data
User-modifiable configuration files directory : /www/server/php/74/cfg
Public WEB Files directory : /www/server/php/74/www
System manual pages directory : /www/server/php/74/man
Tests directory : /www/server/php/74/tests
Name of configuration file : /www/server/php/74/etc/pear.conf
1-12, 'all' or Enter to continue:
一路回车,出现y/n的地方y就行了
安装扩展
sudo pecl install seaslog
Build process completed successfully
Installing '/www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/seaslog.so'
install ok: channel://pecl.php.net/SeasLog-2.2.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=seaslog.so" to php.ini
等待即可安装完成,然后自己配置到php.int里
sudo pecl install amqp
这里你会遇到问题,无非就是你还没安装rabbitmq的原因
先安装rabbitmq服务端,这时候你发现还是安装不上。
这时候你需要安装这个
sudo apt install librabbitmq-dev
安装完成后再执行 “sudo pecl install amqp”即可
75772 920 -rwxr-xr-x 1 root root 939192 Oct 10 11:40 /tmp/pear/install/pear-build-rootHHKBHi/install-amqp-2.1.0/www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/amqp.so
Build process completed successfully
Installing '/www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/amqp.so'
install ok: channel://pecl.php.net/amqp-2.1.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=amqp.so" to php.ini