无法在 Azure 中部署的 RHEL 7.2 中使用 Gnome 查看 GUI
Not able to see GUI using Gnome in RHEL 7.2 deployed in Azure
我是 Linux 环境的新手。我在 Azure 中创建了一个 VM,它有 RHEL 7.2。我已经使用 Putty 在其中安装了 Gnome 3.22.3。我看不到它的 GUI。有可能做到吗?我搜索了很多,但是没有找到任何具体的东西。我遵循了这些命令。
1) yum 组列表
2) a) yum groupinstall 'Server with GUI'
(下载后)
这样可以吗[y/d/N]: y
3) yum groupinstall 'X Window System' 'GNOME'
4) systemctl 设置默认 graphical.target
5) gnome-shell --version
6) 重启。
仍然看不到 GUI。
I am NOT able to see the GUI for it. Is it possible to do it?
我们可以在你的虚拟机上安装xrdp
,添加端口3389到NSG入站规则,然后我们就可以使用mstsc
到 RDP 吧。
sudo -s
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
yum -y install xrdp tigervnc-server
systemctl start xrdp.service
netstat -antup | grep xrdp
systemctl enable xrdp.service
firewall-cmd --permanent --zone=public --add-port=3389/tcp
firewall-cmd --reload
这里有一篇关于如何在经典模块中为centos 7启用GUI的博客,请参考this link。
更新:
请按照以下步骤在您的 RHEL 7.2 上安装 xrdp:
1.Install 首先是 RHEL 7.2 上的 Gnome:
yum group install "GNOME Desktop" "Graphical Administration Tools"
yum groupinstall "Server with GUI"
ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
reboot
2.Install 并配置 EPEL 存储库:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
3.Add nux 存储库:
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
或手动:
vi /etc/yum.repos.d/xrdp.repo
[xrdp]
name=xrdp
baseurl=http://li.nux.ro/download/nux/dextop/el7/x86_64/
enabled=1
gpgcheck=0
4.Install xrdp:
yum -y install xrdp tigervnc-server
systemctl start xrdp.service
用这个命令检查它:
netstat -antup | grep xrdp
tcp 0 0 127.0.0.1:3350 0.0.0.0:* LISTEN 1784/xrdp-sesman
tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN 1785/xrdp
在系统启动时启用服务:
systemctl enable xrdp.service
添加3389端口:
firewall-cmd --permanent --zone=public --add-port=3389/tcp
firewall-cmd --reload
配置 SELinux:
chcon --type=bin_t /usr/sbin/xrdp
chcon --type=bin_t /usr/sbin/xrdp-sesman
顺便说一句,我们应该将端口 3389 添加到 NSG 入站规则中:
这是我的结果:
我是 Linux 环境的新手。我在 Azure 中创建了一个 VM,它有 RHEL 7.2。我已经使用 Putty 在其中安装了 Gnome 3.22.3。我看不到它的 GUI。有可能做到吗?我搜索了很多,但是没有找到任何具体的东西。我遵循了这些命令。
1) yum 组列表
2) a) yum groupinstall 'Server with GUI' (下载后) 这样可以吗[y/d/N]: y
3) yum groupinstall 'X Window System' 'GNOME'
4) systemctl 设置默认 graphical.target
5) gnome-shell --version
6) 重启。
仍然看不到 GUI。
I am NOT able to see the GUI for it. Is it possible to do it?
我们可以在你的虚拟机上安装xrdp
,添加端口3389到NSG入站规则,然后我们就可以使用mstsc
到 RDP 吧。
sudo -s
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
yum -y install xrdp tigervnc-server
systemctl start xrdp.service
netstat -antup | grep xrdp
systemctl enable xrdp.service
firewall-cmd --permanent --zone=public --add-port=3389/tcp
firewall-cmd --reload
这里有一篇关于如何在经典模块中为centos 7启用GUI的博客,请参考this link。
更新:
请按照以下步骤在您的 RHEL 7.2 上安装 xrdp:
1.Install 首先是 RHEL 7.2 上的 Gnome:
yum group install "GNOME Desktop" "Graphical Administration Tools"
yum groupinstall "Server with GUI"
ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
reboot
2.Install 并配置 EPEL 存储库:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
3.Add nux 存储库:
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
或手动:
vi /etc/yum.repos.d/xrdp.repo
[xrdp]
name=xrdp
baseurl=http://li.nux.ro/download/nux/dextop/el7/x86_64/
enabled=1
gpgcheck=0
4.Install xrdp:
yum -y install xrdp tigervnc-server
systemctl start xrdp.service
用这个命令检查它:
netstat -antup | grep xrdp
tcp 0 0 127.0.0.1:3350 0.0.0.0:* LISTEN 1784/xrdp-sesman
tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN 1785/xrdp
在系统启动时启用服务:
systemctl enable xrdp.service
添加3389端口:
firewall-cmd --permanent --zone=public --add-port=3389/tcp
firewall-cmd --reload
配置 SELinux:
chcon --type=bin_t /usr/sbin/xrdp
chcon --type=bin_t /usr/sbin/xrdp-sesman
顺便说一句,我们应该将端口 3389 添加到 NSG 入站规则中:
这是我的结果: