Created
August 1, 2015 15:30
-
-
Save thiagosf/99acab655591559bb09a to your computer and use it in GitHub Desktop.
Configuração simples do vagrant para desenvolvimento web com: apache, php e mysql
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
config.vm.box = "phpdevbox" | |
config.vm.network :hostonly, "192.168.33.10" | |
config.vm.forward_port 80, 8080 | |
config.vm.provision "shell", inline: <<-SHELL | |
sudo apt-get update | |
sudo apt-get install -y vim | |
sudo apt-get install -y apache2 | |
sudo apt-get install -y php5 | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' | |
sudo apt-get install -y mysql-server | |
# Alterando dono do grupo do html | |
sudo chown -R vagrant:www-data /var/www/html/ | |
# Criando o php para testar | |
echo "<?php phpinfo();" > /var/www/html/info.php | |
SHELL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment