关闭

如何在亚马逊 AWS EC2建立一个Debian服务器

标签: aws
1413人阅读 评论(0) 收藏 举报
分类:

Introduction

This guide will cover the basic setup of an Amazon AWS account including sign up, creation and configuration of an EC2 instance.

To create an Amazon AWS account, you need:

  • e-mail address
  • credit card
  • phone number

To follow this guide, you will need these additional software downloads.

  • putty.exe for SSH connection
  • puttygen.exe to create keys for login
  • pageant.exe to load the created keys

Key creation

Before we start with Amazon AWS, let’s create our login keys with puttygen.exe.
这里写图片描述
1. Start puttygen.exe. Choose RSA and 2048 bits from the bottom.
2. Click on “Generate”
3. Choose a “Key comment” (for example: name of your node)
4. Choose a “Key passphrase” and confirm it
5. Save the public key & private key files
6. Close puttygen

Signup

Open the Amazon AWS signup website and click “Create an AWS Account”.
这里写图片描述
Choose “I am a new user,” and enter your e-mail address.
这里写图片描述
Type your e-mail address again and enter your password.
这里写图片描述
Enter your contact information and agree to the terms of service.
这里写图片描述
Enter your payment information.
这里写图片描述
Enter the security check characters and your telephone number. After pressing the button “call me now” you will see a code and receive a phone call. Enter this code on your telephone’s keyboard.
这里写图片描述
After entering the right code, you will see this screen.
这里写图片描述
Select a support plan. For expample “basic”.
这里写图片描述
Before logging in the first time, wait until the “Welcome to Amazon Web Services” email arrives.
这里写图片描述

First log in

Click on the link “Getting Started Resources” in the email you received.
这里写图片描述
You can also use this link https://console.aws.amazon.com/
Click on “Sign in to the Console”.
这里写图片描述
Enter your email and password.
这里写图片描述

Importing a Public Key

Select “EC2” in the “AWS Services” box.
这里写图片描述
Select “Key Pairs” in the “Network & Security” Section.
这里写图片描述
Select “Import Key Pair”.
这里写图片描述
Select your public key file (created in the begin of this guide with puttygen).
这里写图片描述
Define a key pair name and press “Import”.
这里写图片描述

Launch an EC2 Instance

Move to the “EC2 Dashboard” and press “Launch Instance”.
这里写图片描述
Go to “AWS Marketplace”, search for “Debian” and select it from the list.
这里写图片描述
Choose “Debian GNU/Linux 8 (Jessie)” and click create.
这里写图片描述
Choose an instance type. For operating a Supernode, we recommend using at least a “t2.small” instance. To continue, click on “configure instance details”.
这里写图片描述
Use the default settings and click on “add storage.”
这里写图片描述
Use the default settings and click on “add tags”.
add storage
add storage
Click to “add a name tag”.
name tag
name tag
Enter your desired server name in the value column. E.g. “Supernode”
To go on click “Configure Security Group”
server name
server name
Add the following rules:
Type: Custom TCP, Port Range: 7890, Source: Anywhere (for NIS)
Type: Custom TCP; Port Range 7880, Source: Anywhere (for servant)
Type: Custom TCP, Port Range 7778, Source: Anywhere (for light wallets)
Notice: For security reasons, you may restrict SSH access by entering your IP-address instead of 0.0.0.0/0 in the first row.
configure security group
configure security group
Now select the key pair you have uploaded in the “importing a public key” section of this guide and click on the checkbox to acknowledge that you have access to the private key file (you already created the private key in puttygen in the first section of this guide). Finally, click on “Launch Instance”!
select an existing key pair
select an existing key pair
After launching, you will see a screen indicating the launch status. Click on “View Instances”.
launch status
launch status
Write down the Public DNS. E.g. ec2-XX-XX-X-XXX.us-east-2.compute.amazonaws.com
public dns
public dns
Connecting to your new EC2 Instance
After setting up the instance, we will try to connect to our server.
Start pageant.exe and open “View Keys” from the tray icon.
pageant
pageant
Click on “Add Key” and select your saved private key (.ppk) you created earlier with puttygen. After the key is loaded, you can minimize pageant to tray (but don’t shut it down, it needs to run in the background).
Start putty.exe.
pageant
pageant
Start putty and navigate to “Connection - SSH - Auth”. Browse for your private key file (.ppk).
putty auth key
putty auth key
Navigate to “Connection - Data” and input “admin” in the auto-login username field.
putty data
putty data
Go to “Session” and enter your instance Public DNS (E.g. ec2-XX-XX-X-XXX.us-east-2.compute.amazonaws.com, not your instance IP-address) in the “host name” field. Save the session (optional) and click “Open”.
putty host name
putty host name
A console will open. A username and password are not needed, it will automatically load your username from putty and your key from pageant!
Root access
By default, the user root is deactivated. To activate, log in as a standard user.
Type the following in the console:
sudo su -
Set a root password with:
passwd
After setting a password, the root user is activated. To login to your EC2 instance you will still need the standard user (with RSA-key login), but as soon as you are logged in, you can change to root with:
su
Install Supernode
The EC2 instance is now ready for installation.
For the Installation, we will use Paul’s guide (click here), since it has covered everything.
There is one value which you have to change: From section 1.3 change:
Java -Xms768M -Xmx768M
to:
Java -Xms1024M -Xmx1024M
Other than that you can follow the guide, and your supernode will be set up correctly!

