GUI在亚马逊EC2 Linux实例 [英] GUI in Amazon EC2 Linux instance

查看:177
本文介绍了GUI在亚马逊EC2 Linux实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Amazon EC2,但我需要知道,如果一个AMI与Linux发行版的GUI存在。

I would like to use Amazon EC2 but I need to know if an AMI with Linux distribution with GUI exists.

推荐答案

这适用于RHEL 6.3的64位(注:意味着超级用户,可以通过更换须藤

This works on RHEL 6.3 64-bit: (note: # means superuser and can be replaced by sudo)

# yum groupinstall "Desktop"    
# yum install tigervnc-server xorg-x11-fonts-Type1
# vncserver 
# chkconfig vncserver on

# vi /etc/sysconfig/vncservers 

编辑的最后两行,取消注释他们,这里是为myuser创建的用户(通常EC2用户)。

Edit the last two lines, uncommenting them, where myuser is a created user (usually ec2-user).

VNCSERVERS="2:myuser"  
VNCSERVERARGS[2]="-geometry 1280x1024"

保存更改。

编辑iptables的:

Edit iptables:

# vi /etc/iptables

添加此行:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT

重启iptables的:

Restart iptables:

# service iptables restart

接下来,编辑的xstartup文件:

Next, edit the xstartup file:

# vi /root/.vnc/xstartup

请在最后一行是:

exec  gnome-session

要完成:

  • 重新启动实例(重置您的vncserver服务)
  • 确保亚马逊安全组允许TCP 5902通信
  • 在本地计算机上启动一个VNC查看器,如RealVNC的公司
  • 连接public_ip:5902

这篇关于GUI在亚马逊EC2 Linux实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