How to install pecl extension in php: First open the terminal command window; then enter and execute the command "sudo yum install php-dev php-pear autoconf, automake, libtool -y" to install pecl.
Pecl's full name is The PHP Extension Community Library, a PHP community extension library, written and maintained by the community. The convenience of using pecl is that we don’t need to search for source code packages to download, compile and configure. We don’t need to manually phpize, configure, make, make install. The module installation path is automatically identified. We only need to edit the php.ini configuration file to enable the extension. Of course, we also need When configuring some parameters yourself, you can download the source code first and then build it
Recommended: "PHP Tutorial"
Install pecl
Apt
➜ sudo apt-get install php-dev php-pear autoconf,automake,libtool -y
Yum
➜ sudo yum install php-dev php-pear autoconf,automake,libtool -y
pecl common commands
build 从C的源码中构建扩展 install 安装一个包,步骤包含(configure,make,make install) download 下载源码包 list-all 列出全部包 run-tests 运行测试(make test)
pecl --help
Install MongoDB extension
➜ sudo pecl install mongodb
Configure PHP.ini
Redhat
extension=mongodb.so
Debian/Ubuntu
sudo vim /etc/php/7.0/mods-available/mongodb.ini
; configuration for php mongodb module ; priority=20 extension=mongodb.so
Zend extension
zend_extension=opcache.so
➜ sudo phpenmod mongodb
Confirm whether the installation is successful
➜ php -m | grep mongodb mongodb
The above is the detailed content of How to install pecl extension in php. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

Dreamweaver Mac version
Visual web development tools

SublimeText3 Chinese version
Chinese version, very easy to use

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 English version
Recommended: Win version, supports code prompts!
