31
Oct
14

WordPress VIP Development environment setup (Mac)

Oh boy, what a pain! Setting up Unix tools on a Mac is one of my least favourite things because

  1. Apple puts Unix stuff in very odd places, mucking up install assumptions
  2. Apple messes with the whole root concept in sometimes counter intuitive ways : sudo effectively means “local admin” – not really root, and lots of installers these days blocks sudo for safety reasons, which makes install on a mac tricky because you NEED “elevated” permission to do many things.
  3. Apple builds in key “optional extras” that have now become core to Unix style installers – Python, Perl and Ruby. The Apple versions, even in up-to-date installs are … pants (English insult meaning “bad”). This means lots of parallel installs of key scripting enablers (more on this later)

So here is what I had to do, more or less blow-by-blow.

WordPress “official” instructions are here : http://vip.wordpress.com/documentation/quickstart/ (slightly ironic title 🙂

So … I am behind a corporate proxy, and I am going to need authoxy (or similar)

download authoxy from www.hrsoftworks.net/Products.php

  1. run the download
  2. double click Authoxy pkg (control click–>open–>open might be needed depending on your “unknown package” settings)
  3. you might need local admin to install this! type in username and password
  4. open “System Preferences”
  5. goto Network. Choose the network you connect to your corp network on, open it. Goto Proxies. Select the Automatic Proxy Configuration and cut and paste the “URL” and back out to the top level
  6. authoxy settings are in the bottom section of “System Preferences”, open them
  7. select “use automatic configuration (pac) file” and paste the “URL” in
  8. put in your network username/password
  9. change authoxy port to (say) 9000
  10. start authoxy from the button top left

download virtualbox, install.

download vagrant, install.

When  I saw that vagrant uses Ruby, my heart sank. Not because I hate Ruby, but because I always seem to have issues with it on Macs.

Your built-in Ruby may well be no good. If later steps fail with random build errors and dependency issues, try a newer ruby.

Now crack open a terminal.

> ruby –version

Mine showed 2.0. As things turned out, I needed 2.1 at least. So I used the tasty ruby-install to give me a better copy and then changed my path to look there first.

> vagrant plugin install vagrant-proxyconf

if that works you need to create a Vagrant Proxy file I used vi, vi commands are bold

> vi ~/.vagrant.d/Vagrantfile

i

Vagrant.configure("2") do |config|
  if Vagrant.has_plugin?("vagrant-proxyconf")
    config.proxy.http     = "http://10.0.2.2:9000/"
    config.proxy.https    = "http://10.0.2.2:9000/"
    config.svn_proxy.http = "http://10.0.2.2:9000/"
  end
end
[esc]:wq

> cd vip-quickstart

> vagrant up

wait for it … pray … wait

> vagrant provision

Wait, and maybe repeat the provision, … if you get any network errors, your proxy might not be set up right

The first time I did provision I got a blank 200 response story on vip.local (where your dev site will “live”) and some odd network errors. I second go resolved that.

victory !

(smile)

Advertisements

0 Responses to “WordPress VIP Development environment setup (Mac)”



  1. Leave a Comment

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: