Installation of PHP5 on Debian Etch running Plesk 8.2.0

Hello,

First of all please excuse my bad english. Its a bit rusty.

Today I will write a short description on how I installed PHP5 on Debian Etch running Plesk 8.2.0. I had a lot of trouble finding a solution online, but I managed to install it after all.

I got some help from some forums and from a friend (Thanks a lot to Beboo aka. Niklas).

For about a week ago I bought a dedicated server running Plesk 8.2.0 on Debian Etch. My problem was that Plesk 8.2.0 was installed with PHP4 (standard installation), but I wanted the new features in PHP5. I wanted PHP5 to be installed and I wanted it to work with Plesk aswell.

At first I logged on using a SSH-client. Is use PuTTY. Its a great SSH-client. Find it at http://www.putty.nl/.
After logging on through the SSH-client I switched (used the command “su”) to root. It is required you are logged on as root to make the next steps.

Step 1: Install Plesk PHP5 Configurator package
To get PHP5 to work properly with Plesk I downloaded the Plesk PHP5 Configurator package by writing the following in one line:

echo “deb http://autoinstall.plesk.com/debian/PSA_8.2.0 etch all” >> /etc/apt/sources.list && apt-get update

Step 2: Installing PHP5
After downloading the configurator packages for Plesk I installed PHP5 with the packages I needed. I did that by using apt-get:

apt-get install psa-php5-configurator php5 libapache2-mod-php5 php5-cli php5-common php5-curl php5-gd php5-imap php5-mysql

To make the installation more suidable for you, you can add and/or remove the packages you need for your own server. However do not remove the package “psa-php5-configurator” as it is the configurator for Plesk 8.2.0.

Step 3: Remove PHP4 from Apache configuration
Currently both PHP4 and PHP5 is installed in the Apache configuration. We need to change that. Write the following:

rm /etc/apache2/mods-enabled/php4*

Note that you can always re-add PHP4 to the Apache configuration. You do that from the “mods-available”-folder.

Step 4: Restart Apache
The last thing to do is just to restart the Apache web-server. You do that by writing:

/etc/init.d/apache2 restart

After step 4 you are finished installing PHP5 on your Debian Etch server running Plesk 8.2.0.
You can now upload a php-file containing the following code:
<?php
phpinfo();
?>

Then go to the php-file in your browser. The website should now tell you, that it is running PHP5.

Have a great day !

Tags: , , , , , , , , , , ,

Ingen kommentarer endnu.

Skriv en kommentar