Created
October 30, 2014 10:43
-
-
Save kazoo0217/6b64e575f0874378c947 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
## Auto Install Sequence and configuration for LAMP ## | |
# update packages | |
apt-get update >/dev/null 2>&1 | |
# edit password | |
MYSQL_PASSWORD="password" | |
# install mysql | |
echo "mysql-server-5.5 mysql-server/root_password password $MYSQL_PASSWORD" | debconf-set-selections | |
echo "mysql-server-5.5 mysql-server/root_password_again password $MYSQL_PASSWORD" | debconf-set-selections | |
apt-get -y install mysql-client mysql-server >/dev/null 2>&1 | |
# install http server, php5, mysql | |
apt-get -y install apache2 php5 libapache2-mod-php5 php5-mysql >/dev/null 2>&1 | |
# Enable mod_rewrite | |
a2enmod rewrite | |
# restart apache2 | |
service apache2 restart | |
# Set DocumentRoot | |
rm -rf /var/www/html | |
ln -fs /vagrant /var/www/html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment