Ubuntu 简明教程

Ubuntu - On the Cloud

我们可以在 Google Cloud、Amazon web services 和 Azure web services 等各种云环境中安装 Ubuntu。在本章中,我们将看到如何在 Amazon web services 上启动并运行 Ubuntu。以下是实现此目的的步骤。

We can also install Ubuntu on various cloud environments such as Google Cloud, Amazon web services, and Azure web services. In this chapter, we will see how to get Ubuntu up and running on Amazon web services. Following are the steps to get this in place.

Step 1 - 人们可以从 Amazon web services 获取免费帐户。我们只需在以下 URL 上向 AWS 注册即可 - https://aws.amazon.com/

Step 1 − One can get a free account with Amazon web services. All we need to do is register with AWS on the following url − https://aws.amazon.com/

amazon web services

Step 2 - 单击登录控制台,它将显示以下对话框。

Step 2 − Click the Sign in to the Console and it presents the following dialog box.

click signin

Step 3 − 单击选项‘我是新用户’,并输入一个现有 Gmail 帐户的必需电子邮件 id。然后单击‘使用我们的安全服务器登录’按钮。然后我们需要在后续屏幕中提供一些信息来创建帐户。

Step 3 − Click the option ‘I am a new user’ and enter the required email id of an existing Gmail account. Then click the ‘Sign in using our secure server’ button. We will then need to give some information in the subsequent screen to create an account.

Step 4 − 一旦创建了帐户,我们就可以登录到控制台。登录后,单击 EC2 选项。此选项用于在云端创建虚拟机。

Step 4 − Once an account has been created, we can log into the console. Once logged in, click the EC2 option. This option is used for creating virtual machines on the cloud.

click ec2

Step 5 − 在以下屏幕截图中,单击启动实例按钮。

Step 5 − In the following screenshot, click the Launch Instance button.

launch instance button

Step 6 − 下一个屏幕提示选择一个合适的 AMI。AMI 是 Amazon 中一个预先构建的操作系统映像。向下滚动到 Ubuntu 选项,然后单击选择按钮。

Step 6 − The next screen prompts to select an appropriate AMI. An AMI is a pre-built image for an operating system in Amazon. Scroll down until to the Ubuntu option and click the Select button.

select ami

Step 7 − 在下一个屏幕中,选择计算机的配置。选择通用 - t2.micro 选项,然后单击‘下一步:配置实例详细信息’按钮。

Step 7 − In the next screen, choose the configuration of the machine. Choose the General purpose – t2.micro option and then click the ‘Next: Configure Instance Details’ button.

choose configuration

Step 8 − 在下一个屏幕中,输入以下详细信息,如屏幕截图所示。

Step 8 − In the next screen, enter the following details as shown in the screenshot.

enter shown details
  1. The number of instances to launch – Keep 1 as the default.

  2. VPC – If there is no existing VPC, choose the option to create a new one.

现在,如果我们选择创建新子网的选项,我们需要执行以下子步骤。

Now, if we choose the option to create a new subnet, we need to perform the following sub steps.

create new subnet

单击创建 VPC 按钮。(注意:VPC 被称为虚拟私有网络,用于在隔离环境中存储所有 AWS 对象。)

Click the Create VPC button. (Note: The VPC is known as a virtual private network which is used to store all AWS objects in an isolated environment.)

在创建 VPC 对话框中,输入以下详细信息并单击‘Yes Create’按钮。

In the Create VPC dialog box, enter the following details and click the ‘Yes Create’ button.

create vpc button
  1. For the subnet, keep the default setting as it is.

  2. For the Auto-assign Public IP option, choose ‘use subnet setting(Enable)’.

  3. Keep the IAM Role as ‘none’.

  4. Keep the Shutdown behavior as ‘none’.

  5. The remaining settings can remain as by default.

单击下一步:添加存储按钮。

Click the Next: Add Storage button.

Step 9 − 在下一个屏幕中,保留默认存储,并单击检查并启动按钮。

Step 9 − In the next screen, keep the default storage as is and click the Review and Launch button.

review and launch

Step 10 − 检查屏幕会弹出。单击启动按钮。

Step 10 − The review screen will pop up. Click the Launch button.

click launch button

Step 11 − 下一个屏幕提示创建新的密钥对。在创建实例时需要它来登录实例。输入密钥名称,并单击下载密钥对按钮。

Step 11 − The next screen prompts to create a new key pair. This is required to log into the instance when it is created. Enter a key name and click the download Key pair button.

create new key pair

Step 12 − 下载完成后,单击启动实例按钮。

Step 12 − Once download is complete, click the Launch Instances button.

click launch instance button

Step 13 − 单击“查看实例”按钮。

Step 13 − Click the ‘View Instances’ button.

view instances button

Step 14 − 实例状态显示为正在运行时,单击连接按钮。

Step 14 − Once the state of the instance is running, click the Connect button.

click connect button

下一个对话框为登录到 Ubuntu 服务器机器提供了步骤。

The next dialog box presents the steps to log into the Ubuntu server machine.

Step 15 − 使用 SSH 客户端按照通常方法执行步骤以登录到机器。

Step 15 − Perform the steps as we would normally do, using a SSH client to log into the machine.

ssh client