Centos 7 安裝 X Window
# yum groupinstall "X Window System" # yum grouplist # yum groupinstall "GNOME Desktop" # startx
Centos 7 設定開機執行圖性介面或文字介面
顯示目前系統預設運作層級
# systemctl get-default
設定開機啟動至文字模式(runlevel 3)
# systemctl set-default multi-user.target
設定開機啟動至 GUI 模式(runlevel 5)
# systemctl set-default graphical.target
CentOS Linux 7 xRDP (Linux RDP遠端桌面)
安裝 nux repo source 及 epel REPO
# yum install epel-release -y # rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
安裝 xrdp
# yum -y install xrdp tigervnc-server
啟動 xrdp
# systemctl restart xrdp.service
觀看啟動的狀態
# netstat -antup | grep xrdp tcp 0 0 127.0.0.1:3350 0.0.0.0:* LISTEN 31816/xrdp-sesman tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN 31817/xrdp
xrdp 預設啟動
systemctl enable xrdp.service
設定 selinux 給予權限
# chcon --type=bin_t /usr/sbin/xrdp # chcon --type=bin_t /usr/sbin/xrdp-sesman
開啟防火牆對應埠,也可以直接把防火牆關掉
# firewall-cmd --permanent --zone=public --add-port=3389/tcp # firewall-cmd --reload