在Ubuntu 12.04上安装Apache 2.4和PHP 5.5 [英] Installing apache 2.4 and php 5.5 on ubuntu 12.04

查看:71
本文介绍了在Ubuntu 12.04上安装Apache 2.4和PHP 5.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在ubuntu 12.04的虚拟机上使用apache 2.4和php 5.5设置测试环境,第一件事是添加存储库

I'm trying to set a test enviroment with apache 2.4 and php 5.5 on a vm with ubuntu 12.04, fist thing is to add the repositories

apt-add-repository ppa:ptn107/apache
apt-add-repository ppa:ondrej/php5

然后安装apache 2.4

Then installing apache 2.4

apt-get install apache2-mpm-worker

检查apache版本:

checking apache version:

# apache2 -v
Server version: Apache/2.4.6 (Ubuntu)
Server built:   Sep 23 2013 07:23:34

安装PHP 5.5

apt-get install php5-common php5-mysqlnd php5-xmlrpc php5-curl php5-gd php5-cli php5-fpm php-pear php5-dev php5-imap php5-mcrypt

检查php版本

php -v
PHP 5.5.8-3+sury.org~precise+1 (cli) (built: Jan 24 2014 10:15:11) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
     with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies

所以一切似乎都好,这是我需要mod_fastcgi但无法安装:

So everyting seems ok the thing is I need mod_fastcgi but can't be installed:

apt-get install libapache2-mod-fastcgi
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you haverequested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libapache2-mod-fastcgi : Depends: apache2.2-common (>= 2.2.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

因此,如果无法启用mod_fastcgi,如何使用php-fpm运行php文件?有什么我想念的吗?

So if mod_fastcgi can't be enabled how can I run php files with php-fpm ? Is there something I'm missing ?

推荐答案

您可以从此处安装fastcgi mod和apache2,并确认它可以正常工作. https://launchpad.net/~ondrej/+archive/apache2?field .series_filter = precise

You can install the fastcgi mod and apache2 from here, verified that it works on my end. https://launchpad.net/~ondrej/+archive/apache2?field.series_filter=precise

这篇关于在Ubuntu 12.04上安装Apache 2.4和PHP 5.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