Windows主機遠程登錄centos7雲服務器(桌面版)


1. 使用xshell連接centos7服務器,使用root賬戶登錄;

2.安裝epel庫

a) 檢查系統是否已經安裝epel:ram –qa | grep epel
    如果有版本信息反饋則說明已經安裝;

b) 安裝epel庫:yum install epel-release  

   一路選y安裝即可

c) 安裝xrdp:  yum install xrdp

d) 安裝vnc:因為Xrdp最終會自動啟用VNC,所以必須安裝tigervnc-server,否則xrdp無法使用:yum install tigervnc-server

e) 為root用戶設置VNC密碼:vncpasswd root   [密碼]

f) 修改 xrdp最大連接數(使用默認值,不修改也是可以的) :vim /etc/xrdp/xrdp.ini (默認是32)

g) 關閉防火牆

    systemctl disable firewalld # 永久關閉

    reboot # 重啟服務器生效

    systemctl status firewalld # 查詢iptables運行狀態,Active: inactive (dead)表示已關閉

h) 關閉SElinux

    查看selinux狀態:sestatus

    臨時關閉selinux: setenforce 0

   永久關閉selinux: vim /etc/selinux/config

   設置SELINUX=disabled

i) 啟動xrdp:systemctl start xrdp

設置開機自啟動:systemctl enable xrdp

支持配置結束!

3. 使用Windows進行桌面遠程

打開命令行,輸入mstsc,輸入ip,然后輸入賬戶密碼(即為之前為vncroot賬戶設置的密碼)即可

常見問題:

vnc遠程時輸入賬號和密碼后 xrdp閃退, 解決辦法: yum install gnome-classic-session


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM