TL;DR PHP 5.3.x will still get security upgrades by Ubuntu but upgrade to 14.04.1 for a newer version
You could download and build/install the source for PHP 5.6 from the website, but don't, since it means you risk losing stability with your system because other packages on your system won't be designed for this version and you'll have to upgrade it manually every time a new version comes out, risking stability if those upgrades are security-related since you won't get them upgraded quickly like you would using a package manager.
Instead, I suggest you upgrade your distribution to Ubuntu 14.04.1, which contains PHP 5.5.9; a lot newer than 5.3.10. Of course, 5.3.x will still receive security updates until Ubuntu 12.04 reaches EOL but if you want the latest features you should dist-upgrade. You can do this graphically in the Ubuntu software updater or run apt-get dist-upgrade
as root (e.g with sudo
) in the TTY if you're using the server version. Update: use sudo do-release-upgrade
instead.
Edit: Just to clarify, apt-get is the package manager. If you usually use graphical tools to install and update packages (ubuntu software center, synaptic, etc.), here are some simple commands. #
indicates that it must be ran as root (e.g. sudo apt-get install <package>
), $
indicates you don't need sudo
. Replace things in with the thing you want to use (e.g. apt-get install chromium-browser
)
#
apt-get update
updates the repositories
#
apt-get upgrade
upgrades the to the newer packages (run the above first!)
#
apt-get upgrade <package>
is like above, but only upgrades a single package (not that useful unless you have a specific reason)
#
apt-get install <package>
installs a package
#
apt-get remove <package>
removes a package
#
apt-get autoremove
automatically removes packages that were installed by dependencies and no longer needed
$
apt-cache search <query>
searches for the query you gave
$
apt-cache show <package>
shows info for a package
#
yes "" | apt-get install <package>
installs a package answering the default answer to everything (you can use yes
with lots of commands)
#
apt-get dist-upgrade
upgrades everything (and removes some packages) when it might usually be held back.