PHP extension installation process

################ There are extensions under the ext of the php source code################

1. Find the php source directory
cd /home/likang/php-7.3.10

2. Jump to the ext in the source directory [This directory contains the php extension]
cd ext

3. Jump to the specified directory [CURL. Dependent class library libcurl yum install libcurl】
cd curl

4. Use the phpize file to generate the configure file
/usr/local/php/bin/phpize

Configuring for:
	PHP Api Version:         20180731
	Zend Module Api No:      20180731
	Zend Extension Api No:   320180731

5、检测配置
./configure --with-php-config=/usr/local/php/bin/php-config

6, compile
make

7, compile and install
make install

8. Modify php.ini to
find the configuration block of extension extension, add a line
extension=curl

9、重启php-fpm
[root@VM_0_5_centos etc]# killall php-fpm
[root@VM_0_5_centos etc]# /usr/local/php/sbin/php-fpm

################ There is no extension under the ext of the php source code################

1. Open the php extension download path [Redis]
pecl.php.net

2. Click download, find the corresponding extension, click to download
wget http://pecl.php.net/get/redis-5.1.0RC1.tgz

3. Unzip the installation package

tar -xvf redis-5.1.0RC1.tgz

4. To install the extension, refer to the above

Guess you like

Origin blog.csdn.net/weixin_44900765/article/details/106398386