How to install Mono on a server?

Try this

sudo apt-get install mono-complete


You can install only mono runtime. Try this:

sudo apt-get install mono-runtime

The mono compiler package is mono-gmcs, if you need the entire mono stack, install the package mono-complete .