树莓派

初始化

配置Wifi:
创建文件wpa_supplicant.conf

1
2
3
4
5
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
ssid="HUAWEI-QZZ7ZR"
psk="@6212832@zxy"
}

配置SSH:
创建一个空文件ssh(小写)。

如果还不行,配置config.txt

1
dtoverlay=pi3-miniuart-bt

设置APT源:

1
2
deb http://mirrors.aliyun.com/raspbian/raspbian/ buster main non-free contrib
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ buster main non-free contrib

安装Docker

1
2
curl -sSl https://get.docker.com|sh
sudo pip3 install docker-compose -i http://mirrors.aliyun.com/pypi/simple

安装Samba

1
sudo apt-get install samba

配置文件/etc/samba/smb.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#### Debugging/Accounting ####
# share the dir without passwd
security = user
map to guest = Bad User


# 在文件结尾添加如下行:
[share]
comment = this is Linux share directory
path = /home/myth/share
public = yes
writable = yes
browable = yes

[u pan]
comment = this is Linux share directory
path = /media/pi
public = yes
writable = yes
browable = yes

重启服务

1
sudo systemctl restart smbd

更改访问权限

1
sudo chmod 777 /media/pi