硬件
软件
操作系统
树莓派主板上没有BOIS,而且没有时钟芯片,默认从TF卡引导启动系统。官方推荐使用Win32DiskImager.exe直接将Raspbian系统的*.img镜像写入TF卡即可完成安装过程。详细过程如下:
安装完成后,TF卡被分成两个分区:
引导进入Raspbian系统后,查看分区情况如下(*tmpfs格式为内存分区):
由于Windows下不识别ext4格式的磁盘,在资源管理器中查看TF卡只显示一个67MB大小、名字为boot的盘符。若想恢复TF卡整个空间为windows可识别的fat32/exfat格式,需要使用低级格式化工具HDD Low Level Format Tool(windows磁盘管理器无法处理ext4格式磁盘)。
另外,树莓派官网也为需要安装多个操作系统的群体提供了NOOBS的安装方式。
详情参考:安装配置树莓派的最佳工具——NOOBS
默认用户名 | 默认密码 |
---|---|
pi | raspberry |
root | 空 |
(由于root用户默认不允许SSH方式登陆,首次登陆推荐pi用户登陆Raspbian)
为了安全起见,默认情况下Raspbian是不允许root用户进行SSH远程登录的。修改SSH配置如下:
raspi-config是Raspbian自带的一个系统配置工具。
运行命令:sudo raspi-config
详情参考:树莓派官方设置工具raspi-config 2014最新版使用教程
编辑 nano /etc/apt/sources.list文件。删除原文件所有内容,用以下内容取代:
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main non-free contrib
deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main non-free contrib
编辑此文件后,
使用sudo apt-get update命令,更新软件列表。
使用sudo apt-get upgrade命令,更新软件。
旧版配置如下(新版本已失效)
新版配置如下(2016-05-27-raspbian-jessie.zip)
已接入无线网配置文件(/etc/wpa_supplicant/wpa_supplicant.conf)
DNS(/etc/resolv.conf)
nameserver 218.2.2.2 #DNS主服务器
nameserver 218.4.4.4 #DNS备用服务器(附:手动重启网络)
sudo /etc/init.d/networking restart #重新加载网络配置文件
sudo ifup eth0 # 启动网卡eth0
安装linux server:sudo apt-get install tightvncserver
下载windows client :VNC-Viewer-5.3.2-Windows
配置并建立连接
vncserver
touch /etc/init.d/tightvncserver #在/etc/init.d/中创建一个文件tightvncserver
chmod +x /etc/init.d/tightvncserver #为上述文件增加可运行权限
nano /etc/init.d/tightvncserver #编辑上述文件,添加如下内容
#! /bin/sh### BEGIN INIT INFO# Provides: tightvncserver# Required-Start: $local_fs# Required-Stop: $local_fs# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: Start/stop tightvncserver### END INIT INFO# Set the USER variable to the name of the user to start tightvncserver underexport USER='pi'eval cd ~$USERcase "$1" in start) # 启动命令行。此处自定义分辨率、控制台号码或其它参数。 su $USER -c '/usr/bin/tightvncserver -depth 16 -geometry 800x600 :1' echo "Starting TightVNC server for $USER " ;; stop) # 终止命令行。此处控制台号码与启动一致。 su $USER -c '/usr/bin/tightvncserver -kill :1' echo "Tightvncserver stopped" ;; *) echo "Usage: /etc/init.d/tightvncserver {start|stop}" exit 1 ;;esacexit 0
(注:USER变量的值为默认用户名,这里是pi。)
update-rc.d tightvncserver defaults #增加到开机启动列表
update-rc.d -f tightvncserver remove #从开机启动列表移除
service tightvncserver status #查看tightvncserver服务状态
详情参考:VNC远程登录Raspbian图形界面
apt-get install xrdp #安装xrdp服务
安装后即可使用Raspbian用户名和密码访问树莓派。
联系客服