Translate

Search

Showing posts with label System. Show all posts
Showing posts with label System. Show all posts

VNC 연결 설정

Windows 시스템에서 원격데스크탑을 이용해 간편하게 원격지의 컴퓨터로 접속 가능한 것과 마찬가지로

Linux에서도 VNC를 통해 원격 접속이 가능합니다.

VNC가 설치되어 있지 않으신 경우 http://rpm.pbone.net/에 접속하셔서 패키지를 다운 후 설치해주세요.

우선, 원격 접속을 해야할 계정을 2개라고 가정을 하겠습니다.

사용할 계정명은 'root', 'vncuser'입니다.


  1. VNC Server 설정
<root @ linux ~># vi /etc/sysconfig/vncserver
VNCSERVER="1:root 2:vncuser"
VNCSERVERARGS[1]="-geometry 1280x1024"
VNCSERVERARGS[2]="-geometry 1280x1024"
:wq

파일을 열어 해당 내용을 가장 하단에 추가해줍니다.


  2. VNC Server Password 설정
<root @ linux ~># cd ~
<root @ linux ~># mkdir .vnc
<root @ linux ~># cd .vnc
<root @ linux ~># vncpasswd
<root @ linux ~># su - vncuser
<vncuser @ linux ~>$ cd ~
<vncuser @ linux ~>$ mkdir .vnc
<vncuser @ linux ~>$ cd .vnc
<vncuser @ linux ~>$ vncpasswd


  3. Default Window Desktop Manager 설정
<root @ linux ~># cp /etc/X11/xinit/xinitrc ./xstartup
<root @ linux ~># su - vncuser
<vncuser @ linux ~>$ cp /etc/X11/xinit/xinitrc ./xstartup

2번 설정 후 바로 접속을 하시면 x desktop 기본 화면으로 진입합니다.
별 다른 설정이 불가능한 상태이지요.
여기선 gnome 환경으로 진입하도록 설정하겠습니다.
KDE / xface 등 다른 환경을 사용하시는 분은 해당 GUI환경을 실행하는 파일로 대체하신 후
위 커맨드를 수행하시면 됩니다.


  4. VNC Server 서비스 재기동
<root @ linux ~># /etc/init.d/vncserver restart

이제 접속을 위한 기본 설정은 완료되었습니다.


  5. VNC 접속
VNC는 기본적으로 5900 포트를 이용합니다.
1번 VNC Server 설정 중 VNCSERVER="1:root 2:vncuser" 이라는 부분이 보이실겁니다.
해당 설정이 의미하는 것은 root 계정은 5901 포트를, vncuser 계정은 5902포트를 사용한다는 것을 뜻합니다.
5900 포트에 계정별 할당된 번호를 더해준 포트로 접속을 하셔야됩니다.
접속 툴은 mRemoteNG라는 프로그램을 추천드립니다.
http://www.mremoteng.org/

RHEL5 (Redhat Enterprise Linux) yum 사용 설정

기본 값으로 설치된 RHEL에서는 yum 기능을 사용할 수가 없습니다.

Redhat 공식 repository에 접근할 수 없는 이유 때문입니다.

차선책으로 RHEL의 Clone 격인 CentOS의 repository를 사용할 수 있습니다.

두 리눅스는 커널이 똑같기 때문에 rpm을 사용하는데 있어 문제를 야기시키지 않습니다.

  1. repository 정보 변경
<root@linux># cd /etc/yum.repos.d
<root@linux># mv rhel-debuginfo.repo rhel-debuginfo.repo.bak
<root@linux># vi rhel-debuginfo.repo
[base]
name=CentOS-$releasever - Base
baseurl=http://mirror.centos.org/centos/5/os/$basearch/
gpgcheck=1

#released updates
[update]
name=CentOS-$releasever - Updates
baseurl=http://mirror.centos.org/centos/5/updates/$basearch/
gpgcheck=1
:wq

  2. repository 인증 key 불러오기
<root@linux>##rpm --import http://mirror.centos.org/centos/5/os/x86_64/RPM-GPG-KEY-CentOS-5

  3. yum 사용 가능 확인
<root@linux># yum list

yum update / yum install 등을 사용하실 수 있습니다.