테스트 환경
OS : CentOS 5.5 32bit
Xwindow : KDE
1. VNC 설치
- VNC 관련 파일을 Yum툴을 사용해 자동설치 한다.
- #yum install -y vnc*
2. VNC 로그인 정보 수정
- VNC 설치 및 설정이 모두 완료되고 사용자 PC에서 VNC서버로 접속 시를 위한 로그인 정보를
설정한다.
(수정전)
(수정 후)
표시한 부분을 빨간색으로 표시된 부분과 같이 수정한다.
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# <URL:http://www.uk.research.att.com/archive/vnc/sshvnc.html>.
# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.
# Use "-nohttpd" to prevent web-based VNC clients connecting.
# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.
VNCSERVERS="1:root"
VNCSERVERARGS[0]="-geometry 1024x768 -nolisten tcp -nohttpd -localhost"
3. VNC 로그인 패스워드 설정
-VNC클라언트로 접속 시 입력하게되는 패스워드 정보이다.
[root@smf httpd]# vncpasswd
Password:
Verify:
[root@smf httpd]#
4. VNC서버 데몬 활성화
[root@smf httpd]# /etc/init.d/vncserver stop
Shutting down VNC server: 1:root [ OK ]
[root@smf httpd]# /etc/init.d/vncserver start
Starting VNC server: 1:root
New 'smf.xxxx.co.kr:1 (root)' desktop is smf.xxxx.co.kr:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/smf.xxxx.co.kr:1.log
[ OK ]
5. VNC서버 실행 후 클라이언트로 부터 접속을 활성화 시키기 위해 xstartup 파일을 수정한다.
- vi /root/.vnc/xstartup 파일 수정
(수정 전)
(수정 후 )
표시된 부분에 "#" 주석을 제거한다.
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
6. VNC서버로 접속할 사용자 PC에서 TightVNC 프로그램 설치 후 접속
\
'IT > Server' 카테고리의 다른 글
리눅스 CentOS 5 취약점 분석툴 Nessus 5.2 설치 방법 (0) | 2014.11.12 |
---|---|
CentOS 5 X윈도우 설치. (KDE) (0) | 2014.11.11 |