[[email protected] .ssh]# yum -y install tigervnc-server vnc-server
[[email protected] .vnc]# vi /etc/sysconfig/vncservers # VNCSERVERS="2:myusername"# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"VNCSERVERS="1:root 2:shylock"VNCSERVERARGS[1]="-geometry 800x600 -nolisten tcp"VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp"
[[Email protected]. VNC] # PWD/root/. VNC
[[Email protected]. VNC] # vi xstartup # Change TWM to gnome-session or startkde at the end
# TWM &
Gnome-session &
# Startkde &
Set the account password
Log on to root and Shylock [[email protected]. VNC] # vncpasswd [[email protected] ~] $ Vncpasswd enter the password as prompted
Start vncserver
[[email protected] .vnc]# /sbin/service vncserver start
1: Root indicates that the VNC logon user is root VNC and the connection port is 5901. Why is it 5901? Is 5900 + 1, 5900 is the starting port of VNC;
Download VNC-Viewer
VNC Server: 192.168.1.131: 5901 (IP: 1 IP: 5901)
Click Connect, enter the set password, and the graphic interface will be displayed !!!
Install VNC Server in centos 6.5