How To Install Linux, Apache, MySQL, PHP on Ubuntu 18.04 LAMP TECH

  1. Install Linux OS in the system
  2. Install Apache

$ sudo apt-get install apache2

$ sudo apt update

go to browser -> enter the IP address or localhost

  1. Install PHP

$ sudo apt install php libapache2-mod-php php-mysql

$ sudo nano /etc/apache2/mods-enabled/dir.conf

Change the following index.php in to first place.
<IfModule mod_dir.c>
    DirectoryIndex index.php index.html index.cgi index.xhtml index.htm

$ sudo systemctl restart apache2

  1. Install MySQL

$ sudo apt-get install MySQL