Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've installed apache2 on my ubuntu machine using the apt-get package manager. It installed apache 2.2.16. I'd like to upgrade to the latest (or at least a newer version) of apache2 but apt-get upgrade and update don't seem to find a newer version. When I type

apt-get install -s apache2

It tells me

apache2 is already the newest version.

Do I need to download this package manually? Is there a reason to not do this?

Here is the version of Ubuntu I am running:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.10
DISTRIB_CODENAME=maverick
DISTRIB_DESCRIPTION="Ubuntu 10.10"
share|improve this question
1  
Why do you need a newer version? What feature do you require? –  Zoredache Feb 23 '12 at 18:37
    
possible duplicate of Best (easiest) way to update Ubuntu to Apache version 2.2.17? –  Shane Madden Feb 23 '12 at 19:09

2 Answers 2

up vote 2 down vote accepted

When using package repositories, you're at the mercy of the repository managers for upgrades. In the vast majority of cases, this is a very good thing, as they do a lot of testing on packages and interactions between packages before releasing a new revision into the repo. This prevents you from shooting yourself in the foot in many ways.

If you really need bleeding-edge versions, you'll need to either install from source (not recommended) or find a third-party repository that has more recent versions (though by doing this, you're moving "off-script" and will be more likely to run into bugs or odd interactions between packages).

share|improve this answer
    
It should also be noted that the packager may not change the version number on the package, but may still be applying security/bug fixes. If the OP is concerned about some security hole that's fixed in a later Apache version (e.g., some auditor raised a red flag on the seemingly out of date package), he probably shouldn't worry, as Ubuntu has likely patched it. The OP should check the the package change logs for the problem he's concerned about. –  cjc Feb 23 '12 at 22:30
    
@cjc - good point. –  EEAA Feb 23 '12 at 22:33
    
thanks @ErikA and cjc for the info. this is kind of what i suspected and you guessed it right that this was the result of an audit that stated a dos vulnerability was patched in a more recent version of apache. so it sounds like even though the apache package may have version number e.g. 2.2.16, it may actually be 2.2.16 but with a few additional security patches in some cases? did i understand that right? –  Emile Baizel Feb 24 '12 at 19:49
    
@EmileBaizel - yep, you got it! –  EEAA Feb 24 '12 at 20:39
    
great. thanks @ErikA. one more question, is there a way to see what patches have been applied to the package? for example, can i see if a Denial of Service patch available in 2.2.18 was made on the Ubuntu Apache 2.2.16 package? –  Emile Baizel Feb 26 '12 at 19:48

Well, it's been a while since I used Ubuntu, I now use Kubuntu. Assuming you really really need the very latest version because some feature is missing from what you already have.

I believe under under software sources on the updates tab there is an option to turn on pre-release updates (your's would show maverick instead of lucid). So click on that, apply it and do an apt-get update.

Software Sources

Alternatively, I think you can also edit /etc/apt/sources.list directly and follow the comments. In mine I can uncomment a couple of lines to get those repositories (which is what the tick box in the dialog shown would do).

If that doesn't get you the latest build, you could also download the apache sources yourself and compile them. You may need to apt-get install gcc and apt-get install g++ and anything else it depends on. However, you'll be on your own when it comes to maintaining. To upgrade you'll have to compile from sources all over again.

Compilation is not that hard. It's usually just a matter of doing something like:

cd /path/to/apache2/sources
./configure
make
sudo make install

There may be some options you'd want to supply to ./configure. ./configure --help shows them. But read the apache compilation documentation before you start. Again, assuming you really really need the very latest version and you're prepared to go down this route.

And despite the comment below. The above will work fine. See: compiling for the impatient. http://httpd.apache.org/docs/2.0/install.html

share|improve this answer
1  
There's a lot more complexity and headaches than you let on to building from source. –  EEAA Feb 23 '12 at 18:43
    
I've built apache before. It's not that hard. –  Matt Feb 23 '12 at 18:47
2  
You also have development library dependencies to resolve, conflicts with where other packages think binaries should be, compiling/linking in other modules (mod_php5, mod_perl, etc.). For a linux beginner (which I strongly guess the OP is), compiling from source is not a good recommendation. –  EEAA Feb 23 '12 at 18:54
    
The building isn't hard. It is the management that is hard. –  Mark Wagner Feb 23 '12 at 18:58
    
EriKa - Actually, unless you're building a production server I would just use packages. If you really want to learn then jump right in and compile it yourself. After all that's what you suggested on your own answer! You learn more by trying than just playing it safe and never venturing out. –  Matt Feb 23 '12 at 19:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.