如何更改自定义vagrant box的php和mysql设置

如何更改自定义vagrant box的php和mysql设置,mysql,linux,ubuntu,vagrant,chef-recipe,Mysql,Linux,Ubuntu,Vagrant,Chef Recipe,我使用Wagrant box在本地pc上为magento开发。Magento工作太慢,我必须调整设置。关于如何更改php和mysql设置的文档并不多。另外,我在这门课上是个新手 我是使用ssh编辑服务器内部的设置,还是更改烹饪书,然后执行vagrant供应或重新加载?如果我在服务器内编辑,我可以做流浪规定吗?它会覆盖我在服务器中更改的设置吗 对于mysql设置,我根据自己的需要更改了文件,但在vagrant-up--provision之后,我得到了这个错误:(mysql没有启动) 这些是我更改的

我使用Wagrant box在本地pc上为magento开发。Magento工作太慢,我必须调整设置。关于如何更改php和mysql设置的文档并不多。另外,我在这门课上是个新手

我是使用ssh编辑服务器内部的设置,还是更改烹饪书,然后执行vagrant供应或重新加载?如果我在服务器内编辑,我可以做流浪规定吗?它会覆盖我在服务器中更改的设置吗

对于mysql设置,我根据自己的需要更改了文件,但在
vagrant-up--provision
之后,我得到了这个错误:(mysql没有启动)

这些是我更改的设置

innodb_thread_concurrency = 2 * [numberofCPUs] + 2 
innodb_flush_log_at_trx_commit = 2 
thread_concurrency = [number of CPUs] * 3 
thread_cache_size = 32 
table_cache = 1024 
query_cache_size = 64M 
query_cache_limit = 2M 
join_buffer_size = 8M 
tmp_table_size = 256M 
key_buffer = 32M 
innodb_autoextend_increment=512 
max_allowed_packet = 16M 
max_heap_table_size = 256M 
read_buffer_size = 2M 
read_rnd_buffer_size = 16M 
bulk_insert_buffer_size = 64M 
myisam_sort_buffer_size = 128M 
myisam_max_sort_file_size = 10G 
myisam_max_extra_sort_file_size = 10G 
myisam_repair_threads = 1

对于ssh访问,请使用以下命令:

vagrant ssh

覆盖cookbook的属性是最好的选择,将其添加到文件中

>   config.vm.provision: chef_solo do | chef |
>      chef.cookbooks_path = "cookbooks"
>      chef.data_bags_path = "data_bags"
>      chef.json = {
>         "mysql" => {
>            "tunable" => {
>              "myisam_sort_buffer_size" => "32M"
>           }
>         },
          "php" => {
           "more attributes" => "value"
          }
>      }
>      # List of recipes to run
>      chef.add_recipe "vagrant_main"
>      chef.add_recipe "vagrant_main :: wordpress"
>      chef.add_recipe "vagrant_main :: drupal"
>      chef.add_recipe "vagrant_main :: magento"
>      chef.add_recipe "vagrant_main :: nodejs"    end
>         end end
阅读cookbook的文档(README.md)以确定要覆盖的属性

流浪医生:

对不起,我的英语不好


最诚挚的问候

谢谢,但这是一个自定义的流浪者框,他在其他地方定义了这些设置。。我找不到那是哪个文件。谢谢
>   config.vm.provision: chef_solo do | chef |
>      chef.cookbooks_path = "cookbooks"
>      chef.data_bags_path = "data_bags"
>      chef.json = {
>         "mysql" => {
>            "tunable" => {
>              "myisam_sort_buffer_size" => "32M"
>           }
>         },
          "php" => {
           "more attributes" => "value"
          }
>      }
>      # List of recipes to run
>      chef.add_recipe "vagrant_main"
>      chef.add_recipe "vagrant_main :: wordpress"
>      chef.add_recipe "vagrant_main :: drupal"
>      chef.add_recipe "vagrant_main :: magento"
>      chef.add_recipe "vagrant_main :: nodejs"    end
>         end end