简体   繁体   English

Apache 2.2.20 + PHP 5.2.6安装

[英]Apache 2.2.20 + PHP 5.2.6 installation

I need to install PHP 5.2.6 on Apache 2.2.20 (UBUNTU 11.10) (local server). 我需要在Apache 2.2.20(UBUNTU 11.10)(本地服务器)上安装PHP 5.2.6。
I've already install Apache, now I want to install PHP but there is a problem : 我已经安装了Apache,现在我想安装PHP,但是有一个问题:

I've downloaded php-5.2.6.tar.gz, gunzip it, tar -xvf it, then in the instructions, I've to run ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql , but I don't have dir named apxs. 我已经下载了php-5.2.6.tar.gz,将其Gunzip gunzip ,将tar -xvf ,然后在说明中运行./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql ,但是我没有名为apxs的目录。
So I've tried to run ./configure --with-mysql , it's works. 所以我试着运行./configure --with-mysql ,它是可行的。
Finally, I've to run make and make install in my php-5.2.6 folder, but I've an error : 最后,我必须在php-5.2.6文件夹中运行makemake install ,但是出现错误:
make: *** Pas de cibles spécifiées et aucun makefile n'a été trouvé. Arrêt.
(In english : ~ there is no makefile. stop) (用英语:〜没有makefile。停止)


Please help ! 请帮忙 ! I really need this version of PHP, is there something wrong in my steps ? 我真的需要这个版本的PHP,我的步骤有问题吗? Is there a better way to install PHP 5.2.6 on Apache 2.2.20 ? 有没有更好的方法在Apache 2.2.20上安装PHP 5.2.6?
Thanks. 谢谢。

If you have installed apache2-threaded-dev the apxs are not part of the package, you need to uninstall it and install prefork to have apxs2 : 如果您已经安装了apache2-threaded-dev,那么apxs并不是该软件包的一部分,您需要将其卸载并安装prefork才能拥有apxs2:

sudo apt-get remove apache2-threaded-dev
sudo apt-get install apache2-prefork-dev

That should do the trick. 这应该够了吧。 Then just do your standard PHP compile. 然后只需执行标准的PHP编译即可。 Not even sure you need to specify apxs2 folder to PHP. 甚至不确定您是否需要为PHP指定apxs2文件夹。

If you get the "aucun makefile n'a été trouvé" error, that means your ./configure failed. 如果收到“ aucun makefile n'aététrouvé”错误,则表示您的./configure失败。 If so, please copy the last lines of your ./configure here. 如果是这样,请在此处复制./configure的最后几行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM