亚马逊弹性计算云(Amazon EC2)是一个Web服务,提供可调整的云计算能力。它旨在为开发人员提供简便的使用网络规模计算
登录https://console.aws.amazon.com/ec2/home
点击Launch Instance 开始创建新的实例
选择系统,一般类型选Micro ,因为只有这个是免费的
一步步默认走就可以,当然可以选择 创建下载Key pair 和防火墙配置,不过这些到时完成创建实例后也能配置!
这是我已经安装好的实例,一般创建新的实例最好把测试的都terminated 意为删除!以免多收$
EC2收费标准请看http://aws.amazon.com/ec2/pricing/
Free Tier*
As part of AWS’s Free Usage Tier, new AWS customers can get started with Amazon EC2 for free. Upon sign-up, new AWS customers receive the following EC2 services each month for one year:
- 750 hours of EC2 running Linux/Unix Micro instance usage
- 750 hours of EC2 running Microsoft Windows Server Micro instance usage
- 750 hours of Elastic Load Balancing plus 15 GB data processing
- 30 GB of Amazon Elastic Block Storage (EBS) plus 2 million IOs and 1 GB snapshot storage
- 15 GB of bandwidth out aggregated across all AWS services
- 1 GB of Regional Data Transfer
远程登录管理,因为安装的是linux 所以要使用Key pair登录
登录条件:
1,实例是启用状态running
2,防火墙ssh已开,选择Security Groups如当时没有创建group的话,点击左上角的Create Security Group,创建然后选择Inbound配置 ssh开放 ,Apply Rule Changes点击确定
3,下载Key Pair,如当时创建实例的时候没有创建,或者此时再想创建多个key应用到多台clinet访问,点击左上角创建Create Key Pair
创建完后 下载该pem到本地电脑 (Note: 用户名为ec2-user, 而非自己Instance 名字, 若创建的Instance选的是ubuntu, 链接时用户名就可能为ubuntu了!)
shenzy@shenzy-ubuntu:~/work/soft/amazon$ ssh -i szypanther_amazon.pem ec2-user@ec2-23-21-23-200.compute-1.amazonaws.com
__| __|_ )
_| ( / Amazon Linux AMI
___|\___|___|
https://aws.amazon.com/amazon-linux-ami/2012.03-release-notes/
[ec2-user@ip-10-243-2-53 ~]$ df -h
文件系统 容量 已用 可用 已用%% 挂载点
/dev/xvda1 8.0G 1.1G 6.9G 13% /
tmpfs 298M 0 298M 0% /dev/shm
下载安装httpd (ec2) 或 apache2 (ubuntu)
[ec2-user@ip-10-243-2-53 ~]$sudo yum install httpd
下载安装Django
wget http://www.djangoproject.com/download/1.3/tarball/
tar zxvf Django-1.3.tar.gz
下载安装mod_python
[ec2-user@ip-10-243-2-53 Django-1.3]$ sudo yum install mod_python
或者 apt-get install libapache2-mod-python #(ubuntu)
Hats off to whoever wrote this up and ptoesd it.