-
-
Save safoorsafdar/ee7f7809df67230c84cc to your computer and use it in GitHub Desktop.
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 | |
# from https://www.howtoforge.com/tutorial/vagrant-ubuntu-linux-apache-mysql-php-lamp/ | |
# Update Repo | |
sudo apt-get -y update | |
# Install Apache | |
sudo apt-get -y install apache2 | |
# Install MySQL | |
# # Set MySQL Root Password to "twentyseven" | |
sudo debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password password twentyseven' | |
sudo debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password_again password twentyseven' | |
sudo apt-get -y install mysql-server libapache2-mod-auth-mysql php5-mysql | |
# Install PHP | |
sudo apt-get -y install php5 libapache2-mod-php5 php5-mcrypt | |
# Symlink /var/www | |
sudo rm -Rf /var/www | |
sudo ln -s /vagrant /var/www | |
# Provision MySQL with a database and users. | |
mysql -uroot -ptwentyseven < /vagrant/sql/provision.sql | |
# Create all the tables that will go into the production database. | |
mysql -uroot -ptwentyseven < /vagrant/sql/latest.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment