笑容传天下


在linux下自定义编译php的版本号、版本信息

原文: <a href="http://oo8h.com/news_646.html"> http://oo8h.com/news_646.html </a>

我在debian下,通过apt-get install php5 安装的 php5是 php5-5.2.0-8+etch1 这个特殊的版本号,而不是标准的 php5-5.2.0 这样的版本号码。在安装eAccelerator的时候遇到的问题,搜索很多资料都没有寻找到合适的解决方法。在自己常识修改php的源代码后,得到了解决。

原文: <a href="http://oo8h.com/news_646.html"> http://oo8h.com/news_646.html </a>

apt-get source php5 来获得php5的源代码,通过 ./configure 的方法来配置php5,准备编译。

配置完成后,修改 php的src所在目录下的 main/php_version.h 修改

longson@debian:~/vhosts/www$ cat /usr/src/php5-5.2.0/main/php_version.h
/* automatically generated by configure */
/* edit configure.in to change version number */
#define PHP_MAJOR_VERSION 5
#define PHP_MINOR_VERSION 2
#define PHP_RELEASE_VERSION 0
#define PHP_EXTRA_VERSION "-8+etch1"
#define PHP_VERSION "5.2.0-8+etch1"
#define PHP_VERSION_ID 50200

斜体部分为增加的内容,这样通过 make && make install

来编译出来的 php 就是我需要的版本。

然后通过 在 eAccelerator 目录下

phpize

./configure --with-eaccelerator-userid=www-data 来配置 eAccelerator

然后 make && make install

然后通过配置 php的 php.ini 就可以使用 eAccelerator 了。

当然,这个仅限于对 次版本号或后缀版本号的不同而无法正确安装eAccelerator的情况。

如果有其他的需要,自己酌情处理了。

关键字

linux debian apt-get install php5 php5-eaccelerator 版本号不同 无法安装 eaccelerator




历史存档

版权所有 2001年 - 2008年 笑容的八小时外   辽ICP备05000521号
本网站中所涉及的商标和注册商标,均由其持有人所有,相关内容均来自互联网发表或本网站作者创作;
创作部分采用 知识共享署名-非商业性使用 2.5 中国大陆许可协议进行许可。
  firefox 2
计数器