树莓派上手

启动前设置

  1. 下载raspbian(Release date:2017-04-10)
  2. 使用Win32DiskImager写入到tf卡
  3. 在tf卡根目录建立文件名为ssh的空文件(默认关闭ssh,建立文件表示允许ssh)
  4. 更改tf卡读取限制,在tf卡根目录config.txt,添加dtparam=sd_overclock=100
  5. 插入电源、网线(或者不用网线,如果有wifi的话,在tf卡根目录建立文件wpa_supplicant.conf,内容如下),在路由器中查看raspberry pi的ip地址,然后使用xshell登陆,用户名pi,密码raspberry
  6. ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    network={ ssid=
    "testing" psk="testingPassword" }
  7. 其他设置可以参照https://www.gitbook.com/book/yangxuan8282/rpi_cache/details,是《树莓派3进食指南(Raspbian)》,也可以在这里下载

启动后配置

  1. 设置时区,使用tzselect命令,选择时区,然后根据提示,将TZ='Asia/Shanghai'; export TZ写入到自己用户目录的.profile文件中,断开ssh重连(默认编辑器为nano)
  2. 语言、时区也可以用sudo raspi-config这个工具来设置。
  3. 配置apt软件源为阿里云,sudo nano /etc/apt/sources.list,注释掉已有的,加入如下内容,然后sudo apt-get update更新软件列表,sudo apt-get upgrade更新已有软件
    deb http://mirrors.aliyun.com/raspbian/raspbian/ jessie main non-free contrib
    deb-src http://mirrors.aliyun.com/raspbian/raspbian/ jessie main non-free contrib

     

posted on 2017-05-07 21:27  峰入云  阅读(183)  评论(0编辑  收藏  举报

导航