赞
踩
- cd /usr/local/share
- mkdir pgyvpn
- 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 <ztaddr> <path> <latency> <version> <role>
- 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"
- }
方法二:使用命令建立软连接
- #停止docker服务
- systemctl stop docker
-
- #为docker新建一个目录
- mkdir /data/docker
-
- #迁移原来文件
- mv -r /var/lib/docker /data/docker
-
- #使用命令建立软连接
- ln -s /data/docker/ /var/lib/docker
注意:如果修改的目标目录为移动硬盘,则移动硬盘必须为Linux数据格式,比如ext4格式,ntfs格式(windows格式)会报错
- # 安装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
参考文章:http://t.csdnimg.cn/7ZOJF
列出所有可用块设备
- 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
首先通过blkid命令将分区的uuid查询出来并复制uuid(往/etc/fstab中追加挂载信息时建议使用uuid)
- root@armbian:~# blkid
- /dev/mmcblk2p2: LABEL="ROOTFS_EMMC" UUID="9b85b4bc-0a34-400e-9f40-e290815ffee9" BLOCK_SIZE="4096" TYPE="ext4"
- /dev/mmcblk2p1: LABEL_FATBOOT="BOOT_EMMC" LABEL="BOOT_EMMC" UUID="7468-E6C9" BLOCK_SIZE="512" TYPE="vfat"
- /dev/zram1: LABEL="log2ram" UUID="a712fa3f-4ab1-4afe-9adc-2fc246b4d8ee" BLOCK_SIZE="4096" TYPE="ext4"
- /dev/sda1: UUID="1c37511b-a084-15a3-a3ba-33a33c614015" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="b0becd40-01"
- /dev/zram0: UUID="13576389-493c-4e33-87ec-23c7f303202e" TYPE="swap"
我们挂载的是/dev/sda1,文件系统类型ext4
查看配置文件
- 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 ext4 defaults 0 2
或者
UUID=1c37511b-a084-15a3-a3ba-33a33c614015 /mnt/sda1 ext4 defaults 0 2
lsblk列出所有可用块设备,执行mkfs.ext4 /dev/sda1格式化磁盘为ext4格式
- armbian:~:# mkfs.ext4 /dev/sda1
- mke2fs 1.47.0 (5-Feb-2023)
- /dev/sda1 contains a ntfs file system
- Proceed anyway? (y,N) y
- Creating filesystem with 244190208 4k blocks and 61054976 inodes
- Filesystem UUID: 1c37511b-c084-4e64-a3ba-33a33c614015
- Superblock backups stored on blocks:
- 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
- 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
- 102400000, 214990848
-
- Allocating group tables: done
- Writing inode tables: done
- Creating journal (262144 blocks):
- done
- Writing superblocks and filesystem accounting information: done
创建/etc/network/interfaces.d/eth0 文件写入配置
- auto eth0
- # 设置静态IP地址
- iface eth0 inet static
- # 自动开启网卡混杂模式
- up ip link set $IFACE promisc on
- # 给eth0设置固定的mac地址,自己编一个
- hwaddress ether 00:19:28:01:31:23
- # armbian的ip地址
- address 192.168.1.5
- broadcast 192.168.1.255
- netmask 255.255.255.0
- # 主路由的ip地址
- gateway 192.168.1.1
- dns-nameservers 192.168.1.1
- dns-nameservers 114.114.114.114
文件创建好后,重启
reboot
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。