Home >Backend Development >PHP Problem >Install php extension under linux
How to install PHP extension under Linux: 1. Use the [pecl install xxxx (extension)] command to install the PHP extension; 2. Compile and install the PHP extension through the [make && make install] command.
Recommended: "PHP Video Tutorial"
PHP extension installation in Linux environment
1. Use pecl and pear tools to install PHP extensions
pecl install xxxx(扩展名)
2. Compile and install method
#php源码中的ext目录下含有一些常用的扩展 #举例安装一个mysqli扩展 cd /root/php-7.1.9/ext/mysqli phpize ./configure --with-php-config=/usr/local/php/bin/php-config make && make install #tip #有些扩展会提示 config0.m4 不存在,一般是因为m4文件命名问题 #如果源码中没有你要的扩展,比如redis扩展在ext目录下不存在,直接使用pecl install安装,如果pecl安装失败,百度一下吧(github)
The above is the detailed content of Install php extension under linux. For more information, please follow other related articles on the PHP Chinese website!