MAC OSX Development Environment
Recently I changed my company VAIO laptop for an MacBook, and my worries were to try to configurate a clean system for my daily work, Programming, mainly for web.
So, after think for a while, i used VirtualBox, with LinuxMint for my web server (apache2), redirecting host port (on mac osx) 8888 for port 80 on the guest.
In the end, i get a clean OS without the mess of installing apache, cpan, etc., and this approch works with no problems at all.
I also installed a guest with WindowsXP, where it can connect to the web server on linux guest, for Internet Explorer tests, and works greatly.
Here are the steps that i've taken:
1. Download VirtualBox and Install it.
2. Download an linux distribution, I've used LinuxMint, it's based on Ubuntu.
- Install it has a VirtualBox guest.
3. Port Forwarding, from 8888 on host to 80 on guest (terminal on host):
- VBoxManage setextradata MyLinux "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/HostPort" 8888
- VBoxManage setextradata MyLinux "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/GuestPort" 80
- VBoxManage setextradata MyLinux "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/Protocol" TCP
4. Share folders between host and guest.
- on guest (terminal) execute the following command to mount it:
sudo mount -t vboxsf -o uid={apache user},gid={apache group},fmode=777 {shared folder name} {where to mount}
example: sudo mount -t vboxsf -o uid=33,gid=33,fmode=777 web_servers /servers
- i've created a python script that does this automaticatly:
import os
os.system("sudo /etc/init.d/apache2 stop")
os.system("sudo umount /servers")
os.system("sudo mount -t vboxsf -o uid=33,gid=33,fmode=777 web_servers /servers")
os.system("sudo /etc/init.d/apache2 start")
- I shared the folders that are read by apache, this way I develop in host, and the guest only serves it.
- every time you create a new virtual host on apache, you only need to insert it on both /etc/hosts file, guest and host.
5. Activate Internal network between guests (if you have more than 1 guest):
- see it here

Post new comment