📜  amazon ec2 gnome install yum - Shell-Bash (1)

📅  最后修改于: 2023-12-03 15:13:18.604000             🧑  作者: Mango

Amazon EC2 Gnome Install Yum

Introduction

In this guide, we will cover the steps to install Gnome desktop environment and Yum package manager on an Amazon EC2 instance. The process involves connecting to the EC2 instance using SSH and executing a series of commands to install and configure the required software.

Prerequisites
  1. Amazon EC2 instance with Internet connectivity.
  2. SSH client (such as PuTTY or OpenSSH) installed on your local machine.
  3. Basic knowledge of using the command line interface.
Steps
  1. Connect to your EC2 instance using SSH. Open your preferred SSH client and enter the following command:

    ssh -i /path/to/your/key.pem ec2-user@ec2-xx-xx-xx-xx.compute-1.amazonaws.com
    

    Replace /path/to/your/key.pem with the actual path to your private key file and ec2-xx-xx-xx-xx.compute-1.amazonaws.com with your EC2 instance's public DNS or IP address.

  2. Update the system packages and install Gnome desktop environment by executing the following command:

    sudo yum update -y
    sudo yum groupinstall "GNOME Desktop" -y
    
  3. Configure the system to start Gnome on boot:

    sudo systemctl set-default graphical.target
    
  4. Reboot the EC2 instance to apply the changes:

    sudo reboot
    
  5. After the instance reboots, reconnect to it using SSH.

  6. Install the X Window System and enable X11 forwarding:

    sudo yum install -y xorg-x11-server-Xorg xorg-x11-xauth xorg-x11-apps
    echo "X11Forwarding yes" | sudo tee -a /etc/ssh/sshd_config
    sudo systemctl restart sshd
    
  7. Install the yum-utils package to enable the yum-config-manager command:

    sudo yum install -y yum-utils
    
  8. Update the system repositories and install additional packages:

    sudo yum update -y
    sudo yum groupinstall "Development Tools" -y
    sudo yum install -y wget curl git
    
  9. The installation process is now complete. You can start the Gnome desktop environment by executing the following command:

    startx
    

    Note: If you are connecting to the EC2 instance via SSH from a remote machine, you need to enable X11 forwarding in your SSH client settings before running startx.

Congratulations! You have successfully installed Gnome desktop environment and Yum package manager on your Amazon EC2 instance. You can now use the graphical interface provided by Gnome to interact with your EC2 instance.