Home>Article>Backend Development> Install php extension under linux

Install php extension under linux

藏色散人
藏色散人 Original
2020-08-22 09:24:18 2463browse

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.

Install php extension under linux

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn