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 have a dev machine with Ubuntu 12.04. I installed AMP by following directions from http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-ubuntu-12.04-lts-lamp.

Will it work if I download PHP5.4 source code and compile it? Will it break packages such as php5-tidy, php5-xmlrpc, etc, etc?

Is this the best way to upgrade and maintain PHP?

Is there a good book for learning web server maintenance?

Thanks in advance.

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

You're probably better off in the Ubuntu world using a PPA (Personal Package Archive) to install a package not in the official repos.

http://www.mellzamora.com/installing-php5-4-apache2-and-mysql-on-ubuntu-linux/

share|improve this answer
    
I researched PPA and they seem to be maintained by individuals. Can I jump back to Ubuntu packages if the PPA is abandoned? Also, the directions only show a use case where PHP is not installed. Will this be a problem? –  ryy Jul 12 '12 at 16:54
    
I think the idea is that they are maintained by individuals, yes. You can make your own to add your own packages to ubuntu. –  Falcon Momot Jul 12 '12 at 17:29
    
Because it's a package it's trivial to remove it and go back to the official ones. I don't know how it will differ between systems with or without PHP already installed -- I would test it on a non-production box first. –  silmaril8n Jul 12 '12 at 18:09
    
Ok I tried the PPA. It upgraded PHP and everything seems to be working (so far). Can you guys recommend a good book for web server management? I feel that I can't be a better programmer until I understand server management. –  ryy Jul 12 '12 at 18:36
    
That's a pretty broad subject, but I think the de facto standard GNU/Linux book is: UNIX and Linux System Administration Handbook –  silmaril8n Jul 12 '12 at 18:40
show 1 more comment

You can compile it from source if you want. Doing so won't break anything. Installing it is likely to, as distributions tend to change the paths make install installs to, and they also (usually) test that particular versions work as dependencies. You may have to compile other packages against the new PHP.

If you are using ubuntu, I find it is usually better to wait for ubuntu to release the new PHP as a package, because ubuntu-izing things can be a bit painful (I wouldn't want to test it on a production server, for instance).

share|improve this answer
    
So to clarify, compiling will replace the PHP 5.3. However, since it may get installed in a different directory other packages that rely on PHP such as php5-xmlrpc may not work. Am I getting this right? –  ryy Jul 12 '12 at 17:12
add comment

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.