IT星球论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 231|回复: 0

PHP5.3.3源代码编译安装(Linux CentOS 5.5)

[复制链接]

50

主题

0

好友

248

积分

IT初级专家

Rank: 3Rank: 3

升级  16%

发表于 2015-9-29 18:01:58 |显示全部楼层
PHP5.3.3源代码编译安装(linux Centos 5.5)
  1. #1. install libs needed
  2. yum -y install libevent libevent-devel
  3. yum -y install libxml2 libxml2-devel
  4. yum -y install libmcrypt libmcrypt-devel
  5. yum -y install curl-devel
  6. yum -y install libpng-devel
  7. yum -y install libtool-ltdl-devel

  8. #2. create user and group for fpm(fastcgi process manager)
  9. groupadd fpm
  10. useradd --shell /sbin/nologin -g fpm fpm

  11. #3. download, configure and install php5.3.3
  12. wget http://www.php.net/distributions/php-5.3.3.tar.gz
  13. tar zxvf php-5.3.3.tar.gz
  14. cd php-5.3.3

  15. ./configure --prefix=/usr/local/php \
  16.             --enable-fpm \
  17.             --with-fpm-user=fpm \
  18.             --with-fpm-group=fpm \
  19.             --with-MySQL=mysqlnd \
  20.             --with-mysqli=mysqlnd \
  21.             --with-pdo-mysql=mysqlnd \
  22.             --without-pdo-SQLite \
  23.             --without-sqlite3 \
  24.             --without-sqlite \
  25.             --with-mysql-sock=/tmp/mysql.sock \
  26.             --with-curl \
  27.             --enable-mbstring \
  28.             --with-mhash \
  29.             --with-mcrypt \
  30.             --with-openssl \
  31.             --with-gd \
  32.             --enable-sockets \
  33.             --with-gettext \
  34.             --with-zlib \
  35.             --enable-zip \
  36.             --enable-soap \
  37.             --with-xmlrpc

  38. make && make install

  39. #4. install apc
  40. #5. install memcached
复制代码
编译安装PHP5.3.3过程中出现的错误,及解决办法
错误: configure: error: libevent >= 1.4.11 could not be found

2解决: yum -y install libevent libevent-devel



1错误: configure: error: xml2-config not found. Please check your libxml2 installation.

2解决: yum -y install libxml2 libxml2-devel



1错误: configure: error: mcrypt.h not found. Please reinstall libmcrypt.

2解决: yum install libmcrypt libmcrypt-devel



1错误: configure: error: Please reinstall the libcurl distribution -

2      easy.h should be in <curl-dir>/include/curl/

3解决: yum -y install curl-devel

4</curl-dir>



1错误: If configure fails try --with-jpeg-dir=

2      configure: error: libpng.(a|so) not found.

3解决: yum -y install libpng-devel



1错误: /usr/bin/ld: cannot find -lltdl

2      collect2: ld returned 1 exit status

3解决: yum -y install libtool-ltdl-devel



PHP5.3.3源代码编译安装(Linux CentOS 5.5)
http://www.sqlstudy.com/article/php-5-3-3-compile-install-under-linux-centos-5.html
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

回顶部