Is it possible to install oracle 12c without X window system
Yes, you can do that by running the runinstaller passing the silent argument. Also, it is possible to save and use response files, which basically contain standard configurations and parameters for the software installation. It's very useful if you will need to perform installations following a specific standard on a frequent basis.

Here's the docs:
https://docs.oracle.com/database/121/LADBI/app_nonint.htm

Another option:
You don't need to have "GUI" installed, you can emulate the Graphical Interface. There are plenty of tools. tigervnc is a great one. To install it, run as sudo: yum install tigervnc and after installation is completed, start it by running vncserver. You will be prompted for the user's password. Then you can issue: ps -ef | grep vnc, which will show you details about the program execution, being the port the most important. Now you can externally gain access to the server through VNC Viewer (needs to be installed), by specifying server's  ip and port/ display #. Note: Yum if your OS support it. Otherwise, use rpm (problem is every dependency will need to be separately installed).

Hope it helps.