Ubuntu16.04环境下VirtualBox+Vagrant虚拟环境的安装
日期: 2019-11-17 分类: 个人收藏 461次阅读
安装VirtualBox
下载地址:https://www.virtualbox.org/
1. 使用上述下载地址下载最新版本VirutalBox,截至到文章当前时间为:5.2版本。
2. 选择需要使用的系统相应版本的安装文件。这里选择Linux版本。
相应的选择红色标记的版本:
3. 执行如下命令进行安装:
下载文件virtualbox-5.2_5.2.6-120293_Ubuntu_xenial_amd64.deb存放在:/home/yitian/Desktop/目录下。
yitian@ubuntu:~/Desktop$ sudo apt-get install libqt5x11extras5 libsdl1.2debian
yitian@ubuntu:~/Desktop$ sudo dpkg -i virtualbox-5.2_5.2.6-120293_Ubuntu_xenial_amd64.deb
4. 验证VirtualBox安装完成
yitian@ubuntu:~/Desktop$ virtualbox -help
Oracle VM VirtualBox Manager 5.2.6
(C) 2005-2018 Oracle Corporation
All rights reserved.
Usage:
–startvm <vmname|UUID> start a VM by specifying its UUID or name
–separate start a separate VM process
–normal keep normal (windowed) mode during startup
–fullscreen switch to fullscreen mode during startup
–seamless switch to seamless mode during startup
–scale switch to scale mode during startup
–no-startvm-errormsgbox do not show a message box for VM start errors
–restore-current restore the current snapshot before starting
–no-aggressive-caching delays caching media info in VM processes
–fda <image|none> Mount the specified floppy image
–dvd <image|none> Mount the specified DVD image
–dbg enable the GUI debug menu
–debug like –dbg and show debug windows at VM startup
–debug-command-line like –dbg and show command line window at VM startup
–debug-statistics like –dbg and show statistics window at VM startup
–no-debug disable the GUI debug menu and debug windows
–start-paused start the VM in the paused state
–start-running start the VM running (for overriding –debug*)
Expert options:
–disable-patm disable code patching (ignored by AMD-V/VT-x)
–disable-csam disable code scanning (ignored by AMD-V/VT-x)
–recompile-supervisor recompiled execution of supervisor code (*)
–recompile-user recompiled execution of user code (*)
–recompile-all recompiled execution of all code, with disabled
code patching and scanning
–execute-all-in-iem For debugging the interpreted execution mode.
–warp-pct <pct> time warp factor, 100% (= 1.0) = normal speed
(*) For AMD-V/VT-x setups the effect is –recompile-all.
The following environment (and extra data) variables are evaluated:
VBOX_GUI_DBG_ENABLED (GUI/Dbg/Enabled)
enable the GUI debug menu if set
VBOX_GUI_DBG_AUTO_SHOW (GUI/Dbg/AutoShow)
show debug windows at VM startup
VBOX_GUI_NO_DEBUGGER disable the GUI debug menu and debug windows
安装Vagrant
在Vagrant官网上下载最新版本的安装文件,下载地址:https://www.vagrantup.com/downloads.html。
选择:vagrant_2.0.2 -> vagrant_2.0.2_x86_64.deb进行下载。这里下载的最新版本的文件为:vagrant_2.0.2_x86_64.deb。
使用如下命令进行安装:
yitian@ubuntu:~/auroraclone/aurora$ sudo dpkg -i /home/yitian/Desktop/vagrant_2.0.2_x86_64.deb
[sudo] password for yitian:
(Reading database … 182040 files and directories currently installed.)
Preparing to unpack …/vagrant_2.0.2_x86_64.deb …
Unpacking vagrant (1:2.0.2) over (1.8.1+dfsg-1) …
Setting up vagrant (1:2.0.2) …
Processing triggers for man-db (2.7.5-1) …
yitian@ubuntu:~/auroraclone/aurora$ vagrant -v
Vagrant 2.0.2
yitian@ubuntu:~/auroraclone/aurora$
查看Vagrant版本信息,此时为最新版。完成!
常见问题
不要使用如下命令进行安装:
sudo apt-get install vagrant
使用上述命令完成的Vagrant安装并不是最新版本,因此会出现VirtualBox和Vagrant版本不一致导致的异常。
除特别声明,本站所有文章均为原创,如需转载请以超级链接形式注明出处:SmartCat's Blog
精华推荐