在Vagrant配置中将php升级到5.6(Upgrade php to 5.6 in Vagrant provisioning)

编程入门 行业动态 更新时间:2024-10-03 12:32:51
在Vagrant配置中将php升级到5.6(Upgrade php to 5.6 in Vagrant provisioning)

我在Vagrant框'trusty64'中将php升级到5.6,并且还安装了SOAP客户端。 当我下次更新Vagrant时,我认为它可能会覆盖这些更改。 我是否还需要更改vagrantfile中的配置,如果是,我应该添加什么?

I upgraded php to 5.6 within the Vagrant box 'trusty64', and also installed SOAP client. When I next update Vagrant I'm thinking it might overwrite these changes. Would I also need to change the provisioning in the vagrantfile, and if so what should I add?

最满意答案

当我下次更新Vagrant时,我认为它可能会覆盖这些更改。

不,如果你升级流浪汉,你不会失去任何东西。 创建虚拟机后,vagrant将运行这些虚拟机,并且升级vagrant不会影响现有虚拟机。

基本上,它的工作方式如下: - 当你运行vagrant up ,流浪汉克隆盒子(这是VM文件)并将VM添加到VirtualBox - 创建VM后,vagrant“操作”(即启动,停止... )VirtualBox VM为您服务

我是否还需要更改vagrantfile中的配置

如果您计划创建更多此类VM,或者您将销毁并重新创建此VM,则需要更改配置; 在这种情况下,配置将运行,您需要更新它。

如果是的话,我应该添加什么?

保存您运行的所有命令以运行升级并从中创建shell脚本,这可能是最简单的选项。 您还可以查看更高级的工具(puppet,ansible,chef ......可以完成这项工作)

When I next update Vagrant I'm thinking it might overwrite these changes.

No, You would not loose anything if you upgrade vagrant. Once the VMs are created, vagrant will operate those VMs and upgrading vagrant will not impact the existing VM.

Basically, it works like this: - when you run vagrant up, vagrant clone the box (which is VM files) and add the VM to VirtualBox - after the VM have been created, vagrant "operates" (i.e. start, stop ...) the VirtualBox VM for you

Would I also need to change the provisioning in the vagrantfile

Thats necessary to change the provisioning if you plan to create more VM of this kind, or if you will destroy and recreate this VM; in this case the provisioning will run and you would need to have it updated.

and if so what should I add?

save all the commands you have run to run the upgrade and create a shell script out of it, might be the most simple option. You can also look at more advanced tool (puppet, ansible, chef .... that would do this job)

更多推荐

本文发布于:2023-07-09 10:17:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1085588.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:升级到   中将   php   Vagrant   Upgrade

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!