分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 运营维护

Raspberry.1.开机上手

发布时间:2023-09-06 02:21责任编辑:蔡小小关键词:暂无标签

raspberry  3b+

-------------------------------------------------------------------------------

写系统

有很多系统可选,我是第一次玩,所以选择官方定制系统。下载树莓派官方深度定制 Raspbian 系统。

下载后解压得到 .img 文件。

使用 win32DiskImager 将系统写入sd卡

---------------------------------------------------------------

开机上电

插上 SD卡、网线、电源,上电。

板上有两个指示灯 PWR ACT

PWR 常亮 ,电源正常;ACT 闪烁 ,SD卡正常活动,系统启动。

系统默认账号: pi / raspberry

由于我没有可以用的显示器,就只能使用putty和远程桌面登陆。

都需要先查看板子的ip。

-----------------------------------------------------------------

SSH登陆

需要在sd卡 boot 区 新建一个空白文件ssh ,否则无法登陆。

我使用的是Putty。

------------------------------------------------------------

配置WIFI上网

可以在未启动时在SD卡中修改 /boot/wpa_supplicant.conf 文件配置,也可以在 /boot/wpa_supplicant.conf 修改文件配置。

country=CNctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdevupdate_config=1 network={ssid="ssid_name"psk="password"key_mgmt=WPA-PSKpriority=1} 

#priority 是连接优先级

---------------------------------------------------------------------------------

设置静态IP

修改 /etc/dhcpcd.conf 配置文件。文件下写法列子。

interface eth0static ip_address=192.168.31.81/24static routers=192.168.31.1static domain_name_servers=192.168.31.1interface wlan0static ip_address=192.168.31.81/24static routers=192.168.31.1static domain_name_servers=192.168.31.1

设置完成 重启 sudo reboot

---------------------------------------------------------------------------------------------

远程桌面

我是用的是windows自带的远程桌面。

安装

sudo apt-get install xrdp

sudo apt-get purge tightvnc xrdp

sudo apt-get install tightvncserver xrdp

启动 sudo /etc/init.d/xrdp restart

查看 netstat -tnl

只要 3350 3389 5910 这三个端口处于LISTEN,就没有问题。

------------------------------------------------------------------------------------------------------------------------------

修改时区

找到方法有两个,一是在树莓派设置中修改 sudo raspi-config

选择 4 localisation --- I2 change timezone ---  asia --- shanghai 。

二是使用NTP(Network Time Protocol,网络时间协议)

1.安装 sudo apt-get install ntpdate

2.启用 sudo timedatectl set-ntp true

3.修改 sudo dpkg-reconfigure tazdata  

  这里就是选择 时区 。

输入 date 查看时间

------------------------------------------------------------------------------------------

via

http://shumeipai.nxez.com/

https://blog.csdn.net/xdw1985829/article/details/38817195

https://www.cnblogs.com/shubin/p/7746399.html

https://www.cnblogs.com/maoguy/p/5678563.html

Raspberry.1.开机上手

原文地址:https://www.cnblogs.com/protogenoi/p/9866981.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved