VNC installation,
Server Environment: CentOS 6.7
Client environment: Windows 7
1. Install the VNC server on the server
You can directly install the vnc server at rpm:
rpm -ivh tigervnc-server-1.1.0-16.el6.x86_64.rpm
If a dependency is found during rpm installation, we recommend that you use yum to install the dependency easily:
yum install tigervnc-server
If the system is not installed with the desktop option, you need to use yum to install the desktop:
yum groupinstall "X Window System" "Desktop"
2. Edit the vnc configuration file
Edit/etc/sysconfig/vncservers,
Add the following content:
VNCSERVERS="1:root" VNCSERVERARGS[1]="-geometry 800x600 -alwaysshared -depth 24"
Note: the resolution can be adjusted according to the actual situation. If the resolution is inappropriate, the vnc connection may display a black screen.
3. Set the VNC Password
Vncserver
The first time you enter the prompt, you need to set the VNC password:
[root@JY-DB ~]# vncserver You will require a password to access your desktops. Password: Verify: xauth: creating new authority file /root/.Xauthority New 'JY-DB:1 (root)' desktop is JY-DB:1 Creating default startup script /root/.vnc/xstartup Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/JY-DB:1.log [root@JY-DB ~]#
To modify the vnc user password, run the vncpasswd command.
[root@JY-DB ~]# vncpasswd Password: Verify:
4. View vnc session information
Restart the vncserver service:
/etc/init.d/vncserver restart
View the vnc session information:
vncserver -list
5. Test the vnc connection on the client
Bytes
Select to install VNC Viewer only.
Enter 192.168.56.102: 1,
After confirmation, the system prompts you to enter the password. The password here refers to the vnc password,
After confirming, you can connect to the desktop environment of the server through vnc.
Note: Here "192.168.56.102" is the IP address of the server, and ": 1" corresponds to the configuration of VNCSERVERS, where it is the root user.
I personally think that the biggest advantage of VNC is that the network is suddenly disconnected, and it will not affect the operations being done.
Search
Copy