search
HomeSystem TutorialLINUXAmazon Cloud sets up a server for free to create your instance
Amazon Cloud sets up a server for free to create your instanceJul 03, 2024 pm 01:41 PM
linuxlinux tutorialRed Hatlinux systemlinux commandlinux certificationred hat linuxlinux video

As a developer, I have always hoped to have my own server to deploy applications. I have been interested in Alibaba Cloud/Tencent Cloud for a long time, but the trial period of both is not long. Alibaba’s is up to 30 days, while Tencent’s It only lasts 7 days. I have put it aside because I have no special needs

I heard that Amazon Cloud has a one-year free trial before, but I was worried that overseas servers might be inconvenient, so I didn’t try it. Recently, on a boring afternoon, I finally decided to give it a try. I fiddled with two items and it seemed quite convenient. Now I put myself Let me summarize my experience of stepping into pitfalls and share it with you.

Create Free EC2 Instance on AWS

Account application

The free qualifications of Amazon Cloud (AWS for short) are quite generous. New users can get a one-year free trial qualification. So the first step is to apply for an account on AWS, and all you need to prepare is an email and a credit card .

AWS cloud service has a Chinese official website, so the operation is relatively convenient. Unfortunately, the access speed is relatively slow, and we need enough patience. You can click Create a free account directly on the page to enter the registration page, or AWS Console - Signup, just follow the steps step by step. During the registration process, you will be bound to a credit card number and deduct a $1 pre-authorization. There will not be any prompts such as verification codes. However, it is said that Amazon’s reputation is still It’s good, they won’t charge you randomly, and you can complain if you exceed the budget, so if you are worried, please stop, or limit your credit card to 0~

Because it’s been a long time since I applied for an account, I can’t remember the specific details, but in short it will be relatively smooth

Create EC2 instance

After applying for an account, you can log in to the console

Amazon Cloud sets up a server for free to create your instance

The first step into the console is that you can get familiar with the environment, but it is best for us to choose a home for the server. Click on the region where the server is located in the icon, and a list of all selectable regions will be displayed. Generally, the default is Oregon, USA. I chose Asia Pacific Tokyo, mainly because I heard that the latency is relatively low.

OK, prepare to create the first server instance in AWS. The process is also very simple. Click Start Instance, and you will enter the AWS image market. Note: If you want to try it for free, please choose the one that includes a free logo throughout the process. content. Since this is the first instance, choose a simple image.

Amazon Cloud sets up a server for free to create your instance

This is an image configured with a simple development environment, Linux system. Select the Instance Type labeled Free Tier with Eligibility

Amazon Cloud sets up a server for free to create your instance

We use the default configuration and click the review and start buttons directly. Then you will see some overviews. In fact, I don’t understand them very well, so just click start. AWS will then ask you to configure a key pair, which is your credential for remote access to the instance, and give it a name, such as MyPair. Download it and keep your key pair. The Amazon tutorial suggests that we put it under your user.ssh folder in C:Users, which may be a good idea.

Amazon Cloud sets up a server for free to create your instance

After clicking Start, we return to the console and enter the instance tab. You will find that your newly created instance is starting. Don't wait a moment. When the instance status turns green running, your instance will be started.

Use ssh to connect to your instance

When the instance is started, you will be assigned a public IP. This public IP will not change if you do not restart it. If you want a fixed IP, you can first look at #Elastic IP Application and Binding. In the AWS introductory tutorial, you will use the git command line to connect to the instance. If you have git installed, you can right-click Git Bash Here at any location

 ssh -i <span class="hljs-string">'私钥地址\MyPair.pem'</span> ec2-<span class="hljs-symbol">user@</span>{公网IP 地址}

If the connection is successful, you will see the AWS welcome page.

Another option is available on AWS, using PuTTY to connect to a Linux instance from Windows. The tutorial is in Chinese and is not difficult to understand. The overall process is

  • Install PuTTY
  • Convert the key pair from pem to ppk format supported by PuTTY (use PuTTYgen tool, included)
  • Open PuTTY to configure
  • Configure session-Host Name default port 22, and Connection-SSH-Auth to specify the ppk file location
  • Go back to the session page, give the Saved Session a name, and save it for easy access next time. You can connect by double-clicking later
  • Click Open to open the session and enter the command line interface. The Host Name format is ec2-user@{public IP address}. ec2-user is the default user name of Amazon Linux AMI, not your user name.

WinSCP can be installed by exchanging instance files. If you have saved the session in PuTTY, you can import it directly without reconfiguring when opening WinSCP.

There is a detailed tutorial in the link just provided. If you don’t understand, you can study it carefully

Elastic IP application and binding

