After installing CentOS 7 you will be forced to enter startx command to go into GUI (Gnome Desktop) mode each time you boot into the system. To overcome this you have to set the default boot option using the following commands:
First enter the following command:
If the output is anything other than graphical.target then execute the next command:
systemctl set-default graphical.target
You might be asked to provide root user credentials. You might want to try get-default again to make sure it’s changed.