亚马逊ec2 实例删除

This article explores the configuration of the Red hat Amazon EC2 instance for SQL Server installation.

本文探讨了用于SQL Server安装的Red hat Amazon EC2实例的配置。

介绍 (Introduction)

Microsoft SQL Server 2017 and 2019 are available on the cross-platform operation system. We can install SQL Server on Red Hat, Ubuntu and SUSE Linux servers. Once you go on Microsoft web page for downloading SQL Server 2017, you get the following options for Linux:

Microsoft SQL Server 2017和2019在跨平台操作系统上可用。 我们可以在Red Hat,Ubuntu和SUSE Linux服务器上安装SQL Server。 进入要下载SQL Server 2017的Microsoft网页后,您将获得Linux的以下选项:

SQL Server also supports on-premise and cloud infrastructures such as Microsoft Azure, Amazon Web Service, and Google cloud. You can refer to SQL Server on Linux articles on SQL Shack for more information.

SQL Server还支持内部部署和云基础结构,例如Microsoft Azure,Amazon Web Service和Google云。 您可以参考SQL Shack 上有关LinuxSQL Server文章以获取更多信息。

We will explore SQL Server 2017 Linux installation on Amazon Web Service for Red Hat Linux in two articles.

我们将在两篇文章中探讨在Amazon Web Service上针对Red Hat LinuxSQL Server 2017 Linux安装。

  • Part 1: Configuration of an Amazon EC2 instance for RHEL OS 第1部分:为RHEL OS配置Amazon EC2实例
  • Part 2: SQL Server 2017 installation on AWS EC2 instance 第2部分:在AWS EC2实例上安装SQL Server 2017

Amazon Elastic Compute存储(EC2)概述 (Overview of Amazon Elastic Compute storage (EC2))

You might be familiar with virtual machines (VM) in on-premise infrastructure. Amazon EC2 is a service that provides compute instances on Cloud similar to an on-premise virtual machine. It is a flexible compute solution, and we can scale up, down the resources based on the requirement.

您可能熟悉内部部署基础结构中的虚拟机(VM)。 Amazon EC2是一项服务,可在云上提供类似于本地虚拟机的计算实例。 它是一种灵活的计算解决方案,我们可以根据需求扩展,缩减资源。

  • It is available across all AWS regions and zones 它适用于所有AWS区域和区域
  • You can install a variety of operating systems and different versions using the pre-defined templates provided by Amazon 您可以使用Amazon提供的预定义模板来安装各种操作系统和不同版本。
  • We can build customize the image and deploy it on N number of instances 我们可以构建自定义映像并将其部署在N个实例上
  • You do not make any commitments for the resources. You only pay for your use 您对资源不做任何承诺。 您只需为使用付费
  • It is a very secure and stable environment 这是一个非常安全和稳定的环境

Login to AWS console and navigate to Services. In the Compute section, you can click on EC2:

登录到AWS控制台并导航到Services 。 在计算部分中,您可以单击EC2

It launches Amazon EC2 dashboard where you can navigate to instance properties, configuration options. AWS EC2 is a region-specific service. In the following screenshot, it shows the EC2 service status in a specific region, for example, US East (N.Virginia) region.

它会启动Amazon EC2仪表板,您可以在其中导航到实例属性,配置选项。 AWS EC2是特定于区域的服务。 在以下屏幕截图中,它显示了特定区域(例如,美国东部(弗吉尼亚北部))中的EC2服务状态。

We want to create a new Red Hat instance for SQL Server. Click on the Launch Instance:

我们要为SQL Server创建一个新的Red Hat实例。 单击启动实例

It gives you the following options:

它为您提供以下选项:

  • Launch instance: We use it for launching any instances from the AWS marketplace. The Amazon template is known as Amazon Machine Image (AMI) 启动实例:我们使用它来启动AWS市场中的任何实例。 Amazon模板称为Amazon Machine Image(AMI)
  • Launch instance from template: If you have defined any templates in your account, you can use it and create the EC2 instances 从模板启动实例 :如果您在帐户中定义了任何模板,则可以使用它并创建EC2实例

We do not have any predefined templates. Click on Launch instance again:

我们没有任何预定义的模板。 再次单击启动实例

It is a seven-step process for creating an EC2 instance. Let’s walk you through these steps.

