mac os 10.9 Mavericks 自带php安装扩展 -by Lenix

mac os 10.9 Mavericks  自带php安装扩展()

安装gmp扩展------------

下载 https://gmplib.org/download/gmp/gmp-5.1.3.tar.bz2,网站https://gmplib.org/

411 cd /Users/yangyanbin/Downloads/gmp-5.1.3; clear; pwd
412 ./configure
413 make
414 make install
下载php源码 http://ar2.php.net/distributions/php-5.4.24.tar.gz,网站http://cn2.php.net/get/php-5.4.24.tar.gz/from/a/mirror

430 cd /Users/yangyanbin/Downloads/php-5.4.24/ext/gmp; clear; pwd
431 phpize
432 ./configure
433 make
435 sudo make install
436 sudo apachectl restart
gmp扩展安装完成。

安装mcrypt扩展------------
下载 libmcrypt-2.5.8 :http://jaist.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.bz2,网站http://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.bz2/download

440 cd /Users/yangyanbin/Downloads/libmcrypt-2.5.8; clear; pwd
441 ./configure --disable-posix-threads
442 make
443 sudo make install
444 cd /Users/yangyanbin/Downloads/php-5.4.24/ext/mcrypt; clear; pwd
445 phpize
446 ./configure
447 make
448 sudo make install
449 sudo apachectl restart
mcrypt扩展安装完成。
安装intl扩展--------------
需要icu库,下载http://download.icu-project.org/files/icu4c/52.1/icu4c-52_1-src.tgz,网站http://download.icu-project.org/files/icu4c/52.1/

455 cd /Users/yangyanbin/Downloads/icu/source; clear; pwd
456 ./configure
457 make
458 sudo make install
459 cd /Users/yangyanbin/Downloads/php-5.4.24/ext/intl; clear; pwd
460 phpize
462 ./configure
463 make
465 sudo make install
466 sudo apachectl restart

intl扩展安装完成。

安装imap扩展-------------
下载 ftp://ftp.cac.washington.edu/mail/imap.tar.Z,

467 cd /Users/yangyanbin/Downloads/imap-2007f; clear; pwd
468 make osx
469 mkdir include
470 ln -s c-client include
471 mkdir lib
472 cd lib
473 ln -s ../c-client/c-client.a libc-client.a
474 cd /Users/yangyanbin/Downloads/imap-2007f/; clear; pwd
483 cp c-client/*.c lib/
484 cp c-client/*.h include/
485 cp c-client/c-client.a lib/libc-client.a

486 cd /Users/yangyanbin/Downloads/php-5.4.24/ext/imap; clear; pwd
487 phpize
495 ./configure --with-imap=/Users/yangyanbin/Downloads/imap-2007f --with-kerberos --with-imap-ssl
496 make
498 sudo make install
499 sudo apachectl restart
imap扩展安装完成。
注:每个扩展完成时,记得在php.ini 里加入下面的语句

extension=/usr/lib/php/extensions/no-debug-non-zts-20100525/gmp.so
extension=/usr/lib/php/extensions/no-debug-non-zts-20100525/imap.so
extension=/usr/lib/php/extensions/no-debug-non-zts-20100525/mcrypt.so
extension=/usr/lib/php/extensions/no-debug-non-zts-20100525/intl.so
然后再重启apache!才能生效。
All OK!!!!!!!!!

作者:lenix

转载请注册来自lenix的博客。http://blog.p2hp.com

 

mac os 10.9 Mavericks 自带php安装扩展 -by Lenix
标签: