Vagrant + puppet + mysql + php非常慢

时间:2015-02-24 17:33:46

标签: php mysql vagrant virtualbox vagrantfile

我刚刚为我的开发人员环境创建了一个带有virtualbox的流浪汉机器,但对于进行MySQL查询的页面,执行速度非常慢。

我正在使用MySQL 5.6和PHP 5.6。

我的Vagrantfile如下:

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

Vagrant.configure("2") do |config|

  # Box
  config.vm.box = "ubuntu/trusty64"

  # Network
  config.vm.network :private_network, ip: "192.168.33.10"
  config.vm.network "forwarded_port", guest: 80, host: 8080, auto_correct: true

  # Shared Folders
  config.vm.synced_folder "/vagrant/guest/var/www", "/var/www", owner: "www-data", group: "www-data", 
    mount_options: ["dmode=777,fmode=777"]

  config.vm.network :forwarded_port, guest: 3306, host: 3306 

  # Provider
  config.vm.provider "virtualbox" do |v|
    v.memory = 1024
    v.cpus = 2
    v.cpuexecutioncap = 90
  end

  # Provision (Puppet)
  config.vm.provision :puppet do |puppet| 
    puppet.module_path  = "puppet/modules"
    puppet.manifests_path = "puppet/manifests" 
    puppet.manifest_file = "base.pp" 
  end 

end

0 个答案:

没有答案