Install apache2 on debian 7.0
Open the terminal and run the following command
# apt-get install apache2
This will install apache2 webserver.To check if Apache is installed on your server, direct your browser to your server’s IP address. The page should display the words “It works!”
Install mysql database on debian 7.0
Open the terminal and run the following command
#apt-get install mysql-server
During the installation, MySQL will ask you to set a root password.
After mysql server installation run the following command from your terminal
#mysql_secure_installation
This program enables you to improve the security of your MySQL installation in the following ways:
You can set a password for root accounts.
You can remove root accounts that are accessible from outside the local host.
You can remove anonymous-user accounts.
You can remove the test database (which by default can be accessed by all users, even anonymous users), and privileges that permit anyone to access databases with names that start with test_.
Install PHP5 on debian 7.0
Open the terminal and run the following command
# apt-get install php5 php-pear php5-mysql
After completing php installation you need to restart apache2 webserver using the following command
#service apache2 restart
Test PHP on your server
You need to create test php file
#vi /var/www/info.php
Add the following lines
<?php
phpinfo();
?>
Save and exit the file
You can run following command from your browser
http://serverip/info.php