Last active
August 29, 2015 14:18
-
-
Save floodedcodeboy/1e158d720ed7c256262b to your computer and use it in GitHub Desktop.
basic LAMP install
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 | |
## setup a consolidated list of of apt-get installs | |
apt-get update | |
apt-get --yes --force-yes install python-software-properties python software-properties-common | |
echo 'mysql-server mysql-server/root_password select "xxxxxx"' | debconf-set-selections | |
echo 'mysql-server mysql-server/root_password_again select "xxxxxx"' | debconf-set-selections | |
apt-get --yes --force-yes install apache2 mysql-server-5.5 mysql-client php5 libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-mcrypt php-pear php5-curl php5-common php5-dev | |
a2enmod rewrite | |
php5enmod mcrypt | |
service apache2 reload | |
## Create DB ## | |
echo 'create database `db_name`' | /usr/bin/mysql -u root -pxxxxxx | |
## Composer ## | |
curl -sS https://getcomposer.org/installer | php | |
mv composer.phar /usr/local/bin/composer | |
## credit where its due --yes --force-yes taken from here : http://superuser.com/questions/164553/automatically-answer-yes-when-using-apt-get-install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment