The documentation covers all those case -- there's even several ways to accomplish them
(I recommend multiple ArcSDE install directories, not sharing one by changing the naming
of $SDEHOME/etc files). Use the upper-right search bar to look for "arcsde unix install"
and the two top results should be Oracle install docs. All you really need is a second
/etc/services entry (I prefer to include the port number in the name, e.g., sde_prod5152
or sde_test5161).
I don't generally recommend using remote server configurations (you can configure them
for administrative purposes, just use Direct Connect for connections instead).
You should still install ArcSDE media on the remote ArcSDE server so that the listener
can be configured for ST_GEOMETRY (and the DLLs can be patched when it's time to
apply an SP).
- V