首页 > PHP开发 > php中级 > Vagrant入门——安装、升级、卸载
2014
11-07

Vagrant入门——安装、升级、卸载

1.安装

Installing Vagrant is extremely easy. Head over to the downloads page and get the appropriate installer or package for your platform. Then install it using standard procedures for your operating system.

The installer will automatically add vagrant to your system path so that it is available in terminals. If it is not found, please try logging out and logging back in to your system (this is particularly necessary sometimes for Windows).

If you have an old version of Vagrant 1.0.x installed via RubyGems, please remove it prior to installing a newer version of Vagrant.

2.升级

The upgrade process from 1.0.x to 1.x is straightforward. Vagrant is quite backwards compatible with Vagrant 1.0.x, so you can simply reinstall Vagrant over your previous installation by downloading the latest package and installing it using standard procedures for your operating system.

However, if your version of Vagrant was installed via RubyGems, then you must gem uninstall the old version prior to installing the package for the latest version of Vagrant. The RubyGems-based installation method has been removed.

3.卸载

1)移除Vagrant安装程序

Removing the Vagrant program will remove the vagrant binary and all dependencies from your machine. After uninstalling the program, you can alwaysreinstall again using standard methods.

On Windows, uninstall using the add/remove programs section of the control panel.

On Mac OS X, remove the /Applications/Vagrant directory and the/usr/bin/vagrant file.

On Linux, remove the /opt/vagrant directory and the /usr/bin/vagrant file.

2)移除Vagrant用户数据

Removing the user data will remove all boxes, plugins, and any stored state that may be used by Vagrant. Removing the user data effectively makes Vagrant think it is once again a fresh install.

On every platform, remove the ~/.vagrant.d directory to delete the user data.

Running Vagrant will automatically regenerate any data necessary to run, so it is safe to remove the user data at any time.

编程技巧