树莓派—系统安装

一.准备工作:
1.最好最准备一张4G以上的SD卡,最好是高速卡,推荐Class4以上的卡,因为卡得速度直接影响树莓派的运行速度
2.下载树莓派debian系统镜像文件,地址如下:
http://www.raspberrypi.org/downloads
3.winXP和win7下安装镜像的工具win32diskimager
下载地址:http://www.onlinedown.net/soft/110173.htm
4.用win32diskimager在windows下将镜像文件写入SD卡中, 打win32diskimager找到镜像文件,选好SD卡盘符,点写入, 成功后,点退出

file:///C:UsersMEAVE_~1AppDataLocalTempmsohtmlclip11clip_image001.png
二.启动系统用SD
1. SD卡插入树莓派插槽中,连接电源,USB键盘,HDMI到电脑显示器或电视接口,在显示器或电视中后有图形显示
三.巧用VNC连接电脑和树莓派
1. 连接网线到树莓派,
2. MyLanViewer 找到树莓派的IP地址, 如果机器不多的话可以在路由器上查到Raspberrypi这个名字树莓派的IP地址
3. Putty这个软件连接到树莓派,  连接成功后,在窗口中用,username:pi,  password:raspberry 登录系统,用sudosu 更换帐号到管理员
file:///C:UsersMEAVE_~1AppDataLocalTempmsohtmlclip11clip_image002.png
file:///C:UsersMEAVE_~1AppDataLocalTempmsohtmlclip11clip_image004.jpg

Putty命令终端下输入命令
sudo apt-get install vnc-server

 

接下来配置tightvncserver的启动服务
输入命令
sudo nano /etc/init.d/tightvncserver

 

然后复制粘贴这个脚本到Putty窗口

### BEGIN INIT INFO
# Provides: tightvnc
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start VNC Server as a service
# Description: Start VNC Server as a service.
### END INIT INFO
#!/bin/sh
# /etc/init.d/tightvncserver
# Customised by Stewart Watkiss
 
# Set the VNCUSER variable to the name of the user to starttightvncserver under
VNCUSER=’pi’
eval cd ~$VNCUSER
case “$1″ in
start)
su $VNCUSER -c ‘/usr/bin/tightvncserver :1′
echo “Starting TightVNC server for $VNCUSER ”
;;
stop)
pkill Xtightvnc
echo “Tightvncserver stopped”
;;
*)
echo “Usage: /etc/init.d/tightvncserver {start|stop}”
exit 1
;;
esac
exit 0
#
需要特别说明的一点是 这个脚本的默认用户是pi
Ctrl+ O 保存 Ctrl +X 退出
输入命令
sudo chmod 755 /etc/init.d/tightvncserver
sudo update-rc.d tightvncserver defaults

 

输入命令
vncserver
会提示你设定vnc 服务的访问密码
需要连续输入两次密码
密码长度最好为8
之后还会提示你要不要输入一个只读密码
只读密码可以选Y输入也可以选n跳过

到这里vnc远程桌面就可以用了
默认连接端口 ip:5901
以后每次树莓派启动 远程桌面都会自动运行
file:///C:UsersMEAVE_~1AppDataLocalTempmsohtmlclip11clip_image005.png
至此你可以用VNC 来控制树莓派了。
file:///C:UsersMEAVE_~1AppDataLocalTempmsohtmlclip11clip_image007.jpg

版权声明:
作者:admin
链接:http://www.bttme.com/archives/111.html
来源:bttme
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>