cd /usr/local/share
mkdir pgy
wget https://pgy.oray.com/softwares/58/download/1839/PgyVisitor_Raspberry_2.4.0.52291_arm64.deb
dpkg -i PgyVisitor_Raspberry_2.4.0.52291_arm64.deb
输入pgyvisitor login/pgyvisitor login -u [UID]
命令并回车,进行交互登录。
参考官网地址:https://service.oray.com/question/27842.html#data-5
输入pgyvisitor autologin -y
命令并回车,开启自动登录蒲公英客户端。当设备开机或重启后,蒲公英客户端将自动登录。
输入pgyvisitor getmbrs -m
命令并回车,显示当前组网名称、在线成员的信息及离线成员的信息。
输入pgyvisitor showsets
命令并回车,显示当前登录的蒲公英客户端UID以及自动登录的状态。
wget https://download.zerotier.com/dist/debian/bionic/zerotier-one_1.12.2_arm64.deb
dpkg -i zerotier-one_1.12.2_arm64.deb
zerotier-cli join 295e18238c # 295e18238c is Node ID
$ sudo zerotier-cli status
200 info 295e18238c 1.4.6 ONLINE # 295e18238c is Node ID
$ sudo zerotier-cli listpeers
[sudo] password for user:
200 listpeers
200 listpeers 34e0a5e174 147.75.92.2/9993;2662;2361 301 - PLANET
200 listpeers 3a46f1bf30 185.180.13.82/9993;12674;12510 163 - PLANET
200 listpeers 778cde7190 103.195.103.66/9993;7668;7442 226 - PLANET
200 listpeers 992fcf1db7 195.181.173.159/9993;2662;2354 308 - PLANET
将节点前面的授权一栏的方框打钩,表示授权节点接入,刷新页面,如图.
至此,机器已经成功加入网络.
系统采用的是ophub的镜像
修改docker_path路径
cd /usr/share/ophub/armbian-software
vim software-command.sh
将docker_path路径改为指定路径
#========================== Set default parameters ==========================
#
# Get custom firmware information
software_path="/usr/share/ophub/armbian-software"
command_docker="${software_path}/command-docker.sh"
ophub_release_file="/etc/ophub-release"
#
# Docker-related default settings
docker_path="/mnt/sda3/opt/docker"
download_path="/opt/downloads"
movie_path="/opt/movies"
music_path="/opt/music"
tv_path="/opt/tv"
docker_puid="1000"
执行armbian-software
root@armbian:~# armbian-software
[ STEPS ] Start selecting software [ Current system: ubuntu/lunar ]...
───────────────────────────────────────────────────────────────────
ID NAME STATE MANAGE
───────────────────────────────────────────────────────────────────
101 Docker not-installed install
102 Portainer not-installed install
103 Yacht not-installed install
104 Transmission not-installed install
105 qBittorrent not-installed install
106 NextCloud not-installed install
107 Jellyfin not-installed install
108 HomeAssistant not-installed install
[ OPTIONS ] Please Input Software ID:
未安装的软件
:状态显示为 not-installed
,输入软件对应的 ID
即可 安装
。已安装的软件
:状态显示为 installed
,输入软件对应的 ID
,根据提示选择 更新
或 删除
。输入101 安装Docker,等待安装完成即可
输入docker --version
armbian:armbian-software:# docker --version
Docker version 24.0.7, build afdd53b
复制原有的Docker安装目录
cp -r /var/lib/docker/* /mnt/sda1/var/lib/docker
找到/etc/docker/daemon.json
文件,修改data-root为指定目录
{
"data-root": "/mnt/sda1/var/lib/docker"
}
# 安装nextcloud
docker run -d -p 8088:80 -v /mnt/sda1/opt/docker/nextcloud/apps:/var/www/html/custom_apps -v /mnt/sda1/opt/docker/nextcloud/config:/var/www/html/config -v /mnt/sda1/opt/docker/nextcloud/data:/var/www/html/data -v /mnt/sda1/opt/docker/nextcloud/nextcloud:/var/www/html --restart=always --name nextcloud arm64v8/nextcloud:latest
先新建一个挂载点,或者找一个空文件夹
mkdir /mnt/usb
然后挂载
mount -t -ntfs-3g /dev/sdb2 /mnt/usb
列出所有可用块设备
armbian:sda1:# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 931.5G 0 disk
└─sda1 8:1 0 931.5G 0 part /mnt/sda1
mmcblk2 179:0 0 7.1G 0 disk
├─mmcblk2p1 179:1 0 255M 0 part /boot
└─mmcblk2p2 179:2 0 6.8G 0 part /var/log.hdd
/
mmcblk2boot0 179:32 0 4M 1 disk
mmcblk2boot1 179:64 0 4M 1 disk
zram0 254:0 0 401.7M 0 disk [SWAP]
zram1 254:1 0 50M 0 disk /var/log
zram2 254:2 0 0B 0 disk
查看配置文件
armbian:~:# cat /etc/fstab
UUID=31d173f0-16e1-4924-8ff3-071d2fc28b5e / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1
LABEL=BOOT_EMMC /boot vfat defaults 0 2
tmpfs /tmp tmpfs defaults,nosuid 0 0
编辑/etc/fstab
vim /etc/fstab
在底部添加如下内容
/dev/sda1 /mnt/sda1 ntfs defaults 0 2