win7 安装 vagrant + centos + virtualbox
Vagrant 是一款用来构建虚拟开发环境的工具,非常适合 php/python/ruby/java 这类语言开发 web 应用,“代码在我机子上运行没有问题”这种说辞将成为历史。
我的是在win7系统下安装 vagrant 进行代码环境的复制,保证代码在多机运行正常,以下是安装步骤:
1、下载安装 virtualbox,https://www.virtualbox.org/wiki/Downloads ,我的版本是 VirtualBox-4.3.22-98236-Win,先安装这个。
2、下载安装 vagrant,https://www.vagrantup.com/ ,我的版本是 vagrant_1.7.2 。
3、下载安装 box,可以自己在线下载(很慢)或者别人做好的。
vagrant 的执行步骤是:
1、vagrant box add {title} {box}
2、vagrant init {title}
3、修改 vagrant 配置文件,config.vm.network "public_network" 去除注释符,config.vm.synced_folder "F:/work/html/www", "/vagrant/" 设置好自己的同步目录
4、vagrant up (确定好是不是有同步目录的说明了,没有的话说明同步不成功)
5、vagrant ssh (windows ssh会出错,可以安装 git,同时在 path 设置 git 的执行路径)
备注:
虽然vagrant up启动报错,但是vagrant ssh还是能登陆虚拟机的,进入虚拟机后,执行如下命令
sudo rm -f /etc/udev/rules.d/70-persistent-net.rules
对, 问题就处在在持久网络设备udev规则(persistent network device udev rules)是被原VM设置好的,再用box生成新VM时,这些rules需要被更新。而这和Vagrantfile里对新VM设置private network的指令发生冲突,删除就好了,这样就可以保持数据同步了。
win7 安装 vagrant + centos + virtualbox的更多相关文章
- (1)安装vagrant和virtualbox
使用xshell,学校服务器需要先联外网. 1.安装Linux头包(linux-header package): # #yum install kernel-devel 2.安装virtualbox. ...
- L06-Ubuntu系统中部署Vagrant和VirtualBox
一.前言 1.Vagrant是一个搭建完整的虚拟开发环境的工具~~~更多关于Vagrant理论可查看这篇博文https://www.cnblogs.com/davenkin/p/vagrant-vir ...
- windows 7 下安装 vagrant + Oracle VM VirtualBox
一.安装下准备 1.下载Oracle VM VirtualBox https://www.virtualbox.org/wiki/Downloads (VirtualBox-4.3.22-98236 ...
- centos 安装 Vagrant
使用的软件: 1. CentOS: CentOS release 6.4 (Final) 2. Vagrant: vagrant_1.2.2_i686.rpm 3. Virtualbox: Virt ...
- 安装vagrant&virtualBox
https://blog.csdn.net/dream_188810/article/details/78218073 VirtualBox是一款开源免费的虚拟机软件(之前一直使用vm,vm功能较多, ...
- 使用 Vagrant 在 VirtualBox 安装 Linux 虚拟机
GreatSQL社区原创内容未经授权不得随意使用,转载请联系小编并注明来源. 目录 1. 导入 2.工具介绍 3.通过Vagrant为VirtualBox安装CentOS 7 4.总结 文章推荐: 关 ...
- win7安装virtualbox
1.下载软件 VirtualBox-4.3.24-98716-Win.1425444683.exe 2.修改安装路径 3.确定选择下一步 4.下一步 5.yes 6.安装 7.安装完成 到此win7 ...
- vagrant,VirtualBox -- 安装使用
1.安装Oracle VM VirtualBox下载 http://download.virtualbox.org/virtualbox/5.2.44/ 2.安装vagrant https://www ...
- 安装完CentOS 7 Minimal之后,从头打造桌面工作环境
安装完CentOS 7 Minimal之后,从头打造桌面工作环境 U盘装CentOS 7 DVD版不能引导的解决办法 更改root密码 SSH登录 增加除root之外的常规用户 装完CentOS 7之 ...
随机推荐
- List列表 OrderBy
一个条件排序情况 list.OrderBy(item => tem.State); 多个条件的情况下 list.OrderBy(item => new {item.State, item. ...
- 查看当前目录每个文件的大小(linux)
du -sh * 查看当前目录每个文件的大小
- tar解压
tar在linux上是常用的打包.压缩.加压缩工具,他的参数很多,折里仅仅列举常用的压缩与解压缩参数 参数: -c :create 建立压缩档案的参数:-x : 解压缩压缩档案的参数:-z : 是否需 ...
- Razor Engine,动态脚本语言,mvc上的语法,适用于文件内容生成,静态网页生成等。
https://razorengine.codeplex.com/ 下载并引用:razorengine.dll 代码里这样写,用mvc的人都会!Razor语法! string template = & ...
- The project target (Android 6.0) was not properly loaded或者The rendering target (Android 6.0) is still loading.
第一步:在project上右键选择Properties,然后选择Android, 然后在Project Build Target那里选择其他的Target试试: 第二步: 我选了6.0之后,就有菜单可 ...
- 【纯欧拉函数】 poj 2407
#include <cstdio> #include <iostream> using namespace std; int phi(int x) { int t=x; ;i& ...
- OpenGL—Android 开机动画源码分析二
引自http://blog.csdn.net/luoshengyang/article/details/7691321/ BootAnimation类的成员函数的实现比较长,我们分段来阅读: 第三个开 ...
- OpenGL与vs编程——error C2440: “glMaterialfv”: 无法从“GLfloat”转换为“const GLfloat *”
void setMaterial(const GLfloat mat_diffuse[4],GLfloat mat_shininess){static const GLfloat mat_specul ...
- Hibernate 系列教程13-继承-鉴别器与内连接相结合
Employee public class Employee { private Long id; private String name; HourlyEmployee public class H ...
- 内核添加对yaffs2文件系统的支持
移植方法: 第一步,我们需要YAFFS2的源码,如果大家有兴趣想了解YAFFS2文件系统的驱动原理的话可以直接去访问他们的官网,地址是www.yaffs2.net,上面说的很详细的,也有源码下载地址, ...