InfoHeap
Tech tutorials, tips, tools and more
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Mac tutorials

  • Brew
  • Chrome enable webgl on old macbooks
  • How to change computer display name on Mac
  • How to change default system voice for text-to-speech on Mac
  • How to install drupal on Mac usin MAMP
  • How to remove hard drive icon from mac desktop
  • How to use rrdtool plot traffic from network interface
  • How to view your WiFi password on Mac
  • Mac - change desktop icons size
  • Mac - how to take timed screenshot
  • Mac - how to always show scroll bar
  • Mac - how to change default location for screenshots
  • Mac - how to open apps not from App Store
  • Mac - how to take screenshots
  • Mac - how to use kubernetes with Lima-VM
  • Mac - kubernetes minikube - create deployment
  • Mac - make spotlight search faster
  • Mac - show volume icon on menu bar
  • Mac Command Line
  • Mac Finder
  • Mac Preview
  • Mac m1 - How to Install Kubernetes with kind
  • Mac m1 - How to Install Kubernetes with minikube
  • Mac m1 - minikube - create multi node kubernetes cluster
  • Mac podman quick start guide
  • NestJS Quick start tutorial on Mac
  • NextJS Quick start tutorial on Mac
  • Vagarant quick start guide on Mac
  • Windows on Mac
  • minikube kubernetes - create deployment with multiple replica and load balancer
  • minikube kubernetes - how to access service IP endpoint using curl
  • minikube kubernetes - how to access specific pod IP endpoint using curl
 
  • Home
  • > Tutorials
  • > Mac

Vagarant quick start guide on Mac

on Aug 19, 2016

Vagrant is an excellent tool to create and configure lightweight, reproducible, and portable development environments. Here is a quick start guide to use vagrant on Mac. We’ll install centos virtual machine on Mac using Virtualbox.

  1. Download and Instal Virtualbox from Oracle Virtualbox site.
  2. Install vagrant using brew
    $ brew cask install vagrant
    $ brew cask info vagrant
    https://www.vagrantup.com/
    /usr/local/Caskroom/vagrant/1.8.5 (3 files, 85.6M)
    From: https://github.com/caskroom/homebrew-cask/blob/master/Casks/vagrant.rb
    ==> Name
    Vagrant
    ==> Artifacts
    Vagrant.pkg (pkg)
    
  3. Add an image (e.g. centos 6.6 image) to vagrant boxes
    $ vagrant box add centos66 https://github.com/tommy-muehle/puppet-vagrant-boxes/releases/download/1.0.0/centos-6.6-x86_64.box
    
  4. List vagrant boxes
    $ vagrant box list
    centos66  (virtualbox, 0)
    centos7   (virtualbox, 0)
    precise64 (virtualbox, 0)
    
  5. Initialize a new Vagrant environment by creating a Vagrantfile
    $ mkdir -p ~/vagrant/centos66
    $ cd ~/vagrant/centos66
    $ vagrant init centos66 ## This will create Vagrantfile
    
  6. To allow ssh using default vagrant insecure key ~/.vagrant.d/insecure_private_key add the following line to Vagrantfile before end
    config.ssh.insert_key = false
    

    This should be avoided if your project needs security.

  7. starts and provisions the vagrant environment
    $ vagrant up
    
  8. connects to machine via SSH
    $ vagrant ssh-config ## This will print ssh config which is used to connect to the machine
    $ vagrant ssh
    

    This should login using private key (as per the setup above). Default password for user vagrant is vagrant in case the private key does not work.

  9. halt machine
    $ vagrant halt
    
  10. stops and deletes all traces of the vagrant machine
    $ vagrant destroy  ## From the same dir where Vagrantfile is present
    

Suggested posts:

  1. Mac brew (homebrew) – quick start guide
  2. Docker quick start guide on Mac
  3. bower – installation and quick start guide
  4. Python selenium webdriver – quick start guide on Mac
  5. Composer – quick start guide on Linux and Mac
  6. Using JSLint on command line on Ubuntu linux – quick start guide
  7. Mongo – cli quick start guide
  8. haxe openfl on mac – quick start guide for mobile development
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Mac, Tutorials

Follow InfoHeap

facebook
twitter
googleplus
  • Browse site
  • Article Topics
  • Article archives
  • Recent Articles
  • Contact Us
  • Omoney
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries

Copyright © 2023 InfoHeap.

Powered by WordPress