创建EC2实例的过程分为七个步骤。 让我们引导您完成这些步骤。

步骤1:选择Amazon Machine Image(AMI) (Step 1: Choose Amazon Machine Image (AMI))

In the first step, we choose an Amazon Machine Image (AMI) for Amazon EC2 according to the operating system requirements. We can also search for a specific image from the search box. In the following screenshot, we filtered the AMI for Red Hat:

第一步,我们根据操作系统要求为Amazon EC2选择一个Amazon Machine Image(AMI)。 我们还可以从搜索框中搜索特定的图像。 在以下屏幕截图中,我们过滤了Red Hat的AMI:

In this article, we will use Red Hat Enterprise Linux (RHEL) 7.2 AMI for EC2 instance. Click on Select, and it shows you the instance type and per hour usage cost for the EC2 instance. In Amazon, instance type refers to EC2 instance according to compute requirements such as CPU, RAM:

在本文中,我们将针对EC2实例使用Red Hat Enterprise Linux(RHEL)7.2 AMI 。 单击“ 选择” ,它会为您显示EC2实例的实例类型和每小时使用成本。 在Amazon中,实例类型根据计算需求(例如CPU,RAM)是指EC2实例:

Click on Continue.

单击继续

步骤2:选择实例类型 (Step 2: Choose Instance Type)

Choose the appropriate instance type. Here, you can see vCPU, Memory, network performance for each instance type as well.

选择适当的实例类型。 在这里,您还可以查看每种实例类型的vCPU,内存,网络性能。

For this article, I choose t2.medium instance type:

对于本文,我选择t2.medium实例类型:

You can directly launch the EC2 instance with default options using the Review and Launch option. Click on Next: Configure Instance Details for further configuration options.

您可以使用Review and Launch选项使用默认选项直接启动EC2实例。 单击下一步:配置实例详细信息以获取更多配置选项。

步骤3:配置实例 (Step 3: Configure Instance)

In this step, EC2 provides several essential configuration options. We will look at a few configurations in brief.

在此步骤中,EC2提供了几个基本的配置选项。 我们将简要介绍一些配置。

  • Number of instances: We can launch multiple instances altogether with similar configurations. By default, it launches one instance 实例数量:我们可以使用相同的配置一起启动多个实例。 默认情况下,它启动一个实例
  • Network: It is an essential configuration. It is a networking component of an Amazon EC2 instance. You might not need a configuration of a VPC being a DBA. However, you should be aware of the basics of a VPC. VPC is an acronym of Virtual Private Cloud. Imagine VPC as a virtual data center. We define subnets, private IP addresses, network gateway, route tables. We also configure the firewall rules for inbound and outbound rules 网络:这是必不可少的配置。 它是Amazon EC2实例的网络组件。 您可能不需要将VPC配置为DBA。 但是,您应该了解VPC的基础知识。 VPC是虚拟私有云的缩写。 想象一下VPC是一个虚拟数据中心。 我们定义子网,专用IP地址,网络网关,路由表。 我们还为入站和出站规则配置防火墙规则

By default, Amazon creates a default VPC for you; however, it is recommended defining a VPC as per your infrastructure requirements. In this article, let’s go with default VPC and subnet configuration in an availability zone.

默认情况下,Amazon为您创建一个默认VPC。 但是,建议根据基础架构要求定义VPC。 在本文中,我们将在可用性区域中使用默认的VPC和子网配置。

Apart from the VPC, look at the following useful configuration as well:

除了VPC,还请查看以下有用的配置:

  • Shutdown behavior: As specified earlier, you pay only for the usage of AWS resources. We can define shutdown behavior for an Amazon EC2 instance. By default, if we stop the EC2 instance once we click on shutdown. We can restart it later and use it as per requirement. We can modify this setting to terminate the instance on the shutdown of the EC2 instance 关闭行为:如前所述,您仅需为AWS资源的使用付费。 我们可以定义Amazon EC2实例的关闭行为。 默认情况下,如果单击关闭,则停止EC2实例。 我们可以稍后重新启动它,并根据需要使用它。 我们可以修改此设置以在EC2实例关闭时终止实例
  • Enable termination protection: We can protect the EC2 instance against accidental termination using this configuration. We should use this for critical and production instances 启用终止保护:使用此配置,我们可以保护EC2实例免遭意外终止。 我们应该将此用于关键实例和生产实例

