编译安装 PHP 5.3.3 通过 

最近php 5.3.x 分支发布了5.3.3版本.而我现在的vps还是在用5.3.3-dev版,存在不少已知的bug,看来是时候会升级了.

下载php 5.3.3 源码包,解压,进入目录

依然还是要以fastcgi形式跑php,所以必须把php-fpm编译进来。不过这次我不需要再去从SVN里面签出php-fpm了,因为从5.3.3正式版开始,php-fpm 已经被内置了.

下面是我的configure:
[root@PowerPC php-5.3.3]# ./configure \
> --prefix=/usr/local/php \
> --exec-prefix=/usr/local \
> --sysconfdir=/etc/sysconfig \
> --localstatedir=/var \
> --enable-fpm \ #启用php-fpm
> --with-fpm-user=http \
> --with-fpm-group=web \
> --with-config-file-path=/etc \
> --disable-ipv6 \
> --with-openssl \
> --with-pcre-regex \
> --with-zlib \
> --with-bz2 \
> --enable-calendar \
> --with-curl \
> --enable-dba=shared \
> --enable-exif \
> --enable-ftp \
> --with-gd \
> --enable-gd-native-ttf \
> --with-mhash \
> --with-imap \
> --with-kerberos \
> --with-imap-ssl \
> --enable-intl \
> --with-ldap \
> --enable-mbstring \
> --with-mcrypt \
> --with-mysql \
> --with-mysql-sock \
> --with-mysqli \
> --enable-soap \
> --enable-sockets \
> --enable-wddx \
> --with-xmlrpc \
> --with-xsl \
> --enable-zip \
> --with-pear \
> --enable-zend-multibyte

检查依赖,缺什么自己用yum search 一下,安装即可.

如果报 configure: warning: lemon versions supported for regeneration of libsqlite parsers: 1.0 (found: none) 这样的错的话,
可以通过以下方法解决:

wget http://www.sqlite.org/cvstrac/getfile/sqlite/tool/lemon.c
gcc -o lemon lemon.c
mv lemon /usr/local/bin/ 即可.

如果是rpm安装的mysql的话,可能还会找不到libmysqlclient.so 文件,复制到程序搜索的目录即可.

之后,make && make install.
时间会相当的长,要等一等.

完了之后,php 就安装好了.

运行php -v 查看版本:
PHP 5.3.3 (cli) (built: Jul 31 2010 11:37:19)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

再看一下php-fpm的信息:
[root@PowerPC php-5.3.3]# php-fpm -v
PHP 5.3.3 (fpm-fcgi) (built: Jul 31 2010 11:36:42)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

看起来一切正常.

再复制源码包下的php.ini-development 文件至/etc 下,并改名为php.ini .
修改/etc/sysconfig/php-fpm.conf.default 文件,并改名为php-fpm.conf.

这下配置就算完成了.

重启cherokee,一切完成.

注:发现discuz! 7.2 在 php 5.3.3 下面挂了,phpwind 正常,wordpress 正常,phpmyadmin 正常……
[ ] ( 2167 次浏览 ) 永久链接 ( 3 / 2396 )

<< <上一页 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 下一页> >>