首页 > 代码库 > 安装php扩展
安装php扩展
入职后第二个任务:安装php扩展:memcache,redis,imagick,magickwand,scws
#!/bin/bash #php扩展脚本 #Email:1445675350@qq.com #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扩展
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。