您的位置:首页 > 其它

树莓派(RespberryPi)安装手记

2015-08-30 12:10 363 查看


树莓派(RespberryPi)安装手记

购买了两台树莓派,显示器接口是HDMI的,所以需要HDMI高清线连接到显示器,再加上SD卡做硬盘以及无线USB-WIFI,就可以玩一玩树莓派这个小东西了。以下是安装手记。
首先是制作“启动光盘”,其实就是把定制版的Linux刷到SD卡上。下载镜像系统Raspbian:http://www.raspberrypi.org/downloads,下载工具包: http://sourceforge.net/projects/win32diskimager/。使用工具把Raspbian刷到SD卡上,插到树莓派上即可。

启动树莓派,进入安装界面:

expand_rootfs YES
configure_keyboard --> other --> english us
change_locale:
locales to be generated:
en_us.utf8,zh_cn.utf8
default locale:en_us.utf8
key borard -> 105 generic (inte) --> DO NOT select english uk --> other -> english US -> yes -> yes -> yes
ssh 激活该服务!远程登录用 pi/raspberry
boot_behaviour YES

进入系统后配置

安装中文字库
$ sudo apt-get install ttf-wqy-zenhei
输入法
$ sudo apt-get install scim-pinyin
播放视频
omxplayer -o hdmi xxxxxxxxx
中文字体
$ sudo apt-get install ttf-wqy-microhei
输入法
$ sudo apt-get install scim scim-pinyin
音频驱动:
$ sudo apt-get install alsa-utils

配置无线USB网卡

lsusb 查看有无usb wifi 芯片
iwlist wlan0 scan 扫描网络

配置网卡文件如下
cat /etc/network/interfaces

auto lo

iface lo inet loopback
iface eth0 inet dhcp

#allow-hotplug wlan0
#iface wlan0 inet manual
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "neu"
wpa-psk  "lucifer_chn"


如果获取不到dhcp,使用静态

# static ip
auto wlan0
allow-hotup wlan0
iface wlan0 inet static
address 192.168.1.239
getway 192.168.1.1
wpa-ssid "neu"
wpa-psk  "lucifer_chn"
# route
up route add default gw 192.168.1.1
down route del default gw 192.168.1.1


ping 192....1测试
curl 192....1测试

添加路由
sudo route add default gw 192.168.1.1

再route:
default localhost 0.0.0 UG ... 表示能上网了!

立即重启网卡
sudo /etc/init.d/networking restart
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: