VNC: Virtual Network Computing is short for Virtual Network computers. VNC is an excellent remote control tool software developed by the famous AT&T European research laboratory. VNC is a free open source software based on UNIX and Linux operating systems. It has powerful remote control capabilities and is efficient and practical.
1. Install VNC server and GNOME Desktop
Use
Rpm-qa | grep "vnc-server"
To check whether the VNC server has been installed. If you find that the VNC server is installed, you do not need to install the VNC server. If not, run the following command:
Yum-y install vnc-server
Yum-y groupinstall "GNOME Desktop Environment"
After running the preceding two commands, the VNC server is installed.
2. Set VNC server
The configuration file of the VNC Server is/etc/sysconfig/vncservers. Set the VNC logon user as follows:
Vi/etc/sysconfig/vncservers
Join:
VNCSERVERS = "60: root"
VNCSERVERARGS [60] = "-geometry 1024x768-nolisten tcp-nohttpd"
Explanation: 60: root indicates that the logon user of VNC is root VNC and the connection port is 5960. Why is it 5960? 5900 + 60,590 0 is the starting port of VNC;
VNCSERVERARGS [] defines the window size after VNC connection. Here, the window size is set to 1024 × 768 in the middle of the letter x.-nohttpd indicates that VNC cannot be opened on the web (integrated with java terminal ).
Supplement: If you want the VNC connection password to be different from the SSH connection password, you can also set a dedicated password for the VNC connection and enter
Vncpasswd
Enter the password twice so that VNC has a dedicated connection password. Of course, you can log on to the VNC using the SSH password.
3. Start and set the VNC service