php安装pecl

xiaohai 2021-04-19 21:05:34 2101人围观 标签: PHP  php 
简介在使用PHP的过程中,我们经常需要安装一些php的扩展,但是如果每次都用phpize感觉还是非常麻烦,所以我们可以将pecl安装好,然后用pecl就可以非常简单快速的安装php扩展了。

1、首先检查是否安装了pecl,那么进入到php的安装目录下的bin目录进行查看

[root@localhost bin]# ll total 146140 lrwxrwxrwx 1 root root 9 Jan 19 19:47 phar -> phar.phar -rwxr-xr-x 1 root root 14894 Jan 19 19:47 phar.phar -rwxr-xr-x 1 root root 49563808 Jan 19 19:47 php -rwxr-xr-x 1 root root 49413632 Jan 19 19:47 php-cgi -rwxr-xr-x 1 root root 2786 Jan 19 19:47 php-config -rwxr-xr-x 1 root root 50635864 Jan 19 19:47 phpdbg -rwxr-xr-x 1 root root 4534 Jan 19 19:47 phpize

2、下载go-pear.phar

[root@localhost bin]# wget http://pear.php.net/go-pear.phar -O go-pear.php

3、执行安装命令

go go-pear.phar

4、查看

[root@localhost bin]# ll total 149692 -rw-r--r-- 1 root root 3621204 Apr 20 2020 go-pear.php -rwxr-xr-x 1 root root 856 Apr 19 21:06 pear -rwxr-xr-x 1 root root 877 Apr 19 21:06 peardev -rwxr-xr-x 1 root root 790 Apr 19 21:06 pecl lrwxrwxrwx 1 root root 9 Jan 19 19:47 phar -> phar.phar -rwxr-xr-x 1 root root 14894 Jan 19 19:47 phar.phar -rwxr-xr-x 1 root root 49563808 Jan 19 19:47 php -rwxr-xr-x 1 root root 49413632 Jan 19 19:47 php-cgi -rwxr-xr-x 1 root root 2786 Jan 19 19:47 php-config -rwxr-xr-x 1 root root 50635864 Jan 19 19:47 phpdbg -rwxr-xr-x 1 root root 4534 Jan 19 19:47 phpize