RHEL7에 VNC 접근을 위해 VNC 서버를 설치 및 구성해보자.
1. VNC 관련 패키지 설치 (택 일)
# yum install vnc*
or # yum install tigervnc-server
2. VNC 에 접근시 사용할 Password 구성
# vncserver; vncserver -kill :1
----------
Input vnc password :
----------
2. VNC 관련 GUI 패키지 설치
# yum groupinstall 'X Window System' 'Desktop'
3. VNC를 통해 접근 시 사용할 해상도 지정
# vncserver -geometry 1280x768
4. VNC 접근에 사용할 구성파일 편집
# cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@.service
# cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
# vim /etc/systemd/system/vncserver@:1.service
Edit resolution -------------------------------
[Service]
ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i -geometry 1280x768"
PIDFile=/home/<USER>/.vnc/%H%i.pid
-----------------------------------------------
5. VNC 서비스를 위한 방화벽 구성 변경
# firewall-cmd --permanent --zone=public --add-service vnc-server
# firewall-cmd --permanent --zone=public --add-port 5901/tcp
# systemctl restart firewalld
6. VNC 서버 서비스 등록
# systemctl enable vncserver@:1.service
# systemctl daemon-reload
# systemctl start vncserver@:1.service
# systemctl is-enabled vncserver@:1.service
VNC 서비스 사용방법(참고) -------------------------
# systemctl enable vncserver@:display_number.service
# systemctl start vncserver@:display_number.service
# systemctl disable vncserver@:display_number.service
# systemctl stop vncserver@:display_number.service
---------------------------
7. 가상화 서비스 설치(선택)
# yum group list
# yum groupinstall Virtualization*
# yum groupinstall "Server with GUI"
8. 데스크탑 설치(택 일)
# yum groupinstall 'X Window System' 'KDE'
# yum groupinstall 'X Window System' 'GNOME'
# systemctl enable graphical.target --force
# gnome-shell --version
참고자료.
## The systemctl command replaces the chkconfig and the service commands
http://linuxconfig.org/install-gnome-gui-on-rhel-7-linux-server
http://linuxconfig.org/installation-of-kde-desktop-manager-on-rhel-7-linux-server
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-TigerVNC.html#sec-vnc-installation
http://www.certdepot.net/rhel7-get-started-systemd/