Run the below command in terminal:
wget --no-cache -O - https://gist.github.com/EmpireWorld/737fbb9f403d4dd66dee1364d866ba7e/raw/install-lamp.sh | bashFirst off, run the below command to update package index:
sudo apt updateThen run these commands in terminal separately to install each component:
Apache
sudo apt install apache2MySQL
sudo apt install mysql-serverPHP
sudo apt install php php-mysql libapache2-mod-php php-cliAdjust Firewall
sudo ufw allow in "Apache Full"Adjust permissions
sudo chmod -R 0755 /var/www/html/Allow running Apache on boot up
sudo systemctl enable apache2Start Apache server
sudo systemctl start apache2Test Apache
xdg-open "http://localhost"Create sample PHP script file
sudo echo "<?php phpinfo(); ?>" > /var/www/html/info.phpRun sample PHP script file
xdg-open "http://localhost/info.php"Run the below command in terminal to install phpMyAdmin and it's prerequisites:
sudo apt install phpmyadmin php-mbstring php-gettextAnd then enable required extensions:
sudo phpenmod mcrypt
sudo phpenmod mbstringThen restart Apache server:
sudo systemctl restart apache2Now navigate to the phpMyAdmin:
xdg-open "http://localhost"All done. now you have Apache2, MySQL, PHP installed.
Made with ❤️ by Bayat
works like a charm ;) thank you