Windows通过mstsc远程桌面连接centos7 centos8

简介: centos 安装图形界面

yum install epel-release -y

release=`cat /etc/redhat-release  |grep release | awk -F" " '{print $4}' | awk -F"." '{print $1}'` ; echo "centos 版本为: $release "

case "$release" in

"6") echo " 当前匹配centos 版本为 6"

centos6

;;

"7") echo " 当前匹配centos 版本为 7"

yum groupinstall -y "GNOME Desktop"             ##centos7 安装桌面 安装GNOME Desktop图形桌面服务

ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target

                                                                               # 设置桌面运行模式为默认启动模式

# reboot                                                                   # 重启系统或者    init 5         # 启动桌面模式

;;

"8") echo "当前匹配centos 版本为 8"

sudo dnf groupinstall "Server with GUI" -y # Gnome 是 CentOS 8 中的默认桌面环境

;;

*) echo "您的centos过于老旧,正在匹配低版本"

centos6d

;;

esac


yum install xrdp tigervnc-server -y

systemctl enable xrdp --now

systemctl status xrdp

echo "exec gnome-session" >>  /etc/xrdp/xrdp.ini

systemctl restart xrdp

systemctl start firewalld


#限制防火墙

sudo firewall-cmd --add-port=3389/tcp --permanent

sudo firewall-cmd --reload


# 一键安装:wget www.eisc.cn/file/shell/centos-mstsc.sh ; sh centos-mstsc.sh


#相关链接:  升级bash 设置中文语言:https://www.eisc.cn/index.php?c=read&id=616&page=1

# ubuntu 安装桌面:https://help.aliyun.com/document_detail/59330.html

目录
相关文章
|
1月前
|
NoSQL 网络安全 Redis
用Windows连接Liunx中的redis
用Windows连接Liunx中的redis
23 0
|
3月前
|
Ubuntu 网络协议 Linux
如何在无公网IP环境使用Windows远程桌面Ubuntu
如何在无公网IP环境使用Windows远程桌面Ubuntu
57 0
|
1月前
|
Linux 开发工具 C语言
Centos8下编译安装最新版ffmpeg解决方案(含Centos8换源阿里云)
Centos8下编译安装最新版ffmpeg解决方案(含Centos8换源阿里云)
143 3
|
4月前
|
Linux 网络安全 Docker
windows ssh连接docker 容器
windows ssh连接docker 容器
94 0
|
6月前
|
Shell 网络安全 开发工具
Windows环境安装及配置git并连接gitee远程仓库
Windows环境安装及配置git并连接gitee远程仓库
295 0
|
3月前
|
安全 网络安全 数据安全/隐私保护
远程桌面连接出现了内部错误怎么解决?
远程桌面连接出现了内部错误怎么解决?
|
5月前
|
网络协议 Linux 网络安全
Windows远程连接centos7图形化界面,安装xrdp
Windows远程连接centos7图形化界面,安装xrdp
138 0
|
1月前
|
弹性计算 安全 数据安全/隐私保护
远程桌面连接Windows实例,提示“为安全考虑,已锁定该用户账户,原因是登录尝试或密码更改尝试过多”错误解决方案
远程桌面连接Windows实例,提示“为安全考虑,已锁定该用户账户,原因是登录尝试或密码更改尝试过多”错误解决方案
157 0
|
5月前
|
数据可视化 Ubuntu Unix
Linux 怎样通过win 远程桌面连接链接Linux后台服务器的可视化图形界面
第一行:允许用户youuser执行sudo命令(需要输入密码). 第二行:允许用户组youuser里面的用户执行sudo命令(需要输入密码).
44 0
|
1月前
|
数据安全/隐私保护 Windows
Windows Server 2003 搭建邮件服务器实现自建邮箱域名及账户并连接外网
Windows Server 2003 搭建邮件服务器实现自建邮箱域名及账户并连接外网
27 0