[Rx] Install Vagrant Win7 Local Web Development

2015-08-23_203713The Vagrant tagline says, “Development environments made easy.” Install a couple of programs and run a few commands on the console. Maybe it’s just me, but once I type out DOS-like
commands, it never seems to go as advertised.

Vagrant is overkill for occasional development of WordPress sites. InstantWP is probably the software tool of choice for causal developers.

Ingredients (Downloads)

  • Git (2.5.0) – is software that allows groups of people to work on the same documents (or code) at the same time without stepping on each other. The fancy definition is it’s a “distributed version control system.” We want a piece of this called OpenSSH, Secure Shell, a program that will connect our local system to the Virtual Machine.
  • VirtualBox (4.3.12) – software that creates virtual OS closed sandbox environments called a virtual machines on top of the existing operating system. Some of the newer VirtualBox versions cause errors.
  • Vagrant (1.7.4) – is software that wraps around virtualization programs like VirtualBox to create a virtual development environments.
  • Varying Vagrant Vagrants (VVV 1.2) – is an evolving Vagrant configuration file that’s focused on WordPress development. In this set up, VVV is is the base configuration file to launch Vagrant.

Instructions

  1. Install Git. Remember, what we need is the command-line tools. When you’re installing, a scary dialog is going to come up with a warning. That’s the one you want.

    2015-08-23_173258

  2. Install VirtualBox. Remember that the latest version may not be the greatest. If you get error messages in Vagrant, that might be the problem. Version 4.3.12 worked like a champ for me.

  3. Install Vagrant.

  4. Download Varying Vagrant Vagrants (VVV). I downloaded the zip file and unzipped the VVV-develop in I:\_PROJECTS. This is my projects folders. Yours may be different.

  5.  Run “vagrant up” in GIT Bash. Go to the VVV-develop directory in Explorer.  You should see a file that is named Vagrantfile. If it’s there, you’re in the right place.
     
    2015-08-23_175738

    Computer-Hardware-Mouse-Right-Click-icon.24Right Click anywhere in the Explorer pane and select
    Git Bash Here. The window below should pop open.

    2015-08-23_175842

    2015-08-23_180028
    On the command line, enter vagrant up and hit return.

    Cup-50 This might take awhile. If the Ubuntu Server VM doesn’t exist, Vagrant will go and fetch it.

    2015-08-23_180237
    If you see all sorts of :  Warning: Connection time out. Retrying… messages, it’s most likely a problem with the version of VirtualBox. You may need to downgrade.
    If the last line says … done., you’re in good shape.

  6. Run “vagrant status” in GIT Bash.

    2015-08-23_193550
    On the command line, enter vagrant status and hit return.
    It should say that it is running (virtualbox).

  7. Run “vagrant ssh” in GIT Bash.

      2015-08-23_200949
    On the command line, enter vagrant ssh and hit return.
    If you have successfully run the ssh command, the prompt will have ~$

  8. Confirm Connection. Remember that Vagrantfile? That’s where the IP address is setup when you run the up command. The file has: 192.168.50.4 

    2015-08-23_194409
    Enter that address into the browser.  If this is what you see…

    Thumb-Up-50.pngGood Job!

  9. When you want to quit, just go back to the Git Bash box and enter:
     

    ~$ exit  to get out of ssh

    $ vagrant halt to shutdown the VM.

    There are other useful commands and information for Vagrant in documentation the site.   End_Sign01