Similar to MySQL (See our Installing MySQL Server on a Debian System guide), websites and applications alike, utilize PHP to deliver “on demand” information, to millions of people, in fractions of seconds.
“PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.” – PHP.net
Here again, Installing PHP5 has become “Old Hat” for people implementing content management systems (CMS), customer relationship management (CRM), publishing platforms and web template systems using PHP.
- At the Debian GNU/Linux w/ KDE Welcome Screen, chose the “Menu” option in the lower left part of the screen.
- In the Menu chose the “Console Login” option. (You Can also simply click ALT+N from the Debian GNU/Linux w/ KDE Welcome Screen, in place of the first two steps in this section. This is a shortcut to the Console or “CONSOLE MODE”.)
- At the Login prompt type: “root” and hit the [enter] key.
- Type in the Password of the “root” user and hit the [enter] key. You would have set this password up during installation. See our Installing Debian 4 on a PC guide.
- Then you will type the following code:
test:~# apt-get update
then press the [enter] key. This will download the latest, most up to date installation packages. Do not try to continue until it has completed the package header downloads.
- Once all the package headers have been downloaded, type:
test:~# apt-get install libapache2-mod-php5
then press the [enter] key to continue. You will be prompted about being sure. Hit the “Y” key and press the [enter] key to continue.
- Verify that the installation completed by looking at the last line of the installation script for “Forcing reload of web server (apache2)… waiting” .
- Again, this should leave you at the # Command Prompt.
Portions of this guide were taken from an article available online here.
Congratulations, you have installed the latest version of PHP5 for use with your web sites.