0
0
查看评论

亚马逊AWS EC212个月免费计划及连接问题

在亚马逊AWS官网进行注册,如果已有亚马逊账号,直接登录即可。之后在产品一栏选择Amazon EC2,进入页面后,在最后选择获取12个月免费套餐。链接地址在这里(AWS免费套餐)。按照界面提示,依次注册即可。值得注意的是,注册过程中需要填写信用卡卡号,在你超出套餐之外的费用将从信用卡里直接扣除,如果...
  • qq_35882901
  • qq_35882901
  • 2017-08-30 16:07
  • 371

在AWS上创建linux系统EC2使用docker

最近研究将金蝶eas安装在docker容器中运行,AWS上linux系统是自带了docker的,所以我们可以是很方便的使用. 在这里我们选择的Cent OS系统的centos7.0-offical-bootable - ami-14118d2d,主要的原因是其它的Cent OS系统我没有...
  • u012891504
  • u012891504
  • 2016-06-17 14:10
  • 3129

aws 复制当前环境到另外一个地方

http://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing....
  • vbaspdelphi
  • vbaspdelphi
  • 2017-03-13 17:44
  • 545

对AWS的计费有点糊涂

对AWS的计费有点糊涂 今天收到亚马逊的账单,就两笔 1. US West (Oregon) Region     Elastic IP Addresses $0.005 per Elastic IP address not attached to a r...
  • tty521
  • tty521
  • 2017-02-05 04:46
  • 2616

亚马逊AWS免费套餐EC2安装centos连接登录并创建root

前言:刚开始使用亚马逊的AWS的免费套餐EC2,由于个人习惯使用centos系统,所以果断安装,但是AWS为了安全性,默认禁止用户使用root账户,导致安装配置环境各种问题。所以我把从安好系统后遇到的一些基本问题整理出来,方便大家更快的入手! 涉及到的问题: 1. 如何在aws上安装ce...
  • AterMerry
  • AterMerry
  • 2016-04-26 22:20
  • 7569

AWS (Amazon Web services) 免费主机测试使用流程 – 绑定域名

AWS (Amazon Web services) 免费主机测试使用流程 – 绑定域名 Amazon EC2 除了做翻墙利器,同时也可以作为自己的网站主机啦,网站可以托管在 EC2 上面,并且还支持免费绑定域名啦。 EC2 可以申请免费的固定IP,如果你没申请IP绑定前,每次重启服务器你的I...
  • along602
  • along602
  • 2011-05-11 17:31
  • 19079

有關AWS EC2 (EBS 收費)的問題

有關AWS EC2 (EBS 收費)的問題 之前一陣子的時候,公司在使用Amazone Web Service (AWS)的 EC2 (Amazon Elastic Compute Cloud)。不過就在關掉EC2的機器之後,發現Amazone在charge費用上,出現另人不解的地方。那個問題...
  • tty521
  • tty521
  • 2017-02-05 04:50
  • 399

自己学Docker:11.Docker版本--CE和EE

Docker在2016年很早的时候就明确了将会在企业级方面重点跟进。而且最近一年docker的版本也发生很大变化,具体可以参见自己学Docker:10.Docker.v1.12升级到v1.13.0 正式版(注意:按照本文的步骤安装,最终安装的版本为当前最新的ce版–Docker version 17...
  • Mungo
  • Mungo
  • 2017-04-28 13:42
  • 2648

亚马逊EC2建立虚拟机并使用ssh连接

登录亚马逊AWS后,在页面右上角可以选择服务节点,可选择最快的服务器地址,服务器列表可参考此页面:http://ec2-reachability.amazonaws.com,通过ping页面里各节点地址找到最快的节点; 在上方导航菜单的“服务”中选择“EC2”,然后点击“启动实例”; 选择AMI(A...
  • jewely
  • jewely
  • 2017-09-19 14:55
  • 1396

在亚马逊云EC2上创建root用户,并使用root用户登录

http://www.kankanews.com/ICkengine/archives/108965.shtml 今天开始研究亚马逊的云主机EC2,遇到了一个问题,我需要在EC2上安装tomcat,但是yum命令只能是root用户才可以运行,而EC2默认是以ec2-user用户登录的,所以...
  • dszgf5717
  • dszgf5717
  • 2016-06-23 16:02
  • 3500
    个人资料
    • 访问:29121次
    • 积分:472
    • 等级:
    • 排名:千里之外
    • 原创:17篇
    • 转载:0篇
    • 译文:1篇
    • 评论:8条
    文章分类
    最新评论