Compute Engine์—์„œ Linux VM ์ธ์Šคํ„ด์Šค ๋งŒ๋“ค๊ธฐ

Google Cloud ์ฝ˜์†”์„ ์‚ฌ์šฉํ•˜์—ฌ Compute Engine์—์„œ Linux ๊ฐ€์ƒ ๋จธ์‹ (VM) ์ธ์Šคํ„ด์Šค๋ฅผ ๋งŒ๋“œ๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ด…๋‹ˆ๋‹ค.


Google Cloud ์ฝ˜์†”์—์„œ ์ด ํƒœ์Šคํฌ์— ๋Œ€ํ•œ ๋‹จ๊ณ„๋ณ„ ์•ˆ๋‚ด๋ฅผ ์ง์ ‘ ์ˆ˜ํ–‰ํ•˜๋ ค๋ฉด ๋‘˜๋Ÿฌ๋ณด๊ธฐ๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

๋‘˜๋Ÿฌ๋ณด๊ธฐ


์‹œ์ž‘ํ•˜๊ธฐ ์ „์—

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  3. Make sure that billing is enabled for your Google Cloud project.

  4. Make sure that you have the following role or roles on the project: Compute Instance Admin (v1), Compute Security Admin, OSPolicyAssignment Admin, Service Account User, Service Usage Admin

    Check for the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.

    4. For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.

    Grant the roles

    1. In the Google Cloud console, go to the IAM page.

      IAM์œผ๋กœ ์ด๋™
    2. ํ”„๋กœ์ ํŠธ๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.
    3. ์•ก์„ธ์Šค ๊ถŒํ•œ ๋ถ€์—ฌ๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
    4. ์ƒˆ ์ฃผ ๊ตฌ์„ฑ์› ํ•„๋“œ์— ์‚ฌ์šฉ์ž ์‹๋ณ„์ž๋ฅผ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค. ์ผ๋ฐ˜์ ์œผ๋กœ Google ๊ณ„์ •์˜ ์ด๋ฉ”์ผ ์ฃผ์†Œ์ž…๋‹ˆ๋‹ค.

    5. ์—ญํ•  ์„ ํƒ ๋ชฉ๋ก์—์„œ ์—ญํ• ์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.
    6. ์—ญํ• ์„ ์ถ”๊ฐ€๋กœ ๋ถ€์—ฌํ•˜๋ ค๋ฉด ๋‹ค๋ฅธ ์—ญํ•  ์ถ”๊ฐ€๋ฅผ ํด๋ฆญํ•˜๊ณ  ๊ฐ ์—ญํ• ์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
    7. ์ €์žฅ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  6. Make sure that billing is enabled for your Google Cloud project.

  7. Make sure that you have the following role or roles on the project: Compute Instance Admin (v1), Compute Security Admin, OSPolicyAssignment Admin, Service Account User, Service Usage Admin

    Check for the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.

    4. For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.

    Grant the roles

    1. In the Google Cloud console, go to the IAM page.

      IAM์œผ๋กœ ์ด๋™
    2. ํ”„๋กœ์ ํŠธ๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.
    3. ์•ก์„ธ์Šค ๊ถŒํ•œ ๋ถ€์—ฌ๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
    4. ์ƒˆ ์ฃผ ๊ตฌ์„ฑ์› ํ•„๋“œ์— ์‚ฌ์šฉ์ž ์‹๋ณ„์ž๋ฅผ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค. ์ผ๋ฐ˜์ ์œผ๋กœ Google ๊ณ„์ •์˜ ์ด๋ฉ”์ผ ์ฃผ์†Œ์ž…๋‹ˆ๋‹ค.

    5. ์—ญํ•  ์„ ํƒ ๋ชฉ๋ก์—์„œ ์—ญํ• ์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.
    6. ์—ญํ• ์„ ์ถ”๊ฐ€๋กœ ๋ถ€์—ฌํ•˜๋ ค๋ฉด ๋‹ค๋ฅธ ์—ญํ•  ์ถ”๊ฐ€๋ฅผ ํด๋ฆญํ•˜๊ณ  ๊ฐ ์—ญํ• ์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
    7. ์ €์žฅ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
  8. Compute Engine API๋ฅผ ์‚ฌ์šฉ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

    Compute Engine API ์‚ฌ์šฉ ์„ค์ •

