"Does this mean I have to install Media agent on server2 and then use that server as a gateway?"
Yes
In the StoreOnce integration Guide
it says:
Backup to Disk (B2D) devices must be configured to access pre-defined gateways. A gateway, or rather a
gateway client, is a client with the Media Agent component installed (the client must be a 64-bit system, see below). It can be backed up as with any other client in the cell.