I have a new machine with Ubuntu Server. On that server I would like to have Apache with some web services.
But how do I install Eclipse on Ubuntu Server? Right now I have no GUI, just command line.
First of all: If it's a production server. Don't do it. Installing a GUI will slow performance and may open more security holes. Also never develop directly on a production server.
Secondarily: If anyone sees this prior to installing Ubuntu Server, you should probably install the desktop version of Ubuntu instead and then install the server-services, since that's quite a lot more well documented and you're probably not going to run Eclipse on a dedicated (production-)server anyway.
And now the answer:
First install the ubuntu-desktop package with
See section one on http://www.ubuntugeek.com/install-gui-in-ubuntu-server.html for more detailed instructions
I needed to do this recently to run Eclipse plugin tests on Travis CI (which, as of this writing, runs Ubuntu 12.04 LTS Server Edition 64 bit).
Installing Eclipse can be as simple as downloading and extracting the Linux version of Eclipse (For Travis CI, be sure to download the 64 bit edition). However, Eclipse will crash on starting, giving a "Cannot open display" or similar error. This is because the server edition of Ubuntu is not configured to use a monitor, and (I believe) much of the software needed to show graphics is not included. The solution by sakjur resolves this by installing that software.
A less heavy-weight way to do this than installing
For Travis CI, this gets even better, because
prior to executing your Eclipse commands. Example Travis CI build