Linux VM ์ธ์Šคํ„ด์Šค ๋งŒ๋“ค๊ธฐ

  1. In the Google Cloud console, go to the Create an instance page.

    Go to Create an instance

  2. In the Boot disk section, click Change to begin configuring your boot disk.
  3. Public images ํƒญ์˜ ์šด์˜์ฒด์ œ ๋ชฉ๋ก์—์„œ Ubuntu๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.
  4. ๋ฒ„์ „ ๋ชฉ๋ก์—์„œ Ubuntu 24.04 LTS๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.
  5. ์„ ํƒ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
  6. ๋ฐฉํ™”๋ฒฝ ์„น์…˜์—์„œ HTTP ํŠธ๋ž˜ํ”ฝ ํ—ˆ์šฉ์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.
  7. ๋งŒ๋“ค๊ธฐ๋ฅผ ํด๋ฆญํ•˜์—ฌ VM์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค.

VM ์ธ์Šคํ„ด์Šค๊ฐ€ ์‹œ์ž‘๋  ๋•Œ๊นŒ์ง€ ์ž ์‹œ ๊ธฐ๋‹ค๋ฆฝ๋‹ˆ๋‹ค. VM ์ธ์Šคํ„ด์Šค๊ฐ€ ์ค€๋น„๋˜๋ฉด VM ์ธ์Šคํ„ด์Šค ํŽ˜์ด์ง€์— ๋…น์ƒ‰ ์ƒํƒœ ์•„์ด์ฝ˜์œผ๋กœ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.

Compute Engine์€ VM ์ธ์Šคํ„ด์Šค๋ฅผ ๋งŒ๋“œ๋Š” ์‚ฌ์šฉ์ž์—๊ฒŒ roles/compute.instanceAdmin ์—ญํ• ์„ ๋ถ€์—ฌํ•ฉ๋‹ˆ๋‹ค. ๋˜ํ•œ Compute Engine์€ ํ•ด๋‹น ์‚ฌ์šฉ์ž๋ฅผ sudo ๊ทธ๋ฃน์— ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.

VM ์ธ์Šคํ„ด์Šค์— ์—ฐ๊ฒฐ

Google Cloud ์ฝ˜์†”์„ ์‚ฌ์šฉํ•˜์—ฌ ๋‹ค์Œ ๋‹จ๊ณ„๋ฅผ ์™„๋ฃŒํ•ด VM ์ธ์Šคํ„ด์Šค์— ์—ฐ๊ฒฐํ•ฉ๋‹ˆ๋‹ค. VM ์ธ์Šคํ„ด์Šค ํŽ˜์ด์ง€์— ์•ก์„ธ์Šคํ•˜๋Š” ๋ฐ ์‚ฌ์šฉํ•œ ์‚ฌ์šฉ์ž๋กœ VM ์ธ์Šคํ„ด์Šค์— ์—ฐ๊ฒฐ๋ฉ๋‹ˆ๋‹ค.

  1. In the Google Cloud console, go to the VM instances page.

    Go to VM instances

  2. In the list of virtual machine instances, click SSH in the row of the instance that you want to connect to.

    SSH button next to instance name.

์‚ญ์ œ

์ด ํŽ˜์ด์ง€์—์„œ ์‚ฌ์šฉํ•œ ๋ฆฌ์†Œ์Šค ๋น„์šฉ์ด Google Cloud ๊ณ„์ •์— ์ฒญ๊ตฌ๋˜์ง€ ์•Š๋„๋ก ํ•˜๋ ค๋ฉด ๋‹ค์Œ ๋‹จ๊ณ„๋ฅผ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

  1. Google Cloud ์ฝ˜์†”์—์„œ VM ์ธ์Šคํ„ด์Šค ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.

    VM ์ธ์Šคํ„ด์Šค๋กœ ์ด๋™

  2. ์ด ํŠœํ† ๋ฆฌ์–ผ์—์„œ ๋งŒ๋“  VM ์ธ์Šคํ„ด์Šค๊ฐ€ ํฌํ•จ๋œ ํ–‰์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

  3. ์‚ญ์ œ๋ฅผ ํด๋ฆญํ•˜๊ณ  ํ•œ ๋ฒˆ ๋” ์‚ญ์ œ๋ฅผ ํด๋ฆญํ•˜์—ฌ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ ๋‹จ๊ณ„