yum安装php编译拓展

版权声明:未经允许,不得转载 https://blog.csdn.net/wanchaopeng/article/details/84870175

1.安装mcrypt拓展

1.1 yum安装依赖包

yum install libmcrypt libmcrypt-devel mcrypt mhash

1.2 下载mcrypt的tar包

wget  http://pecl.php.net/get/mcrypt-1.0.1.tgz

tar xf mcrypt-1.0.1.tgz

cd mcrypt-1.0.1

1.3 编译安装 mcrypt

phpize

./configure --with-php-config=/usr/bin/php-config

make && make install

1.4 在php.ini加上扩展 重启

extension=mcrypt.so   #保存

systemctl restart php-fpm

2.安装imagick拓展

2.1安装 ImageMagick

wget http://www.imagemagick.org/download/ImageMagick.tar.gz  #下载

tar xf ImageMagick.tar.gz

cd ImageMagick-7.0.8-15

./configure --prefix=/usr/local/imagemagick

make -j 4 && make install

2.2 安装 imagick

wget http://pecl.php.net/get/imagick-3.4.3.tgz

tar xf imagick-3.4.3.tgz

cd imagick-3.4.3

phpize

./configure  --with-php-config=/usr/bin/php-config --with-imagick=/usr/local/imagemagick/

make -j 4 && make install

echo $? 

vim /etc/php.ini

extension=imagick.so

systemctl restart php-fpm

3.  msgpack

wget https://pecl.php.net/get/msgpack-2.0.2.tgz

tar xvf msgpack-2.0.2.tgz

cd msgpack-2.0.2/

phpize

./configure --with-php-config=/usr/bin/php-config

make && make install

vim /etc/php.ini

extension=msgpack.so

systemctl restart php-fpm

4. php-redis

4.1 下载tar包 解压

wget https://codeload.github.com/phpredis/phpredis/zip/develop

unzip develop

cd phpredis-develop

#yum -y install php-devel   #安装phpize模块

phpize

./configure --with-php-config=/usr/bin/php-config

make -j 4 && make install

vim /etc/php.ini

extension=redis.so

systemctl restart php-fpm

5 yaf安装

wget http://pecl.php.net/get/yaf-3.0.7.tgz

tar xf yaf-3.0.7.tgz

cd yaf-3.0.7.tgz

phpize

 ./configure --with-php-config=/usr/bin/php-config

make && make install

vim /etc/php.ini

extension=yaf.so

5.1 yaf在php.ini中的配置

[yaf]
yaf.environ="product"
yaf.library="/Users/mac/cloud/php/phplib"
yaf.cache_con_config=0
yaf.name_suffix=0
yaf.name_separator="_"
yaf.st_compatible=1
yaf.action_prefer=1
yaf.forward_limit=5
yaf.lowcase_path=1
yaf.use_namespace=0
yaf.use_spl_autoload=1

6. xdebug安装

6.1 获取 解压 

wget http://www.xdebug.org/files/xdebug-2.3.3.tgz 

tar zxvf xdebug-2.3.3.tgz

cd xdebug-2.3.3

6.2 编译安装

phpize

./configure --enable-xdebug --with-php-config=/usr/bin/php-config

make -j 8 && make install 

6.3 在php.ini添加xdebug模块

vim /etc/php.ini

extension=xdebug.so

6.4 在php.ini添加配置信息

[Xdebug]
xdebug.remote_enable = 1   //开启远程调试
xdebug.remote_host = 172.17.73.130 //远程ip地址抑或是本机地址
xdebug.remote_port = 9001  //远程IDE服务器监听端口
xdebug.remote_handler=DBGP  //使用的协议

猜你喜欢

转载自blog.csdn.net/wanchaopeng/article/details/84870175