#===================================
# 【RHEL9 XRDP設定】
#===================================
# リポジトリ有効化
# (EPEL依存関係)
subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
#===================================
# epelパッケージインストール
# (外部レポジトリ追加)
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
#===================================
# リポジトリの表示
# ('epel'が追加されていることを確認する)
dnf repolist
#===================================
# XRDPインストール
# (RDP機能をLinuxで利用する機能追加)
dnf --enablerepo=epel install -y xrdp
#===================================
# tigervnc-serverインストール
# (VNCサーバ機能の追加)
dnf --enablerepo=epel install -y tigervnc-server
#===================================
# XRDPサービス起動
systemctl start xrdp
#===================================
# XRDPサービス自動起動の有効化
systemctl enable xrdp
#===================================
# ファイヤーウォール設定(3389/tcp)
firewall-cmd --permanent --zone=public --add-port=3389/tcp
#===================================
# ファイヤーウォール設定の反映
firewall-cmd --reload
#===================================
# XRDP接続用のIPアドレスを確認する
# ※ Windows RDP接続 ⇒リモートデスクトップでRHEL9にログインする
ip a | grep "inet "
PR