Install RealVNC on CentOS7

Step 1: Check gnome version rpm -qa | grep -i gnome

gnome version is 3.14

So we run "yum update" to update gnome 3 from 3.14 to 3.22. Because there is a bug in gnome 3.14, that will cause vncserver-virtual :x failed.

yum update

Install Real VNC Server 6.0.1

rpm -ivh VNC-Server-6.0.1-Linux-x64.rpm

[root@msoclnx23 Software]# rpm -ivh VNC-Server-6.0.1-Linux-x64.rpm Preparing... ################################# [100%] Updating / installing... 1:realvnc-vnc-server-6.0.1.23971-1 ################################# [100%] ** Moving /usr/bin/Xvnc to /usr/bin/Xvnc.conflict ** Moving /usr/share/man/man1/Xvnc.1.gz to /usr/share/man/man1/Xvnc.1.gz.conflict ** Moving /usr/bin/vncpasswd to /usr/bin/vncpasswd.conflict ** Moving /usr/share/man/man1/vncpasswd.1.gz to /usr/share/man/man1/vncpasswd.1.gz.conflict Testing if SELinux enabled... [Disabled] Updating /etc/pam.d/vncserver

NOTICE: common configuration in /etc/pam.d contains the following modules: pam_ldap.so pam_fprintd.so pam_ldap.so The default vncserver PAM configuration only enables pam_unix. See `man vncinitconfig' for details on any manual configuration required.

Looking for font path... not found. Generating private key... done Installed systemd unit for VNC Server in Service Mode daemon Start or stop the service with: systemctl (start|stop) vncserver-x11-serviced.service Mark or unmark the service to be started at boot time with: systemctl (enable|disable) vncserver-x11-serviced.service

Installed systemd unit for VNC Server in Virtual Mode daemon Start or stop the service with: systemctl (start|stop) vncserver-virtuald.service Mark or unmark the service to be started at boot time with: systemctl (enable|disable) vncserver-virtuald.service

man vncinitconfig

Installed systemd unit for VNC Server in Service Mode daemon Start or stop the service with: systemctl (start|stop) vncserver-x11-serviced.service Mark or unmark the service to be started at boot time with: systemctl (enable|disable) vncserver-x11-serviced.service

Installed systemd unit for VNC Server in Virtual Mode daemon Start or stop the service with: systemctl (start|stop) vncserver-virtuald.service Mark or unmark the service to be started at boot time with: systemctl (enable|disable) vncserver-virtuald.service

vnclicense -add xxx

systemctl start vncserver-x11-serviced.service use root and it's password to login

#Single user link in service mode systemctl (start|stop) vncserver-x11-serviced.service

#Multiple user link mode vncserver-x11 vncserver-virtual :x

We check the /root/.vnc/MTOpenMeeting1:1.log

We can see the content

Starting session: /etc/X11/xinit/Xsession

vi /etc/vnc/xstartup #Change from elif [ -x /etc/X11/xinit/Xsession ]; then SESSIONBIN="/etc/X11/xinit/Xsession #To elif [ -x /etc/X11/xinit/Xsession ]; then /usr/bin/gnome-session