This post might have outdated content and is no longer maintained.
I am a Linux user before I bought Mac to develop for iOS. I am a Mac user since 2011. That’s almost 5 years but still, whenever I get a hold of Linux anywhere, I just love it.
So, after struggling for a while with brew and the Mac OS X tool chain, I tried Vagrant but was not pleased. Vagrant is just an abstraction over what can be achieved with simple shell scripts and vanilla VirtualBox.
Following are the things I did to get up and running. My targets of this exercise were:
Here is how I got about it:
sudo mount -t vboxsf -o uid=$UID,gid=$(id -g) host_machine ~/host_machine
Do something to run this command on all system starts, so this linking of host / guest file system is auto done (http://askubuntu.com/questions/814/how-to-run-scripts-on-start-up)
6. Also, to be able to SSH into this VM and to serve point 3 from requirement list, I am sure there would be other ways but the easiest is port forwarding. Where in, we can use the host browser to open, say, localhost:8080 and it will open localhost:80 of guest VM. To do this, again open VirtualBox settings for this VM, go to port forwarding in Network section and make it look like
7. I think with all this, we are good to go. Start the VM in background using
VBoxManage startvm ubuntu14 — type headless
8. SSH into your brand new VM using
ssh -p 2222 <user>@localhost
Feel free to reach out to me for suggestions to improve this post @divyenduz
I did this weeks ago, today I just wrote the post at full speed. There may be a few quirks, If you find one, let me know, I will update the article accordingly. I find this way of working (dev env) very comfortable, even thought I have not yet done too much work this way.
Will share my experience of how this went after using the same for a few months :)
Happy coding ! :)