0、准备
设置国内软件源,参照清华源的官方说明
https://mirrors.tuna.tsinghua.edu.cn/help/raspbian/
1、安装宝塔
第一步:安装make
apt install make cmake
如果不安装make直接安装宝塔会失败
第二步:安装https访问工具
sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
第三步:安装宝塔
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh
2、安装frp内网穿透
具体安装及配置参考的我其他文章
这里主要说明树莓派的特有配置
开机自启配置
vim /etc/systemd/system/frp.service
[Unit]
Description=frpc
After=network.target
Wants=network.target
[Service]
RestartSec=5
Type=simple
ExecStart=/home/pi/frp/frp_0.39.0_linux_arm64/frpc -c /home/pi/frp/frp_0.39.0_linux_arm64/frpc.ini
Restart = always
[Install]
WantedBy=multi-user.target
ExecStart需要修改为自己frp的路径
systemctl enable frp
systemctl start frp
核心是:RestartSec=5
树莓派在启动后网络会延迟配置,导致frp启动失败,这样5s重试就能保证启动成功
Comments | NOTHING