Linux admins spend most of their time on working in a terminal; there are some who like to work on GUI instead of a terminal. By default, Linux installed as the minimal server, and user intervention is required to change the installation type. This guide will help you to install GUI on CentOS 7 on the top of the minimal server installation.
Run the following command to list down the available package groups for CentOS 7.yum group list
yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
reboot
Now we have to setup xrdp on Centos 7 server to connect with this server using Remote Desktop Connection from your computer instead of putty or other ssh tools.
xrdp is an Open Source Remote desktop Protocol server, which allows you to RDP to your Linux server from Windows machine; it is capable of accepting connections from rdesktop, freerdp, and remote desktop clients.
Run the following command to list down the available package groups for CentOS 7.rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install xrdp tigervnc-server
systemctl start xrdp
netstat -antup | grep xrdp
systemctl enable xrdp
firewall-cmd --permanent --add-port=3389/tcp
firewall-cmd --reload
chcon --type=bin_t /usr/sbin/xrdp
chcon --type=bin_t /usr/sbin/xrdp-sesman
reboot
Now open "Remote Desktop Connection" from your windows computer.
Enter the ip address of Linux server in the computer field and then click on connect.
You may need to ignore the warning of RDP certificate name mismatch.
You would be asked to enter the username and password. You can either use root or any user that you have it on the system. Make sure you use module “Xvnc
“.
If you click ok, you will see the processing. In less than a half minute, you will get a desktop.
That’s All. You have successfully configured your Linux Server as GUI desktop.