0

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.

2 Answers 2

1

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/

6
  • 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? Commented Jul 12, 2012 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. Commented Jul 12, 2012 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. Commented Jul 12, 2012 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. Commented Jul 12, 2012 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 Commented Jul 12, 2012 at 18:40
0

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).

1
  • 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? Commented Jul 12, 2012 at 17:12

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.