1

I'm looking for the easiest and most sane way of installing the latest version of apache (currently 2.4.4) and PHP (currently 5.4.13) on CENTOS 6.4 (x64) and I've run into no end of issues.

If I use yum with the default repositories the latest version available is 2.2.15 (which seems to have been released Mar 2010) 3 years ago. Really? I want a three year old web server on my brand new server?

So I next looked at building from source - which I was able to do but when I finished installing I wanted to test uninstalling so I did a "make uninstall" and was greeted with a message make: *** No rule to make target `uninstall'.

Great so I can't uninstall it in an automated manner to upgrade later on? Additionally when I went to build PHP from source I was faced with dependency after dependency. I proceeded with installing one by one until I eventually gave up. This doesn't seem like a reasonable approach - no option to uninstall - never-ending dependencies.

I next looked at alternative repositories like REMI - it seems REMI offers PHP5.4.13 it requires apache 2.2.15 You'll get a message stating Requires: httpd-mmn = 20051115 (which is apparently part of Apache 2.2.15

I next looked at building my own RPM from source. (At least that way I could easily uninstall them.) That worked fairly well - initially. I was able to easily build an RPM of apache, and with a little effort I was able to tweak PHP to look for apache 2.4.13 but after I do that I'm still prompted with an error that php54 requires Requires: libcurl.so.3()(64bit). I seem to have curl and libcurl, libcurl-devel installed.

At this point I'm frustrated - there has to be an easier way to get an updated Apache and PHP stack without this craziness. How are other admins doing this? Is there some secret way of doing this that I'm not aware of? Or is everyone just running really old versions of Apache and PHP and ignoring that they're riddled with security holes?

2
  • 4
    They're not riddled with security holes. Red Hat backports all the security patches. Mar 22, 2013 at 16:21
  • Question - how does that work. Presumably if I do a yum update that is going to install said security patches? But how do I move from apache 2.2 to apache 2.4 in the future?
    – Brad
    Mar 22, 2013 at 17:17

3 Answers 3

5

First off, the security patches are backported to the stable versions that RH settles on, there are not holes just because the version is not the latest.

Second, if you require php 5.4.13, have a look at the IUS repositories, and maybe give a go at compiling your own apache2.4 if you just have to have it.

Most times, unless you specifically require a certain feature of the software, people "make do" with the versions that RH/CentOS provide, due to their stability, the fact that they are thoroughly tested, and any security holes are patched without breaking compatibility (like the upgrade from 2.2 to 2.4 does).

6
  • 1
    When I install my own apache and then try to use the IUS (or REMI) repository to install PHP I get Error: Package: php54-5.4.13-1.ius.el5.x86_64 (ius) Requires: httpd-mmn = 20051115 Installed: httpd-2.4.4-1.x86_64 (@/httpd-2.4.4-1.x86_64) httpd-mmn = 20120211 Available: httpd-2.2.15-26.el6.centos.x86_64 (base) httpd-mmn = 20051115 Error: Package: php54-common-5.4.13-1.ius.el5.x86_64 (ius) Requires: libcurl.so.3()(64bit)
    – Brad
    Mar 22, 2013 at 17:03
  • Install curl-devel to get rid of the libcurl error. Then try adding --skip-broken to your yum statement to skip the httpd-mmn error (or install the version of httpd that it wants as well).
    – NickW
    Mar 22, 2013 at 17:11
  • Thanks for the through response - I'm going to have to give some thought as to how I want to proceed. There are some enhancements supposedly in Apache 2.4.x but I also need something easy and reliable to maintain. Per my above post to Michael - presumably yum update will patch apache 2.2 but then how in the future will I go from apache 2.2 to 2.4? Especially since as I understand that is a "breaking" change?
    – Brad
    Mar 22, 2013 at 17:20
  • You'll be able to get to 2.4 when RH decides to release a version offering that. They tend towards a conservative approach, so it might not be an immediate thing. You could use Fedora 18, as that has apache 2.4 available as an rpm now, as Fedora is more of a bleeding edge type of distribution..
    – NickW
    Mar 22, 2013 at 17:25
  • So at some point I'll do a yum update and it will upgrade me from Apache 2.2 to Apache 2.4 automatically? Per Remi here: forums.famillecollet.com/viewtopic.php?id=1868 "I don't plan to provide http 2.4 as its configuration is not compatible with 2.2 one (thus, will break updates)." So I'm curious how that sort of thing has been handled in the past. Is yum going to auto-magically handled that for me? Or are users prompted to uninstall and re-install apache or hows that work?
    – Brad
    Mar 22, 2013 at 17:33
2

Seriously contemplate NickW's final paragraph. Nothwithstanding, XAMPP may suit your needs, with Apache 2.4.3 and PHP 5.4.7. http://www.apachefriends.org/en/xampp-linux.html

1
  • Interesting - thanks for the link although I cringe as in several places it states: XAMPP is not meant for production use but only for developers in a development environment. The way XAMPP is configured is to be open as possible. For development environments this is great but in a production environment it could be fatal. To fix most of the security weaknesses simply call the following command: /opt/lampp/lampp security Yikes - I'll be running this in production so I'm not sure I want to fix "most" of the security issues :)
    – Brad
    Mar 22, 2013 at 17:10
2

Consider seriously that if you use self-compiled software, you are responsible to keep up with security fixes and whatnot. Any breakage due to being forced to move to the next version will be your problem, with little help available.

Using some third party repositories can trample on the versions of software your distribution handles, and end up with a mess that can't be updated sanely.

2
  • These are all serious points that I also cringe at. Maybe the best solution is to simply accept what the base yum repository gives me. I was concerned that I'd be leaving my systems insecure but I take from NickW's comments that is not the case. At the same time I believe there are performance enhancements in the latest versions - but maybe I'll just have to forgo that.
    – Brad
    Mar 22, 2013 at 17:13
  • 1
    Of course there may be performance enhancements and also new functions in later versions, but you should know that if you want to run bleeding edge versions of everything, CentOS is probably the wrong distribution for you. CentOS is an Enterprise distribution derived from RHEL, Packages usually do have quite old versions until they're considered stable. They get all the security patches from upstream, but if you want to always have the latest version of everything, you should consider switching to something else (Fedora, Gentoo, ArchLinux or even Ubuntu).
    – etagenklo
    Mar 22, 2013 at 22:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .