Created
June 20, 2019 00:32
-
-
Save Domin8-IPTV/698964194faf5002277150673657f49d to your computer and use it in GitHub Desktop.
ubuntu lamp install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Instructions to use this script | |
# | |
#chmod +x lamp.sh | |
# | |
#sudo ./lamp.sh | |
echo "###################################################################################" | |
echo "Please be Patient: Installation will start now....... It may take some time :)" | |
echo "###################################################################################" | |
#PHP7 PPA | |
sudo apt-get install python-software-properties | |
sudo add-apt-repository ppa:ondrej/php | |
#Update the repositories | |
sudo apt-get update | |
#Apache, Php, MySQL and required packages installation | |
sudo apt-get -y install apache2 php7.0 libapache2-mod-php7.0 php7.0-mcrypt php7.0-curl php7.0-mysql php7.0-gd php7.0-cli php7.0-dev mysql-client | |
php7.0enmod mcrypt | |
#The following commands set the MySQL root password to MYPASSWORD123 when you install the mysql-server package. | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password MYPASSWORD123' | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password MYPASSWORD123' | |
sudo apt-get -y install mysql-server | |
#Restart all the installed services to verify that everything is installed properly | |
echo -e "\n" | |
service apache2 restart && service mysql restart > /dev/null | |
echo -e "\n" | |
php -v | |
if [ $? -ne 0 ]; then | |
echo "Please Check the Install Services, There is some $(tput bold)$(tput setaf 1)Problem$(tput sgr0)" | |
else | |
echo "Installed Services run $(tput bold)$(tput setaf 2)Sucessfully$(tput sgr0)" | |
fi | |
echo -e "\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment