Installing Google App Engine SDK on Ubuntu

2011-02-19

在Windows和MacOS上安装Google App engine SDK非常的简单,因为有安装程序。但是对Linux和其他系统来说,我们只能手动安装Google App engine SDK 的zip包。

让我们一步一步在安装ubuntu上 Google App engine SDK

安装Google App engine SDK:

1,下载Google App engine SDk for Linux 并且unzip

2,创建一个目录myapp

3,创建两个文件 app.yaml 和 myapp.py

#cat app.yaml

application: myapp
version: 1
runtime: python
api_version: 1
handlers:
- url: /.*
  script: myapp.py

#cat myapp.py //是一个简单的hello world 脚本

print 'Content-Type: text/plain'
print ''
print 'Hello, World'

run Google App Engine in Local

1.打开shell 运行 **dev_appserver.py [options] **

2.一旦成功运行以上命令,就能访问本机的 http://localhost:8080