Rasmus lerdorf created PHP which was designed to create dynamic web pages and it was created in 1995.PHP is computer scripting language and is now capable to include a command line interface.It can also be used in a standalone graphical application.It is released under the PHP licence and it can be installed on most of the web servers including most of the operating systems and platforms.Another plus point is it can be installed free of charge as it is a free open source software.Due to all these benefits PHP is very flexible and is a very good software to help you to build a website.As it is free and can be installed on most of the operating systems it is possible for you to install it on your dedicated server quite easily by the following steps :-
First step is to find the source codes and the following link will help you for this purpose.What you need to do is get the source codes for the PHP package and then you have to compile the package from scratch here, and, while there are also binary packages available for some distributions, I find your end results are usually better when building each package for your machine. Make sure you get the source files.The current version available is 5.2.6 :-
LINK: http://www.php.net/downloads.php
Current Version available – 5.2.6
So I hope that you have got the source codes.Now the installation begins…
The first thing you have to do for the installing PHP is to extract the sourcecodes so that you will be able to work with the files included in them.for this you will be working as root to Begin,for this you will have to open a terminal window and change to the directory in which you saved your downloaded files and become root by issuing the su command.After this enter the root password and you will be able to go.
Type the following command to get the source codes….
#tar -zxf php-5.2.6.tar.gz (enter)
The commands above will extract the sourcecodes into the directory.
Change into the PHP source directory as follows;
Compiling PHP :-
Once the prompt comes type the following command ;
#make (enter)
Wait for the time till you have the prompt.After getting the prompt you will have to give the following command ;
#make install (enter)
Once the install finishes and you have the prompt type the following command;
#cp php.ini-recommended /usr/local/php/lib/php.ini (enter)
Then edit the file;
#vi /usr/local/php/lib/php.ini (enter)
And edit the following;
Find the doc_root section and enter the correct path for the directory which serves your web content, such as ;
Then find the file_uploads section and change it to reflect the following;
file_uploads=Off
(for security reasons)
Now you have done it.
Testing –
You can check whether your work is done or not with the help of the following :-
Using vi create a file called test.php;
#vi test.php
Add the following line to the file;
<?php phpinfo(); ?>
Save the file, then fire up your browser and point it to localhost/test.php
I hope this has helped and you have sucessfully installed PHP on your dedicated server.


















