[Passo-a-Passo] Amazon EC2 - Como subir um servidor gratuito na AWS
3 min read
6 hours ago
Published on Nov 14, 2024
This response is partially generated with the help of AI. It may contain inaccuracies.
Table of Contents
Introduction
In this tutorial, you will learn how to set up a free server on Amazon Web Services (AWS) using the Elastic Compute Cloud (EC2). This guide is designed for beginners and will take you through the step-by-step process of creating a Linux server within the AWS Free Tier, ensuring you won't incur any costs.
Step 1: Create an AWS Account
- Visit the AWS website.
- Click on "Create a Free Account."
- Follow the prompts to enter your email address, password, and account name.
- Provide payment information. Note that you won't be charged for using the Free Tier.
- Verify your identity through a phone call or SMS.
- Choose the Free Tier option when prompted.
Step 2: Access the EC2 Dashboard
- Log in to your AWS Management Console.
- In the search bar, type "EC2" and select "EC2" from the results.
- You will be directed to the EC2 Dashboard, where you can manage your servers.
Step 3: Launch a New Instance
- Click on the "Launch Instance" button.
- Choose an Amazon Machine Image (AMI):
- Select an Ubuntu Server (or another Linux distribution) that is eligible for the Free Tier.
- Select an Instance Type:
- Choose "t2.micro," which falls under the Free Tier.
Step 4: Configure Instance Details
- Click on "Next: Configure Instance Details."
- Leave the default settings as they are. You can adjust these later if necessary.
- Click on "Next: Add Storage."
Step 5: Add Storage
- The default storage settings are usually sufficient for basic use.
- Click "Next: Add Tags."
Step 6: Add Tags
- Tags are useful for organizing and managing your instances. You can add a tag like:
- Key: Name
- Value: MyFirstServer
- Click on "Next: Configure Security Group."
Step 7: Configure Security Group
- Create a new security group to define your server's access rules.
- Add rules to allow traffic:
- Type: SSH
- Protocol: TCP
- Port Range: 22
- Source: My IP (to allow only your IP address to access the server)
- Click "Review and Launch."
Step 8: Review Your Configuration
- Check all settings to ensure they are correct.
- Click "Launch."
Step 9: Create a Key Pair
- When prompted, create a new key pair. This will be used to access your server.
- Download the key pair file (.pem) and save it securely.
- Click "Launch Instances" to finish the process.
Step 10: Connect to Your Instance
- Go back to the EC2 Dashboard and find your instance under "Instances."
- Select the instance and click on the "Connect" button.
- Follow the instructions provided:
- Use an SSH client to connect, for example:
ssh -i /path/to/your-key.pem ubuntu@your-instance-public-dns
- Replace
/path/to/your-key.pem
with the path to your downloaded key pair file andyour-instance-public-dns
with your instance's public DNS.
- Use an SSH client to connect, for example:
Conclusion
Congratulations! You have successfully set up a free server on AWS EC2. You can now use this server for various applications, such as web hosting, development, or learning Linux commands. Explore further by installing software or configuring your server according to your needs. Remember to monitor your usage to stay within the Free Tier limits.