Skip to content

Instantly share code, notes, and snippets.

@itshaadi
Created September 21, 2016 10:25
Show Gist options
  • Save itshaadi/eab3a0f24f58a3ae92da74dc2d12b0f9 to your computer and use it in GitHub Desktop.
Save itshaadi/eab3a0f24f58a3ae92da74dc2d12b0f9 to your computer and use it in GitHub Desktop.
I have prepared the following shell script to make LAMP installation fully automated.
#!/bin/bash
if [ "`lsb_release -is`" == "Ubuntu" ] || [ "`lsb_release -is`" == "Debian" ]
then
sudo apt-get -y install mysql-server mysql-client mysql-workbench libmysqld-dev;
sudo apt-get -y install apache2 php5 libapache2-mod-php5 php5-mcrypt phpmyadmin;
sudo chmod 777 -R /var/www/;
sudo printf "<?php\nphpinfo();\n?>" > /var/www/html/info.php;
sudo service apache2 restart;
else
echo "Unsupported Operating System";
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment