How to connect an extra serial port of Arduino Mega to computer?
You need an FTDI cable, for example, this one from Sparkfun on each additional serial port you want to use, connected to whatever serial device you want it to talk to. 

If the target serial device is the same computer you're developing code on, you'd connect the cable to an additional serial port on that computer. For OS-X, you're done. For Windows, you probably need an FTDI driver for the additional port.

The example cable has a 6-pin female connector. You'd to wire its Rx &amp; Tx pins to your Mega's Rx1 (for instance) and Tx1 pins, and its ground to one of the Mega's ground pins.