Files
sundol/docs/setup-xwindow.md
joungmin afc9cdcde6 Refactor Playwright to singleton browser with tab-based crawling
- Add PlaywrightBrowserService: singleton Chromium browser with auto-recovery
- Refactor WebCrawlerService/YouTubeTranscriptService to use shared browser tabs
- Fix YouTube transcript: extract from DOM panel + fmt=json3 fallback
- Keep browser window alive (about:blank instead of page.close)
- Add docs: X Window setup, operation manual, crawling guide

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 19:18:33 +00:00

3.0 KiB

X Window + XFCE + VNC 설치 매뉴얼

OCI(Oracle Cloud Infrastructure) Oracle Linux 9 환경 기준.

1. 사전 확인

# Xorg 설치 여부 확인
which Xorg
rpm -q xorg-x11-server-Xorg

# DISPLAY 환경변수 확인 (비어있으면 X 서버 미실행 상태)
echo $DISPLAY

2. EPEL 저장소 설치

sudo dnf install -y epel-release

3. XFCE 데스크톱 환경 설치

sudo dnf groupinstall -y "Xfce"

GNOME 대비 경량이라 서버 환경에 적합.

4. 기본 타겟을 GUI 모드로 변경

sudo systemctl set-default graphical.target

되돌리려면: sudo systemctl set-default multi-user.target

5. TigerVNC 서버 설치

SSH 원격 접속 환경에서는 VNC를 통해 GUI에 접근한다.

sudo dnf install -y tigervnc-server

6. VNC 비밀번호 설정

vncpasswd

VNC 비밀번호는 최대 8자까지만 유효.

7. VNC 시작 스크립트 설정

mkdir -p ~/.vnc

cat > ~/.vnc/xstartup << 'EOF'
#!/bin/bash
exec startxfce4
EOF

chmod +x ~/.vnc/xstartup

8. VNC 서버 시작

vncserver :1 -geometry 1920x1080 -depth 24
  • :1 = 포트 5901
  • :2 = 포트 5902 (추가 세션 필요 시)

VNC 서버 중지

vncserver -kill :1

9. 방화벽 포트 개방

sudo firewall-cmd --permanent --add-port=5901/tcp
sudo firewall-cmd --reload

OCI 보안 목록 설정

OCI 콘솔에서 해당 서브넷의 Security List에 인바운드 규칙 추가:

  • Source: 접속할 IP (또는 0.0.0.0/0)
  • Protocol: TCP
  • Destination Port: 5901

10. 클라이언트에서 VNC 접속

Mac

기본 내장 Screen Sharing 사용:

# Finder에서 Cmd+K → 아래 주소 입력
vnc://공인IP:5901

# 또는 터미널에서
open vnc://공인IP:5901

Windows

  • RealVNC Viewer, TigerVNC Viewer 등 VNC 클라이언트 설치
  • 주소: 공인IP:5901

11. Chrome 브라우저 설치

# Google Chrome 저장소 추가
cat << 'EOF' | sudo tee /etc/yum.repos.d/google-chrome.repo
[google-chrome]
name=google-chrome
baseurl=https://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl.google.com/linux/linux_signing_key.pub
EOF

# 설치
sudo dnf install -y google-chrome-stable

12. 한글 폰트 설치

브라우저 등에서 한글이 깨지는 경우 CJK 폰트를 설치한다.

sudo dnf install -y google-noto-sans-cjk-ttc-fonts google-noto-serif-cjk-ttc-fonts

# 폰트 캐시 갱신
fc-cache -fv

설치 후 Chrome 등 브라우저를 재시작해야 반영됨.

트러블슈팅

VNC 접속이 안 될 때

# VNC 서버 실행 확인
vncserver -list

# 로그 확인
cat ~/.vnc/*.log

# 방화벽 확인
sudo firewall-cmd --list-ports

화면이 회색/빈 화면일 때

~/.vnc/xstartup 파일 내용이 올바른지 확인:

cat ~/.vnc/xstartup
# exec startxfce4 가 있어야 함

VNC 서버 재시작:

vncserver -kill :1
vncserver :1 -geometry 1920x1080 -depth 24