php扩展安装合集

1.php redis扩展安装

cd /usr/local/src
wget https://github.com/phpredis/phpredis/archive/3.1.6.tar.gz
tar -zxvf 3.1.6.tar.gz
cd phpredis-3.1.6/
/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config
make
make install

2.php yaf扩展安装

cd /usr/local/src/
wget http://pecl.php.net/get/yaf-3.0.6.tgz
tar -zxvf yaf-3.0.6.tgz
cd yaf-3.0.6
/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config
make
make install

3.php fastdfs扩展安装

cd /usr/local/src/
wget https://github.com/happyfish100/fastdfs/archive/V5.11.tar.gz
tar -zxvf V5.11.tar.gz
cd fastdfs-5.11/php_client
/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config
make && make install

4.php swoole扩展安装

cd /usr/local/src/
wget http://pecl.php.net/get/swoole-1.10.1.tgz   
tar -zxvf swoole-1.10.1.tgz
cd swoole-1.10.1
/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config
make && make install

php -m | grep swoole

 5.php mcrypt扩展安装

cd /usr/local/src
wget  http://pecl.php.net/get/mcrypt-1.0.1.tgz
tar xf mcrypt-1.0.1.tgz
cd mcrypt-1.0.1
/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config
make && make instal

 6.php pdo_mysql扩展安装

cd /usr/local/src/php-7.2.2/ext/pdo_mysql/
/usr/local/php-7.2.2/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config
make
make install

vim /usr/local/php7/lib/php.ini
extension = pdo_mysql.so
/etc/init.d/php7-fpm restart

 

posted @ 2018-02-09 11:46  sunmmi  阅读(126)  评论(0)    收藏  举报