找回密码
 立即注册

只需一扫,快速开始

QQ登录

只需一步,快速开始

搜索
查看: 19033|回复: 0

[运营经验] centos6.5 64位编译安装php5.3

[复制链接]

8万

主题

431

回帖

9万

积分

管理员

积分
94384
QQ
发表于 2015-11-26 17:36:41 | 显示全部楼层 |阅读模式
额、由于新版本php对某源码支持不是很好,降级到php5.3

说明一下,mysql驱动是用的php自带的,性能更好。并且减少安装依赖。推荐此方式。 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd   5.3几哦,版本意思支持。
  1. ./configure --prefix=/usr/local/php53 --enable-fastcgi --enable-zip --enable-fpm --enable-gd-native-ttf --with-config-file-path=/usr/local/php53/etc --with-config-file-scan-dir=/usr/local/php53/etc/php.d --with-bz2 --with-curl --with-libxml-dir --with-gd --with-jpeg-dir --with-freetype-dir --with-png-dir --with-mcrypt --with-mhash --enable-mbstring --with-kerberos --with-gettext --enable-bcmath   --with-sqlite --enable-pdo  --with-openssl --enable-ftp --with-pear --with-zlib --enable-inline-optimization --enable-calendar --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-mysql-sock=/var/lib/mysql/mysql.sock
复制代码


有一个报错。
make: *** [sapi/fpm/php-fpm] Error 1
  1. make ZEND_EXTRA_LIBS='-liconv'
复制代码
如发生报错
configure: error: freetype-config not found
  1. yum install freetype-devel
复制代码



找到Makefile文件,在EXTRA_LIBS最后添加-lresolv
  1. EXTRA_LIBS = -lcrypt -lz -lcrypt -lrt -lmcrypt -lltdl -lfreetype -lpng -lz -ljpeg -lcurl -lbz2 -lz -lrt -lm -ldl -lnsl -lrt -lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lcurl -lxml2 -lz -lm -lssl -lcrypto -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lresolv -lresolv
复制代码


然后就是编译成功的提示了。
  1. Installing PHP SAPI module:       fpm
  2. Installing PHP CLI binary:        /usr/local/php53/bin/
  3. Installing PHP CLI man page:      /usr/local/php53/man/man1/
  4. Installing PHP FPM binary:        /usr/local/php53/sbin/
  5. Installing PHP FPM config:        /usr/local/php53/etc/
  6. Installing PHP FPM man page:      /usr/local/php53/man/man8/
  7. Installing PHP FPM status page:      /usr/local/php53/share/php/fpm/
  8. Installing build environment:     /usr/local/php53/lib/php/build/
  9. Installing header files:          /usr/local/php53/include/php/
  10. Installing helper programs:       /usr/local/php53/bin/
  11.   program: phpize
  12.   program: php-config
  13. Installing man pages:             /usr/local/php53/man/man1/
  14.   page: phpize.1
  15.   page: php-config.1
  16. Installing PEAR environment:      /usr/local/php53/lib/php/
复制代码




回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册   

本版积分规则

QQ|Archiver|手机版|小黑屋|站秘书 ( 蜀ICP备15034504号-3 )

GMT+8, 2024-4-26 14:07 , Processed in 0.087059 second(s), 40 queries .

Powered by Discuz! X3.5

Copyright © 2001-2024 Tencent Cloud.

快速回复 返回顶部 返回列表