Content –
1. Install Apache
2. Install MySQL
3. Install PHP
4. Restart Server
5. Test Apache
6. Test PHP
1. Install Apache:
Apache is a free open source and cross-platform web server software.To install apache, Open terminal and put in these commands line:
sudo apt-get update
sudo apt-get install apache2
2. Install MySQL:
MySQL is an open-source relational database management system. Its name is a combination of “My”, the name of co-founder Michael Widenius’s daughter, and “SQL”, the abbreviation for Structured Query Language.
To install MySQL, open terminal and put in these commands line:
sudo apt-get install mysql-server
3. Install PHP:
PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language.
To install PHP, open terminal and put in these commands line:
sudo apt-get install php5 libapache2-mod-php5
4. Restart Server
To restart server, open terminal and put this commands:
sudo /etc/init.d/apache2 restart
5. Test Apache :
Check Apache server is working fine.
Open a web browser and navigate to http://localhost/. You will see like this:
See Image:

6. Test PHP :
Check php installation is working fine .
Open terminal and put these commands:
php -r 'echo "\n\n Test PHP installation is working fine. \n\n\n";'
See Image:

it’s so nice for Ubuntu users!