2015年8月9日 星期日

Install xrdp on CentOS 7 / RHEL 7

  1. 連結至:http://www.itzgeek.com/how-tos/linux/centos-how-tos/install-xrdp-on-centos-7-rhel-7.html
    並照網頁說明步驟一一執行
      
  2. # gedit /etc/yum.repos.d/xrdp.repo
    編輯 xrdp 來源檔

     
  3. 依照網頁說明輸入

     
  4. # yum clean all
    # yum update

    清除緩存並更新 yum 庫

     
  5. # yum -y install xrdp tigervnc-server
    開始安裝


    這裡安裝時發生了一個小插曲
    當執行 yum 安裝 Linux Package 時,出現了以下訊息:
    「Another app is currently holding the yum lock; waiting for it to exit…」
    搜尋相關資料後,使用下列指令解決,並順利安裝:
    # rm -f /var/run/yum.pid


     
  6. # systemctl start xrdp.service
    啟動 xrdp 服務
    # systemctl enable xrdp.service
    開機時,自動啟動 xrdp 服務


     
  7. # firewall-cmd --permanent --zone=public --add-port=3389/tcp
    # firewall-cmd --reload

    因為 xrdp 是走 port 3389 連線,所以需設定防火牆,將 port 3389 打開


     
  8. # chcon --type=bin_t /usr/sbin/xrdp
    # chcon --type=bin_t /usr/sbin/xrdp-sesman

    Configure SELinux

     
  9. 使用家中另一台筆記型電腦(作業系統是Windows 7 sp1)連線測試成功