树莓派官网
器件准备:树莓派zero2w,数据连接线,读卡器,sd卡16g左右。
烧录系统:
下载树莓派镜像烧录器到本地电脑,选择raspberry zero2w
插入读卡器
操作系统选择raspberry pi os(64-bit)full
有wifi相关驱动,下载位置选择到读卡器
。
next开始设置
磁盘文件需要新建一个ssh文件夹
这里只能设置一个wifi
插入sd卡,插入数据线
新建ssh文件夹
插入sd卡,上电后,要检查是否启动成功,可以查看自己路由器连接设备,可以查询到树莓派zero2w的ip地址。
ping saber.local
ssh root@saber.local
ping 树莓派ip
ssh username@ip
报错
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ED25519 key sent by the remote host is
SHA256:YAk1PicuI086yA1K8ZASyM0APcsYrXtnKaC4nKeaaG0.
Please contact your system administrator.
Add correct host key in C:\\Users\\YunJin/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in C:\\Users\\YunJin/.ssh/known_hosts:3
Host key for 192.168.8.13 has changed and you have requested strict checking.
Host key verification failed.
ssh-keygen -R ip
ssh username@ip
一、 Nginx、MaraiDB、PHP的安装以及配置
打开命令行,依次输入以下命令:
sudo apt install nginx
sudo apt install php7.3
sudo apt install php7.3-fpm
sudo apt install php7.3-mysql
sudo apt install php7.3-common
sudo apt install mariadb-serv
PHP 7.3 在 Ubuntu 16.04 默认 repo 中可能不可用,您需要添加第三方 repo。我经常使用 ondrej repo quiet 并且效果很好。
运行以下命令:
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.3