所需条件
- Raspberry Pi
- TP-Link路由器
- DNSPod帐户
- 域名
配置路由器
进入路由器的DHCP服务器->静态地址分配菜单,为Raspberry Pi分配静态IP地址,例如:192.168.1.200
进入路由器的安全功能->远端WEB管理菜单,设置WEB管理端口为一个非80值,例如82
所需条件
进入路由器的DHCP服务器->静态地址分配菜单,为Raspberry Pi分配静态IP地址,例如:192.168.1.200
进入路由器的安全功能->远端WEB管理菜单,设置WEB管理端口为一个非80值,例如82
安装python
$sudo apt-get install python-dev
更新
$sudo easy_install -U distribute
安装python-pip
$sudo apt-get install python-pip
添加国内pypi镜像
在**~/.pip/pip.conf**中添加
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
安装python的GPIO库
$sudo pip install rpi.gpio
从官网下载系统镜像,推荐Raspbian
http://downloads.raspberrypi.org/raspbian_latest
将下载后的zip文件解压,得到2014-01-07-wheezy-raspbian.img文件。
准备一张SD卡,最好容量大于4GB,Class10
将镜像写入SD卡
…