Created
October 13, 2018 19:58
-
-
Save gurkanakdeniz/7c36dbc32aa87a0008b94df13a02a8e8 to your computer and use it in GitHub Desktop.
LAMP install script for Debian or Ubuntu
This file contains 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 | |
echo "running" | |
apt-get update | |
apt-get install -y -qq apache2 | |
apt-get install -y -qq php7.0 | |
:>/etc/apache2/mods-available/dir.conf | |
echo "<IfModule mod_dir.c> | |
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm | |
</IfModule>" > /etc/apache2/mods-available/dir.conf | |
apt-get install -y -qq php7.0-cli | |
apt-get install libapache2-mod-php7.0 | |
a2enmod ssl | |
a2enmod rewrite | |
a2enmod suexec | |
a2enmod include | |
systemctl restart apache2 | |
echo "you will need to set root password for mysql" | |
apt-get install -y -qq mysql-server | |
apt-get install -y -qq php7.0-mysql | |
apt-get install -y -qq php-mysql | |
stty -echo | |
echo "Mysql pass(not view)" | |
read password | |
stty echo | |
systemctl restart apache2 | |
echo "finish" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment