Use Cloud Marketplace to deploy a LAMP stack

Check my progress

/ 100

This lab may incorporate AI tools to support your learning.

總覽

在這個實驗室中,您會使用 Google Cloud Marketplace,輕鬆快速地將 LAMP 堆疊部署至 Compute Engine 執行個體。Google Click to Deploy LAMP 堆疊為 Linux 提供完整的網頁開發環境,一鍵即可啟動。

元件 角色
Linux 作業系統
Apache HTTP Server 網路伺服器
MySQL 關聯式資料庫
PHP 網頁應用程式框架
phpMyAdmin PHP 管理工具

目標

在本實驗室中,您將學習如何使用 Cloud Marketplace 啟動解決方案。

設定實驗室

每個實驗室都會提供新的 Google Cloud 專案和一組資源,讓您在時限內免費使用。

  1. 按一下「Start Lab」按鈕。如果研究室會產生費用,畫面中會出現選擇付款方式的彈出式視窗。左側的「Lab Details」窗格會顯示下列項目:

    • 「Open Google Cloud console」按鈕
    • 剩餘時間
    • 必須在這個研究室中使用的臨時憑證
    • 完成這個實驗室所需的其他資訊 (如有)
  2. 點選「Open Google Cloud console」;如果使用 Chrome 瀏覽器,也能按一下滑鼠右鍵,選取「在無痕視窗中開啟連結」

    接著,實驗室會啟動相關資源並開啟另一個分頁,當中顯示「登入」頁面。

    提示:您可以在不同的視窗中並排開啟分頁。

    注意:如果頁面中顯示「選擇帳戶」對話方塊,請點選「使用其他帳戶」
  3. 如有必要,請將下方的 Username 貼到「登入」對話方塊。

    {{{user_0.username | "Username"}}}

    您也可以在「Lab Details」窗格找到 Username

  4. 點選「下一步」

  5. 複製下方的 Password,並貼到「歡迎使用」對話方塊。

    {{{user_0.password | "Password"}}}

    您也可以在「Lab Details」窗格找到 Password

  6. 點選「下一步」

    重要事項:請務必使用實驗室提供的憑證,而非自己的 Google Cloud 帳戶憑證。 注意:如果使用自己的 Google Cloud 帳戶來進行這個實驗室,可能會產生額外費用。
  7. 按過後續的所有頁面:

    • 接受條款及細則。
    • 由於這是臨時帳戶,請勿新增救援選項或雙重驗證機制。
    • 請勿申請免費試用。

Google Cloud 控制台稍後會在這個分頁開啟。

注意:如要查看列出 Google Cloud 產品和服務的選單,請點選左上角的「導覽選單」,或在「搜尋」欄位輸入服務或產品名稱。 「導覽選單」圖示

工作 1:使用 Cloud Marketplace 部署 LAMP 堆疊

  1. 前往 Google Cloud 控制台,依序點選「導覽選單」圖示 「導覽選單」圖示 >「Marketplace」

  2. 在搜尋列輸入 LAMP,然後按下 Enter 鍵

  3. 在搜尋結果中,點選由 Google Click to Deploy 提供的「LAMP Stack」

    如果您選用其他 LAMP 堆疊,則可能無法按照本實驗室的說明操作。

  4. 點選 LAMP 頁面中的「開始使用」

  5. 在「合約」頁面中,勾選「條款與協議」部分的方塊,然後點選「同意」

  6. 點選「已成功同意條款」彈出式視窗中的「部署」

    看見提示時,為 Compute Engine API 和 Infrastructure Manager API 點選「啟用」。

  7. 在「可用區」部分,選取 做為部署項目可用區。

  8. 在「機型」部分,「系列」請選取「E2」,「機型」則選取「e2-medium」

  9. 其餘設定保留預設值。

  10. 點選「部署」

注意:部署期間可能會出現警告訊息。在本實驗室中,您可以忽略這類警告。

控制台視窗顯示的部署狀態是「正在部署『lampstack-1』」。基礎架構部署完成後,狀態就會變成「已部署『lampstack-1』」

安裝軟體後,系統會顯示執行個體詳細資料的摘要,包括網址。

點選「Check my progress」,確認目標已達成。使用 Cloud Marketplace 部署 LAMP 堆疊

工作 2:驗證部署作業

  1. 部署完成後,請依序點選「lamp-1-vm」>「詳細資料」

  2. 點選「網站網址」連結。如果網站沒有回應,請先等待 30 秒再重試。若出現重新導向通知,點選該連結即可查看新的網站。系統會在新的瀏覽器分頁中顯示恭喜訊息。顯示這個頁面即代表 LAMP 堆疊內含的 Apache HTTP Server 正在運作。

注意:如果公司筆電的瀏覽器無法顯示該網頁,在情況允許下,請中斷公司 VPN/網路連線並重試,或是在平板電腦或手機等其他裝置上,輸入 IP 位址。

工作 3:回顧

在本實驗室中,您已成功將 LAMP 堆疊部署至 Compute Engine 執行個體。

關閉研究室

如果您已完成實驗室,請點選「End Lab」。Google Skills 會清除您使用的資源和帳戶。

您可以為實驗室的使用體驗評分。請選取合適的星級評等並提供意見,然後按一下「Submit」

星級評等代表您的滿意程度:

  • 1 星 = 非常不滿意
  • 2 星 = 不滿意
  • 3 星 = 普通
  • 4 星 = 滿意
  • 5 星 = 非常滿意

如果不想提供意見回饋,您可以直接關閉對話方塊。

如有任何想法、建議或指教,請透過「Support」分頁提交。

Copyright 2026 Google LLC 保留所有權利。Google 和 Google 標誌是 Google LLC 的商標,其他公司和產品名稱則有可能是其關聯公司的商標。

Before you begin

  1. Labs create a Google Cloud project and resources for a fixed time
  2. Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
  3. On the top left of your screen, click Start lab to begin

Use private browsing

  1. Copy the provided Username and Password for the lab
  2. Click Open console in private mode

Sign in to the Console

  1. Sign in using your lab credentials. Using other credentials might cause errors or incur charges.
  2. Accept the terms, and skip the recovery resource page
  3. Don't click End lab unless you've finished the lab or want to restart it, as it will clear your work and remove the project

This content is not currently available

We will notify you via email when it becomes available

Great!

We will contact you via email if it becomes available

One lab at a time

Confirm to end all existing labs and start this one

Use private browsing to run the lab

Using an Incognito or private browser window is the best way to run this lab. This prevents any conflicts between your personal account and the Student account, which may cause extra charges incurred to your personal account.

Complete this quick step to start your lab.