-
-
Save aquarion/d7e5ed04c425b54e4b35 to your computer and use it in GitHub Desktop.
Vagrant provisioning script
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 | |
apt-get update -q | |
export DEBIAN_FRONTEND=noninteractive | |
# ## Aquarion's piece of mind setup | |
apt-get install -q -y vim curl | |
# ## Apache Setup | |
apt-get install -q -y apache2 libapache2-mod-php5 php5-json php5-xdebug php5-mysqlnd mysql-server-5.5 mysql-client-5.5 | |
a2enmod rewrite | |
ln -fs /vagrant /var/www/larpme | |
cp /vagrant/etc/apache_dev.conf /etc/apache2/sites-available/larpme | |
a2ensite larpme | |
a2dissite default | |
service apache2 restart | |
# ## Mysql Setup | |
# #debconf-set-selections <<< 'mysql-server mysql-server/root_password password $PASSWORD' | |
# #debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password $PASSWORD' | |
export PASSWORD=Secret_password | |
mysqladmin -u root password $PASSWORD | |
echo "create database larpme;" | mysql -uroot -p$PASSWORD | |
echo "grant all on larpme.* to webapp@localhost identified by 'webapp'" | mysql -uroot -p$PASSWORD | |
cat /vagrant/db_schema/schema.sql | mysql -uwebapp -pwebapp larpme | |
cat /vagrant/db_schema/data.sql | mysql -uwebapp -pwebapp larpme |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment