Skip to content

Instantly share code, notes, and snippets.

@84adam
Last active September 9, 2016 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 84adam/cc959be81cce2100490afd1a8b29004a to your computer and use it in GitHub Desktop.
Save 84adam/cc959be81cce2100490afd1a8b29004a to your computer and use it in GitHub Desktop.
Install Vagrant on openSUSE/Debian/CentOS; Initialize an Ubuntu or CentOS Box
[see ghost blog post: http://kernelmastery.com/install-setup-vagrant/]
Vagrant, by HashiCorp (https://www.vagrantup.com), is a command-line interface to VirtualBox and numerous other virtual machine managers. There are plugins for talking to AWS, Azure, OpenStack, and many other services.
Vagrant is great for getting a predictable virtual machine set up with a few simple commands in a consistent and quick manner.
If you have VirtualBox installed, setup is easy. Just follow the steps below to try out an Ubuntu 16.04 or CentOS 7 virtual machine.
---
Install Vagrant on openSUSE:
1. Download: `sudo wget --no-check-certificate https://releases.hashicorp.com/vagrant/1.8.5/vagrant_1.8.5_x86_64.rpm -O vagrant.rpm`
2. Install: `sudo zypper in vagrant.rpm`
Install Vagrant on Debian/Ubuntu:
1. Download: `sudo wget --no-check-certificate https://releases.hashicorp.com/vagrant/1.8.5/vagrant_1.8.5_x86_64.deb -O vagrant.deb`
2. Install: `sudo dpkg -i vagrant.deb`
Install Vagrant on CentOS:
1. Download: `sudo wget --no-check-certificate https://releases.hashicorp.com/vagrant/1.8.5/vagrant_1.8.5_x86_64.rpm -O vagrant.rpm`
2. Install: `sudo rpm -Uvh vagrant.rpm`
---
Download and start an Ubuntu 16.04 Vagrant box using VirtualBox:
1. `vagrant init ubuntu/trusty64`
2. `vagrant up --provider virtualbox`
Download and start a CentOS 7 Vagrant box using VirtualBox:
1. `vagrant init centos/7`
2. `vagrant up --provider virtualbox`
Find more boxes to download:
https://atlas.hashicorp.com/boxes/search?order=desc&page=1&sort=downloads
---
Logging in:
Do `vagrant ssh` to log in to a running VM.
---
Cleaning up:
When you are done you can delete the VM with `vagrant destroy`.
Remove the config file with `rm Vagrantfile` before initializing a new box.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment