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
vagrant box add precise32 http://files.vagrantup.com/precise32.box | |
git clone [email protected]:jgrossiord/vagrant-silex-hello-world.git | |
cd vagrant-silex-hello-world | |
vagrant up |
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
Vagrant.configure("2") do |config| | |
# tells that the VM is a "Ubuntu 32 bits Precise VM" | |
config.vm.box = "precise32" | |
# gives the URL of the VM if you did not issue the vagrant add command before | |
config.vm.box_url = "http://files.vagrantup.com/precise32.box" | |
# asks Vagrant to run a script at the startup of the VM | |
# (this is the important part, we will talk further on this point) | |
config.vm.provision :shell, :path => "script/vagrant-bootstrap.sh" |
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 -e | |
sudo apt-get update -y | |
sudo apt-get install -y curl apache2 php5 php5-cli php-pear php5-curl phpunit php5-intl php5-memcache php5-dev php5-gd php5-mcrypt php5-dev git-core git |
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
sudo cp /vagrant/script/template/silex-app.conf /etc/apache2/sites-available/silex-app | |
rm -f /vagrant/logs/web/*.log | |
rm -f /vagrant/logs/web/urls.txt |
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
sudo a2enmod rewrite | |
sudo a2dissite 000-default | |
sudo a2ensite silex-app | |
sudo service apache2 restart |
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
cd /vagrant | |
curl -s http://getcomposer.org/installer | php5 | |
php5 composer.phar install | |
php5 composer.phar update |
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
ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | grep -v '10.0.2' | grep -v '10.11.12.1' | cut -d: -f2 | awk '{ print "http://"$1"/"}' > /vagrant/logs/web/urls.txt | |
echo "You can access your application on " | |
cat /vagrant/logs/web/urls.txt |
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
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
DocumentRoot /vagrant/web | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride None | |
</Directory> | |
<Directory /vagrant/web/> | |
AllowOverride All | |
Order allow,deny |
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
# Startup the VM | |
vagrant up | |
# suspend the VM (saved on disk) | |
vagrant suspend | |
# shutdown the VM | |
vagrant halt | |
# delete the VM |
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
INSERT INTO Table2 (SELECT * FROM Table3 WHERE a=X) |
OlderNewer