Install LAMP [All Latest Versions] On UBUNTU 16.04

Below is collective list of All Commands in one shot, to deploy LAMP on Ubuntu.  The pure collection of commands gives better understanding of task in hand :

  1. sandip@Satellite-X205:~$ sudo apt-get update
     
  2. sandip@Satellite-X205:~$ sudo apt-get upgrade
     
  3. sandip@Satellite-X205:~$ sudo apt-get install apache2
     
  4. sandip@Satellite-X205:~$ sudo apt-get install mysql
     
  5. sandip@Satellite-X205:~$ sudo apt-get update
     
  6. sandip@Satellite-X205:~$ sudo apt-get install mysql-server
     
  7. sandip@Satellite-X205:~$ systemctl status mysql.service
     
  8. sandip@Satellite-X205:~$ sudo apache2ctl configtest
     
  9. sandip@Satellite-X205:~$ sudo nano /etc/apache2/apache2.conf
     
  10. sandip@Satellite-X205:~$ sudo apt-get install curl
     
  11. sandip@Satellite-X205:~$ curl http://icanhazip.com
     
  12. sandip@Satellite-X205:~$ ping localhost
     
  13. sandip@Satellite-X205:~$ sudo nano /etc/apache2/apache2.conf
     
  14. sandip@Satellite-X205:~$ sudo apache2ctl configtest
     
  15. sandip@Satellite-X205:~$ sudo systemctl restart apache2
     
  16. sandip@Satellite-X205:~$ sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql
     
  17. sandip@Satellite-X205:~$ sudo nano /etc/apache2/mods-enabled/dir.conf
     
  18. sandip@Satellite-X205:~$ sudo systemctl restart apache2
     
  19. sandip@Satellite-X205:~$ sudo systemctl status apache2
     
  20. sandip@Satellite-X205:~$ sudo nano /var/www/html/info.php
     
  21. sandip@Satellite-X205:~$ sudo apt-get update
     
  22. sandip@Satellite-X205:~$ sudo apt-get install phpmyadmin php-mbstring php-gettext
     
  23. sandip@Satellite-X205:~$ sudo phpenmod mcrypt
     
  24. sandip@Satellite-X205:~$ sudo phpenmod mbstring
     
  25. sandip@Satellite-X205:~$ sudo systemctl status apache2
     
  26. sandip@Satellite-X205:~$ sudo systemctl restart apache2
     
  27. sandip@Satellite-X205:~$ sudo nano /etc/apache2/conf-available/phpmyadmin.conf
     
  28. sandip@Satellite-X205:~$ sudo systemctl restart apache2
     
  29. sandip@Satellite-X205:~$ sudo nano /etc/phpmyadmin/apache.conf
     
  30. sandip@Satellite-X205:~$ sudo nano /etc/apache2/apache2.conf
     
  31. sandip@Satellite-X205:~$ sudo systemctl restart apache2
     
  32. sandip@Satellite-X205:~$ sudo service apache2 restart
     
  33. sandip@Satellite-X205:~$ sudo nano /etc/phpmyadmin/config.inc.php
     
  34. sandip@Satellite-X205:~$ sudo systemctl restart apache2
     
  35. sandip@Satellite-X205:~$ sudo mysql -u root
     
  36. mysql> create user 'sandip'@'localhost' identified by '';
     
  37. mysql> grant all privileges on *.* to 'sandip'@'localhost';
     
  38. sandip@Satellite-X205:~$ sudo service mysql restart

Voila ! You're all Set with basic commands to install LAMP on Ubuntu !! 

Add new comment