Server-side environment: CentOS 6.7
Client Environment: Windows 7
1. Server-installed VNC service
2. Editing the VNC configuration file
3. Set the VNC password
4. View the session information of VNC
5. Client Test VNC Connection
Reference
1. Server-installed VNC service
You can install VNC server directly in RPM:
RPM-IVH tigervnc-server-1.1.0-16.el6.x86_64.rpm
If RPM is found to be dependent on installation, it is recommended to use Yum installation to easily resolve dependency issues:
Yum Install Tigervnc-server
If the desktop option is not installed when the system is installed, you will also need to install the desktop with Yum:
Yum groupinstall "X window System" "Desktop"
2. Editing the VNC configuration file
Edit/etc/sysconfig/vncservers,
Add the following content:
vncservers= "1:root" vncserverargs[1]= "-geometry 800x600-alwaysshared-depth 24"
Note: Resolution can be adjusted according to the actual situation, the resolution is not suitable may cause the VNC connection display black screen phenomenon.
3. Set the VNC password
Vncserver
The first entry prompts you to set the VNC password:
[Email protected] ~]# Vncserver you'll require a password to access your desktops. Password:Verify:xauth:creating new Authority file/root/. Xauthoritynew ' jy-db:1 (root) ' Desktop is jy-db:1creating default startup script/root/.vnc/xstartupstarting Applications specified In/root/.vnc/xstartuplog file Is/root/.vnc/jy-db:1.log[[email protected] ~]#
Later if you want to modify the VNC user password, you can use the VNCPASSWD command to modify
[Email protected] ~]# vncpasswdpassword:verify:
4. View the session information of VNC
Restart the Vncserver service:
/etc/init.d/vncserver restart
To view the session information for VNC:
Vncserver-list
5. Client Test VNC Connection
The client is vncviewer, I am here for the Windows system, download the corresponding VNC installation package Ha-vnc-4.0-x86_win32-kc.exe
Installation option installs only the VNC viewer.
Enter 192.168.56.102:1,
When you are sure, you are prompted to enter your password, which is the VNC password.
Once determined, you can connect to the desktop environment on the server via VNC.
Note: Here the "192.168.56.102" is the IP address of the server, and ": 1" corresponds to the configuration of the vncservers, this is the root user.
Personally, the biggest advantage of VNC is that the network suddenly disconnects, and does not affect the operation that was being done.
Reference
Installation and configuration of desktops and VNC on Linux