使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
在 Compute Engine 中创建 Linux 虚拟机实例
了解如何使用 Google Cloud 控制台在 Compute Engine 中创建 Linux 虚拟机实例。
如需在 Google Cloud 控制台中直接遵循有关此任务的分步指导,请点击操作演示:
操作演示
准备工作
-
登录您的 Google Cloud 账号。如果您是 Google Cloud 新手,请创建一个账号来评估我们的产品在实际场景中的表现。新客户还可获享 $300 赠金,用于运行、测试和部署工作负载。
-
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Go to project selector
-
确保您的 Google Cloud 项目已启用结算功能。
-
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Go to project selector
-
确保您的 Google Cloud 项目已启用结算功能。
- 启用 Compute Engine API。
启用 Compute Engine API
创建 Linux 虚拟机实例
-
In the Google Cloud console, go to the
Create an instance page.
Go to Create an instance
-
In the Boot disk section, click Change
to begin configuring your boot disk.
- 在 Public images 标签页上,从操作系统列表中选择 Ubuntu。
- 从版本列表中选择 Ubuntu 20.04 LTS。
- 点击选择。
-
在防火墙部分,选择 允许 HTTP 流量。
-
如需创建虚拟机,请点击创建。
启动实例需要一段时间,请稍等片刻。实例准备就绪后,将在虚拟机实例页面列出,并带有绿色状态图标。
Compute Engine 向创建虚拟机的用户授予 roles/compute.instanceAdmin
角色。Compute Engine 还会将该用户添加到 sudo
组。
连接到虚拟机实例
通过使用 Google Cloud Console 并完成以下步骤,连接到实例。您作为用于访问虚拟机实例页面的用户连接到虚拟机。
-
In the Google Cloud console, go to the
VM instances page.
Go to VM instances
-
In the list of virtual machine instances, click SSH in the row of
the instance that you want to connect to.
清理
为避免因本页中使用的资源导致您的 Google Cloud 账号产生费用,请按照以下步骤操作。
在 Google Cloud 控制台中,前往虚拟机实例页面。
转到“虚拟机实例”
点击您创建的实例名称。
在实例详细信息页面顶部,点击删除。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-10-01。
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]
{"lastModified": "\u6700\u540e\u66f4\u65b0\u65f6\u95f4 (UTC)\uff1a2024-10-01\u3002"}
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-10-01。"]]