安装php扩展
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装php扩展相关的知识,希望对你有一定的参考价值。
入职后第二个任务:安装php扩展:memcache,redis,imagick,magickwand,scws
#!/bin/bash #php扩展脚本 #Email:[email protected] #autor:fujinzhou #create time: 2016-11-29 #安装php-memecache扩展 wget https://pecl.php.net/get/memcache-3.0.8.tgz tar zxvf memcache-3.0.8.tgz && mv /usr/local/memcache cd /usr/local/memcache /usr/local/php/bin/phpize ./configure --enable-memcache --with-php-config=/usr/local/php/bin/php-config --with-zlib-dir make && make install #安装phpredis扩展 wget https://github.com/nicolasff/phpredis/archive/2.2.4.tar.gz tar -xf phpredis-2.2.4.tar.gz && cd phpredis-2.2.4 /usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config make && make install #安装imagick扩展 wget http://nchc.dl.sourceforge.net/project/imagemagick/old-sources/6.x/6.8/ImageMagick-6.8.9-10.tar.gz tar -xf ImageMagick-6.8.9-10.tar.gz cd ImageMagick-6.8.9-10 ./configure --prefix=/usr/local/imagemagick make && make install wget http://pecl.php.net/get/imagick-3.1.2.tgz cd imagick-3.1.2 /usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config --with-imagick=/usr/local/imagemagick/ make && make install #安装magickwand扩展 wget ftp://ftp.fifi.org/ImageMagick/php/releases/MagickWandForPHP-1.0.9-2.tar.gz tar -xf MagickWandForPHP-1.0.9-2.tar.gz cd MagickWandForPHP-1.0.9 /usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config --enable-shared --with-magickwand=/usr/local/imagemagick make && make install #安装scws扩展 wget http://www.ftphp.com/scws/down/scws-1.2.0.tar.bz2 tar -xjf scws-1.2.0.tar.bz2 cd scws-1.2.0 ./configure --prefix=/usr/local/scws make && make install cd phpext/ /usr/local/php/bin/phpize ./configure --with-scws=/usr/local/scws/ --with-php-config=/usr/local/php/bin/php-config make && make install #删除安装目录 rm phpredis-2.2.4 -rf rm ImageMagick-6.8.9-10 -rf rm imagick-3.1.2 -rf rm MagickWandForPHP-1.0.9 -rf rm scws-1.2.0 -rf ‘‘‘ [scws] extension = scws.so extension_dir = /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/ scws.default.charset = utf8 scws.default.fpath = /usr/local/scws/etc [redis] extension = redis.so extension_dir = /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/ [memcache] extension = memcache.so extension_dir = /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/ [imagick] extension = imagick.so extension_dir = /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/ [magickwand] extension = magickwand.so extension_dir = /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/ ‘‘‘
本文出自 “不抛弃!不放弃” 博客,请务必保留此出处http://thedream.blog.51cto.com/6427769/1878049
以上是关于安装php扩展的主要内容,如果未能解决你的问题,请参考以下文章
Mac php7安装mongodb扩展以适配使用mongo扩展的php旧版本代码