Another configuration option is Tenancy. By default, all EC2 instances are in shared tenancy. Shared tenancy means EC2 instance is in shared hardware. We can use a dedicated tenancy as well, but you have to pay a higher cost for it:

另一个配置选项是“租期”。 默认情况下,所有EC2实例均处于共享租赁状态。 共享租用意味着EC2实例位于共享硬件中。 我们也可以使用专用租赁,但您必须为此支付更高的费用:

步骤4:添加存储 (Step 4: Add Storage)

In the next step, define the volume type and size. In a free tier account, we get up to 30 GB of EBS general-purpose volume. Define an appropriate storage size for your Amazon EC2 instance.

在下一步中,定义卷的类型和大小。 在免费套餐帐户中,我们可获得多达30 GB的EBS通用卷。 为您的Amazon EC2实例定义适当的存储大小。

By default, AWS deletes the storage volume on termination of EC2 instance. You can see checkmark on Delete on Termination in the below screenshot. If you want to retain storage after EC2 termination as well, we can remove the check from this option:

默认情况下,AWS在EC2实例终止时删除存储卷。 您可以在下面的屏幕截图中看到“终止删除”的复选标记。 如果您还想在EC2终止后保留存储,我们可以从此选项中删除支票:

步骤5:添加标签 (Step 5: Add Tags)

We define tag as a label for the AWS resources. We can use a tag for organizing resources, cost allocation for the respective tags. It is an optional step but recommended if you manage many resources in AWS.

我们将标签定义为AWS资源的标签。 我们可以使用标签来组织资源,为各个标签分配成本。 这是一个可选步骤,但是如果您在AWS中管理许多资源,则建议使用。

In this article, we define the following tag for an EC2 instance:

在本文中,我们为EC2实例定义以下标记:

  • Key: Name 密钥 :名称
  • Value: SQL Server On Linux Demo :Linux上SQL Server演示

步骤6:配置安全组 (Step 6: Configure Security Group)

Security groups are firewall rules for the AWS EC2 instance. We can create a new security group or use an existing security group as well.

安全组是AWS EC2实例的防火墙规则。 我们可以创建一个新的安全组,也可以使用现有的安全组。

For this article, we define the following security group rules for TCP protocol:

对于本文,我们为TCP协议定义以下安全组规则:

  • My IP in the source, it automatically populates your IP address. We can define a custom IP address range as well for the firewall rule 我的IP ”,它将自动填充您的IP地址。 我们也可以为防火墙规则定义自定义IP地址范围
  • SQL Server default port is 1433. We define 1433 TCP port so that we can connect to EC2 instance from our local system SQL Server的默认端口为1433。我们定义了1433 TCP端口,以便可以从本地系统连接到EC2实例。

步骤7:查看实例启动 (Step 7: Review instance launch)

In this step, we can review all previous configurations. If we want to change any configuration, go back and make the appropriate changes. Click on Launch to start EC2 instance launch process:

在此步骤中,我们可以检查所有先前的配置。 如果要更改任何配置,请返回并进行适当的更改。 单击启动以启动EC2实例启动过程:

Once you click on the launch, it asks you to select an existing key pair or create a new key pair. We use a key pair to connect an Amazon EC2 instance. It is a combination of private and public keys. AWS stores the public key and you download the private key.

单击启动后,它会要求您选择一个现有的密钥对或创建一个新的密钥对。 我们使用密钥对连接Amazon EC2实例。 它是私钥和公钥的组合。 AWS存储公用密钥,然后您下载专用密钥。

We do not have any existing key pair, therefore, specify a key pair name and download it.

我们没有任何现有的密钥对,因此,请指定一个密钥对名称并下载。

  • Note: You should store the key pair at a safe and secure location. AWS does not allow downloading this key pair at the later stage.注意:您应该将密钥对存放在安全的地方。 AWS不允许在稍后阶段下载此密钥对。

Once you download the key pair, it enables the Launch Instances option:

下载密钥对后,它将启用“启动实例”选项:

Click on Launch Instances, and it initiates the configuration of the security group, EC2 instance:

