<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之旅 廣告
                1、init Command: vagrant init [name [url]] 功能:用來初始化一個虛擬機的配置,在相應目錄下,會生成一個Vagrantfile文件 案例: [root@vagrant ubuntu]# vagrant init ubuntu/xenial64 A `Vagrantfile` has been placed in this directory. You are now ready to `vagrant up` your first virtual environment! Please read the comments in the Vagrantfile as well as documentation on `vagrantup.com` for more information on using Vagrant. [root@vagrant ubuntu]# ll total 4 -rw-r--r--. 1 root root 3019 Jan 30 01:34 Vagrantfile 2、up Command: vagrant up 功能:根據目錄下的Vagrantfile文件啟動虛擬機,第一次會去網上下載虛擬機,最好先下載下來 案例: 1)、由于第一次運行,下載速度慢,我事先把box文件放到七牛云咯 http://soft.51yuki.cn/ubuntu-16.04_x86-64.box 2)、把剛剛下載的添加到vagrant [root@vagrant vbox]# vagrant box add ubuntu16.04_louis /vbox/ubuntu-16.04_x86-64.box ==> box: Box file was not detected as metadata. Adding it directly... ==> box: Adding box 'ubuntu16.04_louis' (v0) for provider: box: Unpacking necessary files from: file:///vbox/ubuntu-16.04_x86-64.box ==> box: Successfully added box 'ubuntu16.04_louis' (v0) for 'virtualbox'! 3)、修改vagrantfile文件 ~~~ [root@vagrant ubuntu]# vim Vagrantfile # -*- mode: ruby -*- # vi: set ft=ruby : # All Vagrant configuration is done below. The "2" in Vagrant.configure # configures the configuration version (we support older styles for # backwards compatibility). Please don't change it unless you know what # you're doing. Vagrant.configure("2") do |config| # The most common configuration options are documented and commented below. # For a complete reference, please see the online documentation at # https://docs.vagrantup.com. # Every Vagrant development environment requires a box. You can search for # boxes at https://atlas.hashicorp.com/search. #config.vm.box = "ubuntu/xenial64" config.vm.box = "ubuntu16.04_louis" (把這個更改成剛剛vagrant box add Name URL,這里指定的Name) ~~~ 4)、啟動系統 [root@vagrant ubuntu]# vagrant up ~~~ [root@vagrant ubuntu]# vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'ubuntu16.04_louis'... ==> default: Matching MAC address for NAT networking... ==> default: Setting the name of the VM: ubuntu_default_1517250341422_88745 ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Running 'pre-boot' VM customizations... ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key default: default: Vagrant insecure key detected. Vagrant will automatically replace default: this with a newly generated keypair for better security. default: default: Inserting generated public key within guest... default: Removing insecure key from the guest if it's present... default: Key inserted! Disconnecting and reconnecting using new SSH key... ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM... default: The guest additions on this VM do not match the installed version of default: VirtualBox! In most cases this is fine, but in rare cases it can default: prevent things such as shared folders from working properly. If you see default: shared folder errors, please make sure the guest additions within the default: virtual machine match the version of VirtualBox you have installed on default: your host and reload your VM. default: default: Guest Additions Version: 5.0.40 default: VirtualBox Version: 5.1 ==> default: Mounting shared folders... default: /vagrant => /vagrant/ubuntu ~~~ 3、status 查看狀態 [root@vagrant ubuntu]# vagrant status Current machine states: default running (virtualbox) The VM is running. To stop this VM, you can run `vagrant halt` to shut it down forcefully, or you can run `vagrant suspend` to simply suspend the virtual machine. In either case, to restart it again, simply run `vagrant up`. 4、ssh 功能: ssh登錄到虛擬機 [root@vagrant ubuntu]# vagrant ssh Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-112-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage Get cloud support with Ubuntu Advantage Cloud Guest: http://www.ubuntu.com/business/services/cloud 0 packages can be updated. 0 updates are security updates. vagrant@ubuntu-xenial:~$ sudo apt-get update 5、suspend 功能:掛起虛擬機 案例: ![](https://box.kancloud.cn/d520c8188f1fe692296a0edf93fb6d8a_1167x561.png) 6、reload vagrant reload命令 功能:重啟虛擬機 案例: ![](https://box.kancloud.cn/eefefa10c790ee5a36496f97e748f697_1259x562.png) 7、halt vagrant halt 功能:關閉虛擬機 案例: ![](https://box.kancloud.cn/b1a161dafeafef89633f0a61a63dd4cb_1227x606.png) 8、destroy vagrant destroy 功能:刪除虛擬機
                  <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>

                              哎呀哎呀视频在线观看