Google Cloud + PHP

บันทึการเริ่มต้นใช้งาน google cloud + php จากที่ได้ลองใช้งาน ก็พบว่ามันง่ายกว่าที่คิดไว้มากเลย

เริ่มแรกติดตั้ง GOOGLE CLOUD SDK ก่อน

1. ดาวน์โหลดและติดตั้ง Google Cloud SDK installer.
2. เปิด Command line (cmd.exe) หรือเปิด Google Cloud SDK Shell
3. Sign in to Google Cloud Platform using this command:
gcloud auth login

สร้าง APPLICATION

1. ดาวน์โหลดโค้ดตัวอย่าง appengine-try-php.zip และก็แตกไฟล์ไว้ที่ต้องการ (ผมเก็บไว้ที่ htdocs ของ xampp)
2. เริ่ม PHP development server โดยผ่าน cmd ด้านล่างนี้ : (ตรงนี้ให้เข้าไปที่ htdocs ของโปรเจ็ค)
dev_appserver.py appengine-try-php
This Python command starts the PHP server bundled with the Cloud SDK. You can stop the server by pressing Ctrl-C in the command window.
Visit the locally running app in your browser: http://localhost:8080

Deploy project ขึ้น Google Cloud
1. ใช้คำสั่ง
appcfg.py -A [ชื่อโปรเจ็คที่ google สร้าง] update appengine-try-php

ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

CakePHP ตอนที่ 1 Introduction and Installation

MIME Types – Complete List

ลองใช้งาน Google Chart กัน