GUI in Amazon EC2 Linux instance

后端 未结 5 1045
青春惊慌失措
青春惊慌失措 2021-02-02 17:29

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

相关标签:
5条回答
  • 2021-02-02 17:49

    I don't know if it exits. But you can usually install a VNC server on any Linux installation, including existing AMIs. And then connect using a VNC client to get remote desktop.

    Or use an NX server and client.

    Or even plain X protocol, but this will be very slow.

    0 讨论(0)
  • 2021-02-02 17:51

    You can install GNOME on LINUX AMI's for GUI. You can also make use of NOMACHINE for this. If you are making use of Ubuntu AMI's follow steps mentioned below :

    export DEBIAN_FRONTEND=noninteractive
    sudo -E apt-get update
    sudo -E apt-get install -y ubuntu-desktop
    
    0 讨论(0)
  • 2021-02-02 18:05

    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 
    

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

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

    Save changes.

    Edit iptables:

    # vi /etc/iptables
    

    Add this line:

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

    Restart iptables:

    # service iptables restart
    

    Next, edit the xstartup file:

    # vi /root/.vnc/xstartup
    

    Make the last line be:

    exec  gnome-session
    

    To finish:

    • Reboot the instance (to reset your vncserver services)
    • Ensure the amazon security group allows tcp 5902 traffic
    • Launch a VNC Viewer such as RealVNC's on your local computer
    • Connect to public_ip:5902
    0 讨论(0)
  • 2021-02-02 18:12

    You can check out the post here if you are interested in using Freenx to connect to an Amazon AMI using Fedora, CentOS, RHEL (or any other yum based distro).

    0 讨论(0)
  • 2021-02-02 18:12

    Here are the instructions (thanks to Renan from AWS) I received May 2015.

    1. Launch a new, or use an existing, Ubuntu instance. I used Ubuntu 13.10 Saucy Salamander, 64-bit.10:08:04 AM
    2. Update the system package list:10:08:04 AM sudo apt-get update10:08:04 AM
    3. Optional - I recommend upgrading all installed packages, even the kernel. There may be reasons not to want this, however:10:08:04 AM sudo apt-get dist-upgrade10:08:04 AM
    4. Install LXDE and TightVNC (This will take a while, depending on the instance type):10:08:04 AM sudo apt-get install lxde tightvncserver10:08:04 AM
    5. Reboot the system:10:08:04 AM sudo reboot10:08:04 AM
    6. Start up a VNC server (on localhost - since VNC itself isn't very secure, we'll use SSH)10:08:04 AM vncserver -geometry 1024x768 -depth 16 -localhost :110:08:04 AM Note: the VNC server will ask you to set and confirm a password. You will use this when you connect your VNC client.10:08:04 AM
    7. Install a suitable VNC viewer, such as TightVNC on Windows: http://www.tightvnc.com/download.php 10:08:04 AM or Remmina on Linux (usually installed by default, or at least available in the repositories).10:08:04 AM Sorry, I'm not sure what Mac users install for VNC, but apparently there's a Java-based viewer at least: http://www.tightvnc.com/faq.php#macosx 10:08:04 AM
    8. Create an SSH tunnel:10:08:04 AM ssh -L 5901:localhost:5901 -N -f -i ubuntu@10:08:04 AM On Windows PuTTY, enter the usual settings (login, address, key file) then go to Connection > SSH > Tunnels and enter 5901 for Source Port and localhost:5901 for Destination, then click Add, and start your session.10:08:04 AM
    9. Finally, launch your VNC viewer and connect to localhost:5901, then enter the VNC password you chose earlier.10:08:04 AM
    10. Enjoy your encrypted, remote Linux GUI.
    0 讨论(0)
提交回复
热议问题