We know that the public IP is actually the home of your server on the Internet. If your home is always moved, it will be easy for friends to find you. AWS will allocate a public IP to each instance, but it is not fixed. If we want to fix an IP, we need to apply for an elastic IP.

Applying for an elastic IP is very, very, very simple. You only need to enter the elastic IP tab page - assign a new address - allocate.

Amazon Cloud sets up a server for free to create your instance

Action Note AWS’s elastic IP allocation policy is very interesting. It is free to apply for an IP, but there is a charge for idle time. The IP you apply for must be bound to a running instance, otherwise it will be charged at 0.05USD per hour. I incurred a 0.5USD bill just because I shut down an instance for one night.

So, the applied IP should be allocated immediately, just operate-associate address-select the associated instance-associate. If there are excess IPs, you can release them by operating - Release Address.

Security Group Policy

Each instance will have a security group policy to control the open status of the port. By default, only SSH port 22 is open. We can configure security group policies according to our own needs.

Amazon Cloud sets up a server for free to create your instance

You can enter the security group policy through the best column of the instance status bar. For example, if I want to build a Web website, then I need to open port 80 and port 443 in the inbound policy. In the same way, if you build a website but cannot access it from the outside, it may be that your HTTP port is not open.

Free limit

AWS free limit is relatively generous, with 750 hours of instance running time per month, which means that if you only open one instance, it will not exceed the limit if it is run 24 hours a day. There is 15G of outbound traffic every month. Generally, the traffic is quite expensive, so please use it and cherish it. For more information, see AWS Free Usage Plan FAQ.

Secondly, there is the elastic IP issue mentioned just now. If you are worried about it, you can not apply for an elastic IP. It is guaranteed that the IP will not be changed without shutting down the instance.

The above is the detailed content of Amazon Cloud sets up a server for free to create your instance. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
什么是linux设备节点什么是linux设备节点Apr 18, 2022 pm 08:10 PM

linux设备节点是应用程序和设备驱动程序沟通的一个桥梁;设备节点被创建在“/dev”,是连接内核与用户层的枢纽,相当于硬盘的inode一样的东西,记录了硬件设备的位置和信息。设备节点使用户可以与内核进行硬件的沟通,读写设备以及其他的操作。

Linux中open和fopen的区别有哪些Linux中open和fopen的区别有哪些Apr 29, 2022 pm 06:57 PM

区别:1、open是UNIX系统调用函数,而fopen是ANSIC标准中的C语言库函数;2、open的移植性没fopen好;3、fopen只能操纵普通正规文件,而open可以操作普通文件、网络套接字等;4、open无缓冲,fopen有缓冲。

linux中什么叫端口映射linux中什么叫端口映射May 09, 2022 pm 01:49 PM

端口映射又称端口转发,是指将外部主机的IP地址的端口映射到Intranet中的一台计算机,当用户访问外网IP的这个端口时,服务器自动将请求映射到对应局域网内部的机器上;可以通过使用动态或固定的公共网络IP路由ADSL宽带路由器来实现。

linux中eof是什么linux中eof是什么May 07, 2022 pm 04:26 PM

在linux中,eof是自定义终止符,是“END Of File”的缩写;因为是自定义的终止符,所以eof就不是固定的,可以随意的设置别名,linux中按“ctrl+d”就代表eof,eof一般会配合cat命令用于多行文本输出,指文件末尾。

linux怎么判断pcre是否安装linux怎么判断pcre是否安装May 09, 2022 pm 04:14 PM

在linux中,可以利用“rpm -qa pcre”命令判断pcre是否安装;rpm命令专门用于管理各项套件,使用该命令后,若结果中出现pcre的版本信息,则表示pcre已经安装,若没有出现版本信息,则表示没有安装pcre。

linux怎么查询mac地址linux怎么查询mac地址Apr 24, 2022 pm 08:01 PM

linux查询mac地址的方法:1、打开系统,在桌面中点击鼠标右键,选择“打开终端”;2、在终端中,执行“ifconfig”命令,查看输出结果,在输出信息第四行中紧跟“ether”单词后的字符串就是mac地址。

手机远程linux工具有哪些手机远程linux工具有哪些Apr 29, 2022 pm 05:30 PM

手机远程linux工具有:1、JuiceSSH,是一款功能强大的安卓SSH客户端应用,可直接对linux服务进行管理;2、Termius,可以利用手机来连接Linux服务器;3、Termux,一个强大的远程终端工具;4、向日葵远程控制等等。

linux中lsb是什么意思linux中lsb是什么意思May 07, 2022 pm 05:08 PM

linux中,lsb是linux标准基础的意思,是“Linux Standards Base”的缩写,是linux标准化领域中的标准;lsb制定了应用程序与运行环境之间的二进制接口,保证了linux发行版与linux应用程序之间的良好结合。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.