CentOS6.x VNC 설치


 

1. 패키지 확인


[root@localhost~]# rpm -qa | grep vnc

gtk-vnc-python-0.3.10-3.el6.x86_64

gtk-vnc-0.3.10-3.el6.x86_64

tigervnc-server-module-1.0.90-0.17.20110314svn4359.el6.x86_64



2. 패키지 설치


[root@localhost~]# yum install tigervnc-server



3. vnc 환경 설정


[root@localhost~]# vi /etc/sysconfig/vncservers

VNCSERVERS="1:root 2:saint"

VNCSERVERARGS[1]="-geometry 1152x864"

VNCSERVERARGS[2]="-geometry 1152x864"



4. 개별 유저 패스워드 설정


[root@localhost~]]# vncpasswd

Password:

Verify:

[saint@localhost ~]$ vncpasswd

Password:

Verify:



5. vncserver 재시작


[root@localhost .vnc]# service vncserver restart

VNC 서버 종료 중: [ OK ]

VNC 서버 ()를 시작 중: 1:root xauth: creating new authority file /root/.Xauthority

New 'kvm.netpia.com:1 (root)' desktop is kvm.netpia.com:1

Creating default startup script /root/.vnc/xstartup

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/kvm.netpia.com:1.log

2:scbyun xauth: creating new authority file /home/scbyun/.Xauthority

New 'kvm.netpia.com:2 (scbyun)' desktop is kvm.netpia.com:2

Creating default startup script /home/scbyun/.vnc/xstartup

Starting applications specified in /home/scbyun/.vnc/xstartup

Log file is /home/scbyun/.vnc/kvm.netpia.com:2.log

[ OK ]



6. 개별 사용자 vnc(xstartup) 설정


[root@localhost ~]# vi .vnc/xstartup

#twm &

gnome-session &

[saint@localhost ~]$ vi .vnc/xstartup

#twm &

gnome-session &



7. vncserver 재시작


[root@localhost .vnc]# service vncserver restart
VNC 서버 종료 중: 1:root 2:saint                           [  OK  ]
VNC 서버 (을)를 시작 중: 1:root
New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log

2:saint
New 'localhost.localdomain:2 (saint)' desktop is localhost.localdomain:2

Starting applications specified in /home/saint/.vnc/xstartup
Log file is /home/saint/.vnc/localhost.localdomain:2.log

                                                           [  OK  ]
[root@localhost .vnc]#

[root@localhost ~]# vi /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT

[root@localhost ~]# /etc/init.d/iptables restart

 





Posted by 살찐루어
: