Installing GUI on an Azure VM with RHEL (Red Hat Enterprise Linux)
I recently worked on a project where the requirement was to setup IBM MQ on an Azure Linux VM.
Although IBM MQ could be setup on the Linux VM using CLI, but I understood that having a decent UI would make it easier for the tech. team to install and troubleshoot MQ.
After many google searches, getting the required information in bits and pieces and multiple hit-and-trials, decided to create a single blog with all the details, using which I was able to successfully perform the required GUI setup.
Step 1. Connect to RHEL Azure VM via Putty and login. Example user here is mqadmin
Step 2. Change root password and again login as root
Command : sudo passwd root
Step 3. Download latest rpm packages
Command 1 : cd /tmp
Command 2 : wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Command 3 : ls *.rpm
Step 4. Install epel
Command : sudo yum install epel-release-latest-7.noarch.rpm
Step 5. Install Server with GUI
Command : yum groupinstall “Server with GUI” -y
Step 6. Install Xfce
Command : yum groupinstall “Xfce” -y — skip-broken
Step 7. Set Graphical Target as default
Command : systemctl set-default graphical.target
Step 8. On Azure PowerShell, open Port 3389 for VM
Command : az vm open-port — resource-group <ResourceGroupName> — name <LinuxVMName> — port 3389
— — — — — — —
Back on the Putty Terminal
Step 9. Install Tigervnc
Command : yum -y install xrdp tigervnc-server
Step 10. Start xrdp
Command : systemctl start xrdp
Step 11. Enable xrdp
Command : systemctl enable xrdp
Step 12. Open firewall
Command : firewall-cmd — permanent — add-port=3389/tcp
Step 13. Reload firewall
Command : firewall-cmd — reload
Now you can do RDP (MSTSC) from a Windows Machine.
References :
2. https://www.itzgeek.com/how-tos/linux/centos-how-tos/install-xrdp-on-centos-7-rhel-7.html
4. https://www.stechies.com/aptget-command-not-foundin-linux/