单击启动实例,它将启动安全组EC2实例的配置:

Click on the instance ID, and it gives the below summary of the Amazon EC2 instance:

单击实例ID,它会提供以下Amazon EC2实例的摘要:

For a healthy EC2 instance, it should have the following configuration:

对于正常的EC2实例,它应具有以下配置:

  • Instance Status: running 实例状态:正在运行
    1. System Status Checks 系统状态检查
    2. Instance Status Checks 实例状态检查

Read more about the status checks on the AWS documentation.

在AWS文档上阅读有关状态检查的更多信息。

In the following screenshot, we can see our EC2 instance passed 2/2 status check. You can also view the public IP address and public DNS for my EC2 instance:

在以下屏幕截图中,我们可以看到我们的EC2实例通过了2/2状态检查。 您还可以查看我的EC2实例的公共IP地址和公共DNS:

连接Red Hat Amazon EC2实例 (Connect Red Hat Amazon EC2 Instance)

We require SSH and telnet client tools for connecting to an AWS EC2 instance. Go to URL and download the following software:

我们需要SSH和telnet客户端工具来连接到AWS EC2实例。 转到URL并下载以下软件:

  • PuTTy 油灰
  • puttygen 腻子

In the previous step, we downloaded a key pair file (PEM). Launch Puttygen and click on Load:

在上一步中,我们下载了一个密钥对文件(PEM)。 启动Puttygen并单击Load

We need to browse to the directory where you stored the PEM file and select the downloaded key pair file:

我们需要浏览到存储PEM文件的目录,然后选择下载的密钥对文件:

Click on Open, and it imports the PEM file and converts into PPK file:

单击“ 打开” ,它将导入PEM文件并转换为PPK文件:

Click OK to save the private key, and then Save private key:

单击确定以保存私钥,然后单击保存私钥

It throws the following warning message:

它引发以下警告消息:

Click Yes and save PPK file into an appropriate secure location:

单击“ 是”,然后将PPK文件保存到适当的安全位置:

Now, launch the Putty software and provide the public IP address. We can copy the public IP address from the instance property:

现在,启动Putty软件并提供公共IP地址。 我们可以从实例属性中复制公共IP地址:

Now, expand the SSH category using the plus sign, and it gives you a list of options. Click on Auth:

现在,使用加号扩展SSH类别,它会为您提供选项列表。 点击Auth

Browse to the PPK file location, as shown below:

浏览到PPK文件位置,如下所示:

Click on Open, and it connects to the Amazon EC2 instance. It gives the following security alert for the first-time connection. Click on Yes to add the key to Putty’s cache:

单击Open ,它将连接到Amazon EC2实例。 对于首次连接,它提供以下安全警报。 单击 ,将密钥添加到Putty的缓存中:

Amazon provides a default user EC2-user for a first-time connection. We do not require a password for this user. It automatically authenticates using the public and private key:

Amazon为首次连接提供了默认用户EC2用户 。 我们不需要该用户的密码。 它使用公钥和私钥自动进行身份验证:

下一步 (Next step)

In the next article, we install SQL Server 2017 on this Amazon EC2 instance. We will also connect the SQL Server instance and perform specific operations for validation purposes.

在下一篇文章中,我们在此Amazon EC2实例上安装SQL Server 2017。 我们还将连接SQL Server实例并执行特定操作以进行验证。

结论 (Conclusion)

In this article, we explored the Amazon EC2 instance, its configuration using AMI through specific steps. We also learned the basics of individual AWS components such as VPN, security group, key pairs. You should prepare the environment using this article before proceeding for the next article.

在本文中,我们通过特定步骤探讨了Amazon EC2实例,该实例使用AMI进行配置。 我们还学习了各个AWS组件的基础知识,例如VPN,安全组,密钥对。 在继续下一篇文章之前,您应该使用本文准备环境。

翻译自: https://www.sqlshack.com/installation-of-sql-server-linux-on-red-hat-in-amazon-ec2-instances/

亚马逊ec2 实例删除

