Created
January 18, 2015 17:17
-
-
Save OdinsHat/a016224eb63ddb54b075 to your computer and use it in GitHub Desktop.
Example Vagrant Bootstrap file for an existing Magento 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/sh | |
# Disable SELinux | |
sudo su | |
echo 0 >/selinux/enforce | |
setenforce Permissive | |
# Yum Update | |
sudo yum -y update | |
# Install services | |
sudo yum install -y httpd | |
sudo yum install -y mysql-server mysql-client | |
sudo yum install -y php php-mysql php-pdo php-pear php-gd php-pecl-apc | |
sudo yum install -y vim | |
# Startup Apache and MySQL | |
sudo service httpd start | |
sudo service mysqld start | |
# Add Apache and MySQL to startup | |
sudo chkconfig httpd on | |
sudo chkconfig mysqld on | |
# Setup web directory | |
sudo rm -fr /var/www/html | |
sudo ln -fs /vagrant /var/www/html | |
# Apache Setup | |
echo "ServerName localhost" > /etc/httpd/httpd.conf | |
sudo cp /vagrant/apachevirtualhost.conf /etc/httpd/conf.d/ | |
sudo service httpd restart | |
# MySQL Setup | |
echo "Setting up database"; | |
mysql -u root < /vagrant/database_setup.sql | |
tar zxvf /vagrant/yourproject.sql.tar.gz | |
mysql -u root yourproject < /vagrant/yourproject.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment