<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ## Vagrant 常見問題解答 ### 常見命令 ### 常見問題 #### 1.如果Vagrant有很多box,如何切換不同的box 因為每個box的安裝路徑都是不一樣的,所以每次通過`vagrant up`命令去啟動時,只要切換到指定box的目錄下執行命令`vagrant up`就可以了。 #### 2.vagrant如何同時啟動使用多個box(待解決) ```shell $ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Clearing any previously set forwarded ports... Vagrant cannot forward the specified ports on this VM, since they would collide with some other application that is already listening on these ports. The forwarded port to 80 is already in use on the host machine. To fix this, modify your current project's Vagrantfile to use another port. Example, where '1234' would be replaced by a unique host port: config.vm.network :forwarded_port, guest: 80, host: 1234 Sometimes, Vagrant will attempt to auto-correct this for you. In this case, Vagrant was unable to. This is usually because the guest machine is in a state which doesn't allow modifying port forwarding. You could try 'vagrant reload' (equivalent of running a halt followed by an up) so vagrant can attempt to auto-correct this upon booting. Be warned that any unsaved work might be lost. ``` #### 3.簡單了解Vagrant的網絡三模式 > 1、較為常用是端口映射,就是將虛擬機中的端口映射到宿主機對應的端口直接使用 ,在Vagrantfile中配置:(目前在用) > > ``` > config.vm.network :forwarded_port, guest: 80, host: 8080 > 【guest: 80 表示虛擬機中的80端口, host: 8080 表示映射到宿主機的8080端口。】 > ``` > > 2、如果需要自己自由的訪問虛擬機,但是別人不需要訪問虛擬機,可以使用private_network,并為虛擬機設置IP ,在Vagrantfile中配置: > > ``` > config.vm.network :private_network, ip: "192.168.1.104" > 【192.168.1.104 表示虛擬機的IP,多臺虛擬機的話需要互相訪問的話,設置在相同網段即可】 > ``` > > 3、如果需要將虛擬機作為當前局域網中的一臺計算機,由局域網進行DHCP,那么在Vagrantfile中配置: > > ``` > config.vm.network :public_network > ``` #### 4.vagrant官網是什么 https://www.vagrantup.com/ #### 5.如何給虛擬機指定私有的固定IP > 參考文章:https://blog.csdn.net/stones_liu/article/details/86764892 ```php //1.打開vagrant配置文件,修改下面配置: config.vm.network "private_network", ip: "192.168.33.10" //2.重新啟動vagrant $ vagrant reload //3.在虛擬機下輸入命令查詢ip,下面enp0s8就是我們剛剛修改的固定IP $ ifconfig enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255 inet6 fe80::a00:27ff:fede:e0e prefixlen 64 scopeid 0x20<link> ether 08:00:27:de:0e:0e txqueuelen 1000 (Ethernet) RX packets 476 bytes 48920 (47.7 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 330 bytes 42988 (41.9 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.33.10 netmask 255.255.255.0 broadcast 192.168.33.255 inet6 fe80::a00:27ff:fee1:8c65 prefixlen 64 scopeid 0x20<link> ether 08:00:27:e1:8c:65 txqueuelen 1000 (Ethernet) RX packets 13 bytes 2041 (1.9 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 22 bytes 3042 (2.9 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 0 (Lokale Schleife) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 //4.同時打開配置文件看一下 $ cd /etc/sysconfig/network-scripts/ $ cat ifcfg-enp0s8 #VAGRANT-BEGIN # The contents below are automatically generated by Vagrant. Do not modify. NM_CONTROLLED=no BOOTPROTO=none ONBOOT=yes IPADDR=192.168.33.10 NETMASK=255.255.255.0 DEVICE=enp0s8 PEERDNS=no #VAGRANT-END ``` #### 6.vagrant中文文檔翻譯 https://blog.csdn.net/kikajack/article/details/80057876
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看