亚马逊ec2 实例删除_在Amazon EC2实例中的Red Hat上安装SQL Server Linux相关推荐

  1. 亚马逊aws 服务器删除_亚马逊aws服务器免费套餐及被扣款怎么办

    今天弄了一个aws免费套餐EC2服务器. 注册成功之后,就是申请EC2服务器了,官方有详细的操作教程:https://aws.amazon.com/cn/getting-started/tutoria ...

  2. 亚马逊 各国站点 链接_使用Amazon S3和HTTPS的简单站点托管

    亚马逊 各国站点 链接 by Georgia Nola 乔治亚·诺拉(Georgia Nola) 使用Amazon S3和HTTPS的简单站点托管 (Simple site hosting with ...

  3. 亚马逊aws 服务器删除_如何删除amazon EC2里面的实例?

    从amazon客服得到的回答,我的情况是因为实例有active Elastic Beanstalk environment I've researched your account, and the ...

  4. 亚马逊aws 服务器删除_amazon-ec2 – 如何从ELB组中正常关闭或删除AWS实例

    这个想法使用ELB的能力来检测不健康的节点并将其从池中删除,但是它依赖于ELB在下面的假设中的行为.这是我自己测试的一些东西,但还没有时间.我会更新答案. 流程概述 在节点需要关闭时,可以包装和运行以 ...

  5. 使用Red Hat OS为Amazon EC2实例安装SQL Server Linux

    This article installs SQL Server on Linux on the Amazon EC2 instance with Red Hat OS prepared in the ...

  6. 亚马逊 aws 指南 实战_减少您的AWS成本完整指南

    亚马逊 aws 指南 实战 Do you think your cloud costs are too high? I think most businesses can find savings i ...

  7. 亚马逊深度学习库_汽车Linux,8位社交,与Amazon的深度学习以及更多新闻

    亚马逊深度学习库 在本周的开源新闻摘要中,我们将介绍汽车Linux,社交8位,具有神经网络的深度学习等等! 2016年5月7日至14日的开源新闻摘要 汽车用Linux等于大型汽车制造商的快速创新 Li ...

  8. 亚马逊echo中国使用_如何设置和配置您的Amazon Echo

    亚马逊echo中国使用 So you just got an Amazon Echo, either from the recent sales or the holidays. Let's take ...

  9. 亚马逊关键词怎么编写_亚马逊关键词怎么选

    关键词研究是亚马逊产品发布的重要组成部分.花时间适当评估你的细分市场中的重要关键词可以最大程度地提高销售潜力.它可以使你的产品成为有价值的搜索查询中排名最高的商品. 据JS的研究报告显示: 73%的买 ...

最新文章

  1. APK签名导出向导 - Use the Export Wizard
  2. Qt入门(10)——调试技术
  3. SAP UI5 应用开发教程之二十一 - SAP UI5 的自定义格式器(Custom Formatter)
  4. toast弹窗_Android 开发(一):Toast弹窗与获取控件的值
  5. UVA12583_Memory Overow
  6. in作为介词的用法_(完整版)介词in重要用法归纳
  7. LoadRunner9 5新特性
  8. 【eNSP】入门介绍(很详细)
  9. CDA学习笔记-指标
  10. CO-PA: 获利能力分析配置和业务实践
  11. 安卓小项目之刀刀人脸识别系统
  12. 小型的代码管理仓库Gitea安装指南
  13. 一行代码实现蒲公英市场APP检查更新
  14. mpaaS的kylin框架-项目结构(脚手架)
  15. 【obs】转载:OBS直播严重延迟和卡顿怎么办?
  16. 原神手游怎么用电脑玩 原神模拟器玩法教程
  17. 解决在高分辨率下运行Photoshop CS6,程序界面字体过小的问题
  18. 原装Win8系统换win7系统(图文教程)
  19. Delphi 中资源文件使用详解
  20. C程序设计语言第二版·新版,C程序设计语言(第2版·新版) PDF扫描版[19MB]

热门文章

  1. Apache iceberg:Netflix 数据仓库的基石
  2. SpringCloud 微服务注册中心 Eureka - Server
  3. 俄17岁少年推出网聊新招
  4. 初识CityEngine
  5. WebODM win10安装教程(亲测)
  6. 数据分析思维(五)|逻辑树思维
  7. [C51]STC89C51最小板接线与烧录程序
  8. NEU健康上报脚本解析教程
  9. javascript的字面量
  10. 3.高精度加法(使用C++的string实现高精度加法运算的实例代码)包含auto解决办法