text Servidor Vagrant LAMP - Ubuntu 16.04,Apache,MySQL e PHP 7.2 mais phpMyAdmin e xDebug。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text Servidor Vagrant LAMP - Ubuntu 16.04,Apache,MySQL e PHP 7.2 mais phpMyAdmin e xDebug。相关的知识,希望对你有一定的参考价值。

# -*- mode: ruby -*-
# vi: set ft=ruby :

# Servidor Vagrant LAMP - Ubuntu 16.04, Apache, MySQL e PHP 7.2
# mais phpMyAdmin e xDebug. 
# Por Alex Jesus <aljesti@gmail.com> em 16/01/2018.

conf = {
	"hostname"	=>	"INFORME O NOME DO HOSTNAME", # Ex. projeto.local
	"memory"	=>	2048,
	"cpus"		=>	2
}
basepath = "/home/vagrant"
dirweb = "www"

Vagrant.configure(2) do |config|
  config.vm.box = "ubuntu/xenial64"
  config.vm.hostname = conf["hostname"]
  config.vm.network "forwarded_port", guest: 80, host: 8080
  config.vm.network "private_network", ip: "192.168.33.10"
  config.vm.synced_folder ".", "#{basepath}/#{dirweb}/", :mount_options => [ "dmode=775", "fmode=644" ]
	config.ssh.forward_agent = true	
	config.ssh.insert_key = false
	config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"

	config.vm.provider "virtualbox" do |vb|
		vb.name = conf["hostname"]
		vb.memory = conf["memory"].to_i || 1024
		vb.cpus = conf["cpus"].to_i || 1
		if 1 < conf["cpus"].to_i || 1
			vb.customize ['modifyvm', :id, '--ioapic', 'on']
		end
		vb.customize ['modifyvm', :id, '--natdnsproxy1', 'on']
		vb.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
		vb.customize ['setextradata', :id, 'VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled', 0]
	end

  #if Vagrant.has_plugin?("vagrant-hostsupdater")
  #  config.hostsupdater.aliases = conf["hostname"]
  #  config.hostsupdater.remove_on_suspend = true
  #end

	if Vagrant.has_plugin?("vagrant-vbguest")
    config.vbguest.auto_update = false
  end

	unless Vagrant.has_plugin?("vagrant-timezone") then
		system "vagrant plugin install vagrant-timezone"
		config.timezone.value = conf["timezone"] || "Brazil/West" 
	end

  config.vm.provision "shell" do |s|
    s.path = "https://goo.gl/tcdyLs"
    s.args = "#{basepath} #{dirweb} #{conf['hostname']}"
  end
	config.vm.provision "shell", inline: "service mysql restart;"
	config.vm.provision "shell", inline: "service apache2 restart;", run: "always"
end

以上是关于text Servidor Vagrant LAMP - Ubuntu 16.04,Apache,MySQL e PHP 7.2 mais phpMyAdmin e xDebug。的主要内容,如果未能解决你的问题,请参考以下文章

text Vagrant pfsense + guest vm。

text 灯Vagrant

text Vagrant .bash_profile

text golang vagrant

text 在vagrant ubuntu中添加新站点

text alpine_python2_base Vagrant日志