-
VNC is the full name of Virtual Network Computing, which belongs to the remote control class software. The advantage is that it supports remote graphical control across operating systems. In daily work, the server is often the existence of the computer room, it is impossible to run to the computer room every time the graphical interface operation, so VNC is a good alternative software.
-
1, check whether the machine has been installed Vncserver
# Rpm-qa|grep Tigervnc
2, Installation Vncserver
# yum-y Install Tigervnc-server
3. Start and set Vncserver password
The first time you start Vncserver will prompt for a password, then you will need to use the VNCPASSWD command
# Vncserver
Password:
Verify:
4. Modify the/root/.vnc/xstartup file
Because of the CentOS system we use here, the GNOME desktop is installed
# sed-i ' s/twm &/gnome-session &/'/root/.vnc/xstartup
5. Modify the/etc/sysconfig/vncservers file
In this file, you can set up the users who want to run the VNC desktop, and the screen resolution displayed when you connect using Vncview. The 1 in vncservers indicates that VNC is running on Desktop 1, and if you want to add additional desktops, you can modify the configuration
# echo-e ' vncservers= "1:root"
vncserverargs[1]= "-geometry 1024x768"
' >>/etc/sysconfig/vncservers
6. Set to boot
# chkconfig--add Vncserver
# Chkconfig Vncserver on
7. Restart Vncserver
# Service Vncserver Restart
8, firewall port open
#/sbin/iptables-i input-p TCP--dport 5901-j ACCEPT
#/etc/rc.d/init.d/iptables Save
9. Check the boot status
# NETSTAT-TULNP
Note: If you access VNC via a VNC client, the port is 5901
10. Other:
10.1: Modify VNC Password
# VNCPASSWD
10.2: Stop VNC server:
Vncserver-kill: Desktop number
For example
# vncserver-kill:1
Note: Vncserver can only be turned off by the user who initiated it, and instant root cannot be turned off by other users unless the process is killed with the kill command.
10.3: Set the same display port to connect multiple clients
# vncserver-alwaysshared
Centos/linux installation Vncserver