为什么 Git 比 SVN 好
1个回答
展开全部
为什么 Git 比 SVN 好
前面的参数 “wwwroot/” 表示的是本地的路径,这里使用对于工作目录的相对路径,这里也可以使用绝对路径,比如: “d:/www/”
后面的参数 “/var/www” 表示虚拟机中对应映射的目录。
运行脚本:
虽然不是必须,但是如果有需要在启动时运行一些脚本(环境的安装或者有些服务的启动需要在完成目录映射之后进行),可以编辑脚本,类似如下(摘自Vagrant Document):
1 #!/usr/bin/env bash
2
3 apt-get update
4 apt-get install -y apache2
5 rm -rf /var/www
6 ln -fs /vagrant /var/www
保存在和Vagrantfile相同目录,文件名自取(如 boot.sh),然后在Vagrantfile中添加:
1 config.vm.provision :shell, :path => "boot.sh"
当初次使用基本的设置都完成则之后,则可以使用 vagrant up 启动虚拟机
01 Bringing machine 'default' up with 'virtualbox' provider...
02 [default] Setting the name of the VM...
03 [default] Clearing any previously set forwarded ports...
04 [default] Creating shared folders metadata...
05 [default] Clearing any previously set network interfaces...
06 [default] Preparing network interfaces based on configuration...
07 [default] You are trying to forward to privileged ports (ports < = 1024). Most operating systems restrict this to only privileged process (typicallyprocesses running as an administrative user). This is a warning in case
08 the port forwarding doesn't work. If any problems occur, please try a port higher than 1024.
09 [default] Forwarding ports...
10 [default] -- 22 => <strong>2222</strong> (adapter 1)
11 [default] -- 80 => 8080 (adapter 1)
12 [default] Booting VM...
13 [default] Waiting for VM to boot. This can take a few minutes.
14 [default] VM booted and ready for use!
15 [default] The guest additions on this VM do not match the installed version of VirtualBox! In most cases this is fine, but in rare cases it can cause things such as shared folders to not work properly. If you see shared folder errors, please update the guest additions within the virtual machine and reload your VM.
前面的参数 “wwwroot/” 表示的是本地的路径,这里使用对于工作目录的相对路径,这里也可以使用绝对路径,比如: “d:/www/”
后面的参数 “/var/www” 表示虚拟机中对应映射的目录。
运行脚本:
虽然不是必须,但是如果有需要在启动时运行一些脚本(环境的安装或者有些服务的启动需要在完成目录映射之后进行),可以编辑脚本,类似如下(摘自Vagrant Document):
1 #!/usr/bin/env bash
2
3 apt-get update
4 apt-get install -y apache2
5 rm -rf /var/www
6 ln -fs /vagrant /var/www
保存在和Vagrantfile相同目录,文件名自取(如 boot.sh),然后在Vagrantfile中添加:
1 config.vm.provision :shell, :path => "boot.sh"
当初次使用基本的设置都完成则之后,则可以使用 vagrant up 启动虚拟机
01 Bringing machine 'default' up with 'virtualbox' provider...
02 [default] Setting the name of the VM...
03 [default] Clearing any previously set forwarded ports...
04 [default] Creating shared folders metadata...
05 [default] Clearing any previously set network interfaces...
06 [default] Preparing network interfaces based on configuration...
07 [default] You are trying to forward to privileged ports (ports < = 1024). Most operating systems restrict this to only privileged process (typicallyprocesses running as an administrative user). This is a warning in case
08 the port forwarding doesn't work. If any problems occur, please try a port higher than 1024.
09 [default] Forwarding ports...
10 [default] -- 22 => <strong>2222</strong> (adapter 1)
11 [default] -- 80 => 8080 (adapter 1)
12 [default] Booting VM...
13 [default] Waiting for VM to boot. This can take a few minutes.
14 [default] VM booted and ready for use!
15 [default] The guest additions on this VM do not match the installed version of VirtualBox! In most cases this is fine, but in rare cases it can cause things such as shared folders to not work properly. If you see shared folder errors, please update the guest additions within the virtual machine and reload your VM.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询