折腾树莓派(一)系统安装与初始化

来源:互联网 发布:老王python培训 编辑:程序博客网 时间:2024/06/06 05:46

系统安装

RASPBIAN系统下载页面:

https://www.raspberrypi.org/downloads/raspbian/

系统下载完毕后使用Win32DiskImager将img镜像写入TF卡中,插入树莓派,通电,完成安装。

Win32DiskImager下载页面:

http://sourceforge.net/projects/win32diskimager/

系统设置

系统装好后,通过内网IP地址SSH连接树莓派进行配置。

SSH连接

通过HDMI连接显示器直接查看内网IP或在路由器中找新增设备的IP地址,Windows平台下使用PuTTY连接树莓派,并使用默认用户名密码登陆系统

用户名:pi密码:raspberry

改密码

sudo passwd pi

开启root用户

由于root用户默认密码为空,因此无法登陆。登陆默认用户pi给root设置密码后即可开启root用户

sudo passwd root

之后可以使用

su - root

切换至root用户。

使用raspi-config配置树莓派

sudo raspi-config
1. 确保SD卡所有空间被使用:Expand Filesystem2. 更改启动选项: Boot Options > Console (命令行启动、不自动登陆)3. 设置键盘布局:Internationalisation Options > Change Keyboard Layout > Generic 105-key (Intl) PC > Other > English (US) > The default for the key board layout > No compose key > 4. 设置时区: Internationalisation Options > Change Timezone > Asia > Shanghai5. 更改Hostname: Advanced Options > Hostname6. 分配GPU内存: Advanced Options > Memory Split (16)7. 重启

软件安装

软件源更改

中山大学 Raspbian
http://mirror.sysu.edu.cn/raspbian/raspbian/

中国科学技术大学 Raspbian
http://mirrors.ustc.edu.cn/raspbian/raspbian/

清华大学 Raspbian
http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/

华中科技大学 Raspbian
http://mirrors.hustunique.com/raspbian/raspbian/ Arch

Linux ARM
http://mirrors.hustunique.com/archlinuxarm/

大连东软信息学院源(北方用户) Raspbian
http://mirrors.neusoft.edu.cn/raspbian/raspbian/

重庆大学源(中西部用户) Raspbian
http://mirrors.cqu.edu.cn/Raspbian/raspbian/

新加坡国立大学 Raspbian
http://mirror.nus.edu.sg/raspbian/raspbian

牛津大学 Raspbian
http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian

韩国KAIST大学 Raspbian
http://ftp.kaist.ac.kr/raspbian/raspbian/

在以上软件源中选一个ping最小的,编辑/etc/apt/sources.list文件,将网址换成ping最小的网址,之后使用

sudo apt-get updatesudo apt-get upgradesudo apt-get dist-upgradesudo rpi-update

更新软件源列表、软件版本和内核版本

中文支持及中文输入法

sudo apt-get install ttf-wqy-zenheisudo apt-get install scim-pinyin

安装vim

sudo apt-get install vim
0 0
原创粉丝点击