可参考
https://www.linuxcapable.com/how-to-install-xfce-desktop-on-centos-9-stream/
https://access.redhat.com/discussions/6964666
先说结论,centos9安装完,rdp远程时很卡,但rocky linux 9/almalinux 9很流畅,参考https://cloud.tencent.com/developer/article/1627252给centos8.x安装xfce图形界面(适用opencloudos8.x),rdp远程时也很流畅。
关于yum install epel-release -y
# centos 9 stream 版本
dnf upgrade --refresh
dnf config-manager --set-enabled crb
dnf install epel-release epel-next-release
# RHEL 9.0
subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
# AlmaLinux 9 / rocky linux 9
dnf config-manager --set-enabled crb
dnf install epel-release
代码语言:javascript复制yum install epel-release -y
yum install glibc-common -y
yum groupinstall "Xfce" "base-x" -y
yum install chkconfig ibus ibus-gtk2 ibus-gtk3 ibus-libpinyin im-chooser gtk2-immodule-xim gtk3-immodule-xim firefox -y
yum install xrdp -y
echo 'LANG=zh_CN.utf8' > /etc/locale.conf
source /etc/locale.conf
echo "exec /usr/bin/xfce4-session">>~/.xinitrc
chkconfig xrdp on && service xrdp restart
systemctl set-default graphical
到这一步其实已经可以reboot重启机器验证mstsc的远程效果了,我验证了,发现打开浏览器后中文乱码
以下是解决中文乱码的
yum install fontconfig
mkdir -p /usr/share/fonts/chinese/
将C:WindowsFonts里的你需要的中文字体文件放到/usr/share/fonts/chinese/目录下
宋体文件为:simsun.ttc
楷体文件为:simkai.ttf
可以先创建个目录,把你需要的中文字体拷贝过去,然后再从那个目录上传到/usr/share/fonts/chinese/目录下
例如:
md E:fonts
copy C:WindowsFontssimsun.ttc E:fonts
copy C:WindowsFontssimkai.ttf E:fonts
可以用rz命令或filezilla客户端走sftp协议先上传到服务器 然后执行下面2句
chmod -R 755 /usr/share/fonts/chinese
fc-cache -fv
然后就可以用fc-list命令查看已经安装的字体了
然后reboot用mstsc远程即可