admin 管理员组文章数量: 887021
下载OMV源码:
git clone --depth=1 https://github/openmediavault/openmediavault.git
安装编译环境:
cd openmediavault/
./buildenvadm.sh -h
./buildenvadm.sh install
这里会安装一堆编译OMV需要的工具。
如果编译过程中报dh命令找不到的错误,需要安装debhelper:
sudo apt install debhelper
编译OMV各种软件包:
cd deb/
make -j binary
make目标可以在输入make之后,按tab键列出来。
顺利的话,就会编译出一堆deb软件包,保存在deb目录下。
alpha@mascot.x ~/workspace/openmediavault/openmediavault/deb $ ll *.deb
-rw-r--r-- 1 alpha alpha 3028108 Jun 5 02:07 openmediavault_7.2.1-1_all.deb
-rw-r--r-- 1 alpha alpha 49432 Jun 5 02:04 openmediavault-clamav_7.0-7_all.deb
-rw-r--r-- 1 alpha alpha 10444 Jun 5 02:04 openmediavault-diskstats_7.0-2_all.deb
-rw-r--r-- 1 alpha alpha 17376 Jun 5 02:04 openmediavault-filebrowser_7.0-4_all.deb
-rw-r--r-- 1 alpha alpha 19668 Jun 5 02:04 openmediavault-forkeddaapd_7.0-2_all.deb
-rw-r--r-- 1 alpha alpha 67332 Jun 5 02:04 openmediavault-ftp_7.0-5_all.deb
-rw-r--r-- 1 alpha alpha 8908 Jun 5 02:07 openmediavault-hosts_7.0-3_all.deb
-rw-r--r-- 1 alpha alpha 133152 Jun 5 02:07 openmediavault-k8s_7.1.1-1_all.deb
-rw-r--r-- 1 alpha alpha 6032 Jun 5 02:07 openmediavault-keyring_1.0.2-2_all.deb
-rw-r--r-- 1 alpha alpha 25288 Jun 5 02:07 openmediavault-lvm2_7.0-2_all.deb
-rw-r--r-- 1 alpha alpha 17352 Jun 5 02:04 openmediavault-md_7.0-7_all.deb
-rw-r--r-- 1 alpha alpha 33312 Jun 5 02:07 openmediavault-nut_7.0.3-2_all.deb
-rw-r--r-- 1 alpha alpha 22840 Jun 5 02:04 openmediavault-onedrive_7.0-3_all.deb
-rw-r--r-- 1 alpha alpha 21952 Jun 5 02:07 openmediavault-owntone_7.0-2_all.deb
-rw-r--r-- 1 alpha alpha 22900 Jun 5 02:04 openmediavault-photoprism_7.0-4_all.deb
-rw-r--r-- 1 alpha alpha 14664 Jun 5 02:07 openmediavault-podman_7.0-3_all.deb
-rw-r--r-- 1 alpha alpha 16852 Jun 5 02:07 openmediavault-s3_7.0-3_all.deb
-rw-r--r-- 1 alpha alpha 15500 Jun 5 02:07 openmediavault-shairport_7.0-2_all.deb
-rw-r--r-- 1 alpha alpha 3308 Jun 5 02:07 openmediavault-sharerootfs_7.0-1_all.deb
-rw-r--r-- 1 alpha alpha 17760 Jun 5 02:04 openmediavault-snmp_7.0-2_all.deb
-rw-r--r-- 1 alpha alpha 18140 Jun 5 02:07 openmediavault-tftp_7.0-2_all.deb
-rw-r--r-- 1 alpha alpha 38240 Jun 5 02:04 openmediavault-usbbackup_7.0.2-1_all.deb
-rw-r--r-- 1 alpha alpha 12872 Jun 5 02:04 openmediavault-wetty_7.0-2_all.deb
参考编译和运行qemu-uboot-arm64单板的Armbian系统-CSDN博客这篇文章编译和启动qemu-uboot-arm64 Armbian系统。
注:qemu使用桥接网络启动自己编译的qemu-uboot-arm64 Armbian系统启动后不会自动获取IP,需要手动配置IP。这个除了跟系统配置有关,可能跟网桥的配置,连接的路由器等也有关系。
注2:自己编译的qemu-uboot-arm64 Armbian系统镜像编译过程已经做了扩容50GB(可以通过编译log看到扩容操作)。
less -SR output/logs/log-build-dba7ecf5-9329-41d5-b552-22bf9b8db800.log.ans
...
--> (4279) INFO: Resizing qcow2 image by '+50G' [ image-output-qcow2 ]
...
通过file命令也能看到大小:
file Armbian-unofficial_24.8.0-trunk_Qemu-uboot-arm64_bookworm_current_6.6.32.img.qcow2
Armbian-unofficial_24.8.0-trunk_Qemu-uboot-arm64_bookworm_current_6.6.32.img.qcow2: QEMU QCOW Image (v3), 57923338240 bytes (v3), 57923338240 bytes
启动qemu-uboot-arm64 Armbian系统:
sudo qemu-system-aarch64 -smp 8 -m 8G -machine virt -nographic -cpu cortex-a72 -bios Qemu-uboot-arm64/Armbian-unofficial_24.8.0-trunk_Qemu-uboot-arm64_bookworm_current_6.6.32.u-boot.bin -drive if=none,media=disk,id=drive0,file=Qemu-uboot-arm64/Armbian-unofficial_24.8.0-trunk_Qemu-uboot-arm64_bookworm_current_6.6.32.img.qcow2,discard=unmap,detect-zeroes=unmap -device virtio-blk-pci,drive=drive0,bootindex=0 -drive file=omvdata.qcow2,if=virtio -net nic -net tap,ifname=tap0
查看硬盘:
root@qemu-uboot-arm64:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
zram0 251:0 0 3.9G 0 disk [SWAP]
zram1 251:1 0 50M 0 disk /var/log
zram2 251:2 0 0B 0 disk
vda 252:0 0 53.9G 0 disk
└─vda1 252:1 0 53.4G 0 part /var/log.hdd
/
vdb 252:16 0 64G 0 disk
先安装vim和net-tools,然后配置IP(虽然现在没有IPv4的IP,并不影响apt访问外网下载和安装软件,是否走IPv6访问的?):
apt install vim net-tools
ifconfig enp0s1 192.168.2.90/24
配置完IP之后,就可以把自己编译的OMV软件包复制到虚拟机里了。
这里有个遗留问题,为什么自己编译的这个qemu-uboot-arm64系统没有自动获取IP,但官方下载uefi-arm64版本可以自动获取IP?
参考ARM虚拟机安装OMV这篇文章安装官方的OMV。
安装自己编译的OMV,稍微有点不同。
1、首先把上面编译的OMV deb包都复制到Armbian系统上:
scp -r omv-packages/ root@192.168.2.90:~/
2、Armbian系统缺少OMV的依赖包,直接使用dpkg -i命令安装会因为缺少依赖无法安装,缺少的依赖可以使用aptitude命令安装,可以根据提示自动安装依赖的包:
dpkg -i openmediavault-keyring_1.0.2-2_all.deb
dpkg -i openmediavault_7.2.1-1_all.deb
openmediavault-keyring包可以正常安装,openmediavault主包缺少依赖无法安装:
root@qemu-uboot-arm64:~/omv-packages# dpkg -i openmediavault-keyring_1.0.2-2_all.deb
Selecting previously unselected package openmediavault-keyring.
(Reading database ... 59667 files and directories currently installed.)
Preparing to unpack openmediavault-keyring_1.0.2-2_all.deb ...
Unpacking openmediavault-keyring (1.0.2-2) ...
Setting up openmediavault-keyring (1.0.2-2) ...
root@qemu-uboot-arm64:~/omv-packages# dpkg -i openmediavault_7.2.1-1_all.deb
Selecting previously unselected package openmediavault.
(Reading database ... 59674 files and directories currently installed.)
Preparing to unpack openmediavault_7.2.1-1_all.deb ...
Unpacking openmediavault (7.2.1-1) ...
dpkg: dependency problems prevent configuration of openmediavault:
openmediavault depends on php-fpm; however:
Package php-fpm is not installed.
openmediavault depends on php-json; however:
Package php-json is not installed.
openmediavault depends on php-cgi; however:
Package php-cgi is not installed.
openmediavault depends on php-cli; however:
Package php-cli is not installed.
openmediavault depends on php-mbstring; however:
Package php-mbstring is not installed.
openmediavault depends on php-pam; however:
Package php-pam is not installed.
openmediavault depends on python3-dialog; however:
Package python3-dialog is not installed.
openmediavault depends on acl; however:
Package acl is not installed.
openmediavault depends on xfsprogs; however:
Package xfsprogs is not installed.
openmediavault depends on jfsutils; however:
Package jfsutils is not installed.
openmediavault depends on wsdd (>= 0.7.0); however:
Package wsdd is not installed.
openmediavault depends on sdparm; however:
Package sdparm is not installed.
openmediavault depends on mdadm; however:
Package mdadm is not installed.
openmediavault depends on postfix; however:
Package postfix is not installed.
openmediavault depends on libsasl2-modules; however:
Package libsasl2-modules is not installed.
openmediavault depends on bsd-mailx; however:
Package bsd-mailx is not installed.
openmediavault depends on cpufrequtils; however:
Package cpufrequtils is not installed.
openmediavault depends on uuid; however:
Package uuid is not installed.
openmediavault depends on nfs-kernel-server; however:
Package nfs-kernel-server is not installed.
openmediavault depends on sshpass; however:
Package sshpass is not installed.
openmediavault depends on zstd; however:
Package zstd is not installed.
openmediavault depends on samba; however:
Package samba is not installed.
openmediavault depends on samba-common-bin; however:
Package samba-common-bin is not installed.
openmediavault depends on avahi-daemon; however:
Package avahi-daemon is not installed.
openmediavault depends on libnss-mdns; however:
Package libnss-mdns is not installed.
openmediavault depends on monit; however:
Package monit is not installed.
openmediavault depends on beep; however:
Package beep is not installed.
openmediavault depends on php-bcmath; however:
Package php-bcmath is not installed.
openmediavault depends on gdisk; however:
Package gdisk is not installed.
openmediavault depends on rrdtool; however:
Package rrdtool is not installed.
openmediavault depends on collectd; however:
Package collectd is not installed.
openmediavault depends on anacron; however:
Package anacron is not installed.
openmediavault depends on quota; however:
Package quota is not installed.
openmediavault depends on php-xml; however:
Package php-xml is not installed.
openmediavault depends on quotatool; however:
Package quotatool is not installed.
openmediavault depends on whiptail; however:
Package whiptail is not installed.
openmediavault depends on lvm2; however:
Package lvm2 is not installed.
openmediavault depends on xmlstarlet; however:
Package xmlstarlet is not installed.
openmediavault depends on rrdcached; however:
Package rrdcached is not installed.
openmediavault depends on nginx; however:
Package nginx is not installed.
openmediavault depends on samba-vfs-modules; however:
Package samba-vfs-modules is not installed.
openmediavault depends on python3-pyudev; however:
Package python3-pyudev is not installed.
openmediavault depends on python3-natsort; however:
Package python3-natsort is not installed.
openmediavault depends on python3-lxml; however:
Package python3-lxml is not installed.
openmediavault depends on salt-minion (>= 3006.0); however:
Package salt-minion is not installed.
openmediavault depends on php-yaml; however:
Package php-yaml is not installed.
openmediavault depends on python3-click; however:
Package python3-click is not installed.
openmediavault depends on python3-cached-property; however:
Package python3-cached-property is not installed.
openmediavault depends on python3-polib; however:
Package python3-polib is not installed.
openmediavault depends on libnss-systemd; however:
Package libnss-systemd is not installed.
openmediavault depends on libnss-resolve; however:
Package libnss-resolve is not installed.
openmediavault depends on python3-packaging; however:
Package python3-packaging is not installed.
openmediavault depends on apt-listchanges; however:
Package apt-listchanges is not installed.
openmediavault depends on apticron; however:
Package apticron is not installed.dpkg: error processing package openmediavault (--install):
dependency problems - leaving unconfigured
Processing triggers for rsyslog (8.2302.0-1) ...
Errors were encountered while processing:openmediavault
root@qemu-uboot-arm64:~/omv-packages#
使用dpkg -I命令查看.deb依赖关系:
dpkg -I openmediavault-keyring_1.0.2-2_all.deb | grep "Depends:"
dpkg -I openmediavault_7.2.1-1_all.deb | grep "Depends:"
openmediavault-keyring_1.0.2-2_all.deb的依赖包系统已经安装,所以可以使用dpkg直接安装openmediavault-keyring_1.0.2-2_all.deb:
dpkg -i openmediavault-keyring_1.0.2-2_all.deb
openmediavault_7.2.1-1_all.deb的依赖包太多了,不知道哪些已经安装,这种情况下,安装所有依赖包,如果系统已经安装的可以忽略。
先把依赖包找出来:
echo `dpkg -I openmediavault_7.2.1-1_all.deb | grep "Depends:"` | sed "s/,//g" 再手动加工一下:去掉“Depends:”,去掉版本号,选择可选包。 或者: echo `dpkg -I openmediavault_7.2.1-1_all.deb | grep "Depends:"` | sed -E "s/(,)|(.*:)|(\|)|(\([>=. 0-9]+\))//g" 再手动加工以下:选择可选包 或者: echo `dpkg -I openmediavault_7.2.1-1_all.deb | grep "Depends:"` | sed -E "s/.*://g" | sed -E "s/\([>=. 0-9]+\)//g" | sed -E "s/\|[^,]+,//g" | sed -E "s/\|[^,]+$//g" | sed -E "s/,//g" 这里可选包选择第一个包。 最后的依赖包如下: php-fpm libpam-modules php-json dpkg patch dash mawk php-cgi php-cli php-mbstring php-pam sudo ethtool python3-dialog acl iproute2 xfsprogs jfsutils ntfs-3g wsdd sdparm mdadm postfix libsasl2-modules bsd-mailx python3-dbus cpufrequtils rsyslog logrotate smartmontools openssl openssh-server uuid tzdata nfs-kernel-server lsb-release sshpass grep zstd wget util-linux samba samba-common-bin rsync apt-utils netplan.io avahi-daemon libnss-mdns iptables monit beep php-bcmath sed gdisk rrdtool collectd cron anacron quota php-xml quotatool whiptail lvm2 ca-certificates libc-bin findutils coreutils xmlstarlet mount parted bash diffutils lsof rrdcached locales nginx bash-completion python3 f2fs-tools python3-apt wpasupplicant systemd systemd-sysv btrfs-progs samba-vfs-modules pciutils python3-pyudev python3-natsort jq chrony python3-netifaces udev python3-lxml salt-minion libnss-myhostname php-yaml python3-click python3-cached-property python3-polib libnss-systemd libnss-resolve debian-archive-keyring openmediavault-keyring systemd-resolved python3-packaging unattended-upgrades apt-listchanges apticron debconf
用aptitude命令安装openmediavault的依赖:
安装下面依赖包之前,先安装openmediavault-keyring_1.0.2-2_all.deb,不然下面安装依赖时会报找不到openmediavault-keyring。
aptitude update 安装上面的依赖包,有些依赖包没有候选版本,如php-pam,salt-minion,先不安装: aptitude install php-fpm libpam-modules php-json dpkg patch dash mawk php-cgi php-cli php-mbstring sudo ethtool python3-dialog acl iproute2 xfsprogs jfsutils ntfs-3g wsdd sdparm mdadm postfix libsasl2-modules bsd-mailx python3-dbus cpufrequtils rsyslog logrotate smartmontools openssl openssh-server uuid tzdata nfs-kernel-server lsb-release sshpass grep zstd wget util-linux samba samba-common-bin rsync apt-utils netplan.io avahi-daemon libnss-mdns iptables monit beep php-bcmath sed gdisk rrdtool collectd cron anacron quota php-xml quotatool whiptail lvm2 ca-certificates libc-bin findutils coreutils xmlstarlet mount parted bash diffutils lsof rrdcached locales nginx bash-completion python3 f2fs-tools python3-apt wpasupplicant systemd systemd-sysv btrfs-progs samba-vfs-modules pciutils python3-pyudev python3-natsort jq chrony python3-netifaces udev python3-lxml libnss-myhostname php-yaml python3-click python3-cached-property python3-polib libnss-systemd libnss-resolve debian-archive-keyring openmediavault-keyring systemd-resolved python3-packaging unattended-upgrades apt-listchanges apticron debconf 或者 aptitude install $(echo `dpkg -I openmediavault_7.2.1-1_all.deb | grep "Depends:"` | sed -E "s/.*://g" | sed -E "s/\([>=. 0-9]+\)//g" | sed -E "s/\|[^,]+,//g" | sed -E "s/\|[^,]+$//g" | sed -E "s/,//g" | sed -E "s/php-pam//g" | sed -E "s/salt-minion//g") 这里$()子命令把openmediavault_7.2.1-1_all.deb的依赖找出来,然后依赖信息依次去掉的"Depends:"字符串,去掉某些包的版本号,去掉可选包的第二个包(以及|字符),删除逗号“,”,去掉找不到的依赖包php-pam和salt-minion,剩下就是可以安装的依赖包,用aptitude install命令安装。
安装过程中,选择不配置Postfix:
安装需要较长的时间,耐心等待安装完成。
安装完上面这些包,还有两个依赖包php-pam和salt-minion没有装,还是不能安装openmediavault_7.2.1-1_all.deb:
root@qemu-uboot-arm64:~/omv-packages# dpkg -i openmediavault_7.2.1-1_all.deb
Selecting previously unselected package openmediavault.
(Reading database ... 63306 files and directories currently installed.)
Preparing to unpack openmediavault_7.2.1-1_all.deb ...
Unpacking openmediavault (7.2.1-1) ...
dpkg: dependency problems prevent configuration of openmediavault:
openmediavault depends on php-pam; however:
Package php-pam is not installed.
openmediavault depends on salt-minion (>= 3006.0); however:
Package salt-minion is not installed.dpkg: error processing package openmediavault (--install):
dependency problems - leaving unconfigured
Processing triggers for rsyslog (8.2302.0-1) ...
Errors were encountered while processing:
openmediavault
安装php-pam和salt-minion:
这两个包Armbian系统的源没有提供,可以从OMV的源获取。
qume-uboot-arm64单板的Armbian系统版本编译时指定的是RELEASE=bookworm版本,可以通过cat /etc/os-release确认:
root@qemu-uboot-arm64:~/omv-packages# cat /etc/os-release
PRETTY_NAME="Armbian-unofficial 24.8.0-trunk bookworm"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.armbian"
SUPPORT_URL="https://forum.armbian"
BUG_REPORT_URL="https://www.armbian/bugs"
ARMBIAN_PRETTY_NAME="Armbian-unofficial 24.8.0-trunk bookworm"
openmediavault是7.2.1-1版本,应该可以使用7.0版本的OMV源。这个版本的源可以用官方的,也可以用清华大学的。
添加官方的OMV源:
cat <<EOF >> /etc/apt/sources.list.d/openmediavault.list
deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://packages.openmediavault/public sandworm main
# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://downloads.sourceforge/project/openmediavault/packages sandworm main
## Uncomment the following line to add software from the proposed repository.
# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://packages.openmediavault/public sandworm-proposed main
# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://downloads.sourceforge/project/openmediavault/packages sandworm-proposed main
## This software is not part of OpenMediaVault, but is offered by third-party
## developers as a service to OpenMediaVault users.
# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://packages.openmediavault/public sandworm partner
# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://downloads.sourceforge/project/openmediavault/packages sandworm partner
EOF
或者添加清华大学的OMV源:
cat <<EOF > /etc/apt/sources.list.d/openmediavault.list
deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.tuna.tsinghua.edu/OpenMediaVault/public sandworm main
deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.tuna.tsinghua.edu/OpenMediaVault/packages sandworm main
## Uncomment the following line to add software from the proposed repository.
# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.tuna.tsinghua.edu/OpenMediaVault/public sandworm-proposed main
# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.tuna.tsinghua.edu/OpenMediaVault/packages sandworm-proposed main
## This software is not part of OpenMediaVault, but is offered by third-party
## developers as a service to OpenMediaVault users.
# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.tuna.tsinghua.edu/OpenMediaVault/public sandworm partner
# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.tuna.tsinghua.edu/OpenMediaVault/packages sandworm partner
EOF
其中openmediavault-keyring前面已经通过dpkg -i openmediavault-keyring_1.0.2-2_all.deb命令安装了,可以检查确认安装情况:
root@qemu-uboot-arm64:~/omv-packages# file /usr/share/keyrings/openmediavault-archive-keyring.gpg
/usr/share/keyrings/openmediavault-archive-keyring.gpg: OpenPGP Public Key Version 4, Created Tue Jul 12 22:32:19 2016, RSA (Encrypt or Sign, 4096 bits); User ID; Signature; OpenPGP Certificate
我这里选择清华大学的源,添加源之后,更新软件源:aptitude update
root@qemu-uboot-arm64:~/omv-packages# aptitude update
Get: 1 https://mirrors.tuna.tsinghua.edu/OpenMediaVault/public sandworm InRelease [12.8 kB]
Get: 2 https://mirrors.tuna.tsinghua.edu/OpenMediaVault/packages sandworm InRelease [12.8 kB]
Get: 3 https://mirrors.tuna.tsinghua.edu/OpenMediaVault/public sandworm/main arm64 Packages [8,045 B]
Hit http://deb.debian/debian bookworm InRelease
Get: 4 http://deb.debian/debian bookworm-updates InRelease [55.4 kB]
Get: 5 http://deb.debian/debian bookworm-backports InRelease [56.5 kB]
Get: 6 https://mirrors.tuna.tsinghua.edu/OpenMediaVault/packages sandworm/main arm64 Packages [8,045 B]
Get: 7 http://deb.debian/debian bookworm-backports/main arm64 Packages.diff/Index [63.3 kB]
Get: 8 http://deb.debian/debian bookworm-backports/main arm64 Contents (deb).diff/Index [63.5 kB]...
更新源之后,检查是否能找到php-pam和salt-minion这两个软件包:
root@qemu-uboot-arm64:~/omv-packages# aptitude search php-pam salt-minion
p php-pam - pam module for PHP 8.2
p salt-minion - client package for salt, the distributed remote execution system
root@qemu-uboot-arm64:~/omv-packages#
顺利找到,可以安装了:
root@qemu-uboot-arm64:~/omv-packages# aptitude install php-pam salt-minion
The following NEW packages will be installed:
bsdmainutils{a} dctrl-tools{a} libnorm1{a} libpgm-5.3-0{a} libzmq5{a} ncal{a} php-pam python3-certifi{a} python3-chardet{a}
python3-charset-normalizer{a} python3-dateutil{a} python3-gnupg{a} python3-idna{a} python3-jinja2{a} python3-jmespath{a}
python3-looseversion{a} python3-markupsafe{a} python3-msgpack{a} python3-psutil{a} python3-py{a} python3-pycryptodome{a}
python3-requests{a} python3-systemd{a} python3-urllib3{a} python3-zmq{a} salt-common{a} salt-minion
The following partially installed packages will be configured:
openmediavault
The following packages are RECOMMENDED but will NOT be installed:
dmidecode python3-babel python3-croniter
0 packages upgraded, 27 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.8 MB of archives. After unpacking 48.0 MB will be used.
Do you want to continue? [Y/n/?] Y
上面的输出信息中,安装过程有配置openmediavault的操作,是因为前面执行过一次dpkg -i openmediavault_7.2.1-1_all.deb但安装失败的原因:
The following partially installed packages will be configured:
openmediavault
安装过程中报下面两个Failed,可以忽略:
...
Failed to stop ntp.service: Unit ntp.service not loaded.
Unit ntp.service does not exist, proceeding anyway.
Created symlink /etc/systemd/system/ntp.service → /dev/null.
Failed to stop systemd-timesyncd.service: Unit systemd-timesyncd.service not loaded.
Unit systemd-timesyncd.service does not exist, proceeding anyway.
Created symlink /etc/systemd/system/systemd-timesyncd.service → /dev/null.
Created symlink /etc/systemd/system/nfs-blkmap.service → /dev/null....
耐心等待安装完成,update-initramfs过程会耗时比较长:
......
Deploying service configurations ...
Processing system modifications ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+deb12u7) ...
Processing triggers for rsyslog (8.2302.0-1) ...
Processing triggers for openmediavault (7.2.1-1) ...
Restarting engine daemon ...
Updating workbench configuration files ...
Processing triggers for initramfs-tools (0.142) ...
update-initramfs: Generating /boot/initrd.img-6.6.32-current-arm64update-initramfs: Armbian: Converting to u-boot format: /boot/uInitrd-6.6.32-current-arm64
Image Name: uInitrd
Created: Fri Jun 7 12:53:34 2024
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 97829082 Bytes = 95536.21 KiB = 93.30 MiB
Load Address: 00000000
Entry Point: 00000000
update-initramfs: Armbian: Symlinking /boot/uInitrd-6.6.32-current-arm64 to /boot/uInitrd
'/boot/uInitrd' -> 'uInitrd-6.6.32-current-arm64'
update-initramfs: Armbian: done.
Current status: 0 (-1) broken, 6 (-21) new.
There are 6 newly obsolete packages: openmediavault, openmediavault-keyring, php-pam, python3-looseversion, salt-common, salt-minion
root@qemu-uboot-arm64:~/omv-packages#
接下来继续安装OMV:dpkg -i openmediavault_7.2.1-1_all.deb
root@qemu-uboot-arm64:~/omv-packages# dpkg -i openmediavault_7.2.1-1_all.deb
(Reading database ... 67611 files and directories currently installed.)
Preparing to unpack openmediavault_7.2.1-1_all.deb ...
Unpacking openmediavault (7.2.1-1) over (7.2.1-1) ...
Setting up openmediavault (7.2.1-1) ...
Creating configuration database ...
Migrating configuration database ...
Setting up Salt environment ...
/usr/lib/python3/dist-packages/salt/utils/http.py:8: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
import cgi
/usr/lib/python3/dist-packages/salt/utils/jinja.py:9: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
import pipes
/usr/lib/python3/dist-packages/salt/grains/core.py:2711: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
) = locale.getdefaultlocale()
/usr/lib/python3/dist-packages/salt/grains/core.py:2711: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
) = locale.getdefaultlocale()
/usr/lib/python3/dist-packages/salt/grains/core.py:2711: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
) = locale.getdefaultlocale()
/usr/lib/python3/dist-packages/salt/grains/core.py:2711: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
) = locale.getdefaultlocale()
/usr/lib/python3/dist-packages/salt/grains/core.py:2711: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
) = locale.getdefaultlocale()
/usr/lib/python3/dist-packages/salt/grains/core.py:2711: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
) = locale.getdefaultlocale()
Processing system modifications ...
Processing triggers for rsyslog (8.2302.0-1) ...
Processing triggers for openmediavault (7.2.1-1) ...
Restarting engine daemon ...
Updating workbench configuration files ...
root@qemu-uboot-arm64:~/omv-packages#
顺利安装完成。
重启系统验证安装结果:reboot
重启之后虽然登录界面提示有IPv4地址,但实际上并没有,还是要手动配置一下:
openmediavault 7.2.1-1 (Sandworm) qemu-uboot-arm64 ttyAMA0
Copyright (C) 2009-2024 by Volker Theile. All rights reserved.To manage the system visit the openmediavault workbench:
enp0s1: 192.168.2.90
enp0s1: 240e:3b1:3470:df1::1004
enp0s1: 240e:3b1:3470:df1:7299:5b84:d479:26a3
enp0s1: fe80::1f65:4341:cf28:900eBy default the workbench administrator account has the
username 'admin' and password 'openmediavault'.
It is recommended that you change the password for this account
within the workbench or using the 'omv-firstaid' CLI command.For more information regarding this appliance, please visit the
web site: https://www.openmediavaultqemu-uboot-arm64 login: root
Password:
__ _ __ _ _
_ _ ___ / _(_) __ _ _ __ _ __ ___ / /_ | || |
| | | |/ _ \ |_| |_____ / _` | '__| '_ ` _ \| '_ \| || |_
| |_| | __/ _| |_____| (_| | | | | | | | | (_) |__ _|
\__,_|\___|_| |_| \__,_|_| |_| |_| |_|\___/ |_|
Welcome to Armbian-unofficial 24.8.0-trunk Bookworm with Linux 6.6.32-current-arm64No end-user support: built from trunk
System load: 19% Up time: 3 min
Memory usage: 3% of 7.76G IP:
Usage of /: 8% of 53GLast login: Fri Jun 7 01:43:42 HKT 2024 from 192.168.2.103 on pts/0
root@qemu-uboot-arm64:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: enp0s1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
inet6 240e:3b1:3470:df1::1004/128 scope global dynamic noprefixroute
valid_lft 86339sec preferred_lft 86339sec
inet6 240e:3b1:3470:df1:3621:532b:c804:434e/64 scope global temporary dynamic
valid_lft 86339sec preferred_lft 14339sec
inet6 240e:3b1:3470:df1:7299:5b84:d479:26a3/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 86339sec preferred_lft 14339sec
inet6 fe80::1f65:4341:cf28:900e/64 scope link noprefixroute
valid_lft forever preferred_lft forever
root@qemu-uboot-arm64:~# ifconfig enp0s1 192.168.2.90/24
root@qemu-uboot-arm64:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: enp0s1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
inet 192.168.2.90/24 brd 192.168.2.255 scope global enp0s1
valid_lft forever preferred_lft forever
inet6 240e:3b1:3470:df1::1004/128 scope global dynamic noprefixroute
valid_lft 86311sec preferred_lft 86311sec
inet6 240e:3b1:3470:df1:3621:532b:c804:434e/64 scope global temporary dynamic
valid_lft 86311sec preferred_lft 14311sec
inet6 240e:3b1:3470:df1:7299:5b84:d479:26a3/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 86311sec preferred_lft 14311sec
inet6 fe80::1f65:4341:cf28:900e/64 scope link noprefixroute
valid_lft forever preferred_lft forever
用netstat查看服务端口号,都打开了:
root@qemu-uboot-arm64:~# netstat -antp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 576/systemd-resolve
tcp 0 0 192.168.2.90:5357 0.0.0.0:* LISTEN 1196/python3
tcp 0 0 0.0.0.0:5355 0.0.0.0:* LISTEN 576/systemd-resolve
tcp 0 0 127.0.0.54:53 0.0.0.0:* LISTEN 576/systemd-resolve
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 1242/smbd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 818/sshd: /usr/sbin
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1203/nginx: master
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/init
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 1242/smbd
tcp 0 0 127.0.0.1:80 127.0.0.1:59928 TIME_WAIT -
tcp 0 0 127.0.0.1:80 127.0.0.1:55670 TIME_WAIT -
tcp 0 0 192.168.2.90:22 192.168.2.103:38668 ESTABLISHED 1434/sshd: root@pts
tcp6 0 0 fe80::1f65:4341:cf:5357 :::* LISTEN 1196/python3
tcp6 0 0 :::5355 :::* LISTEN 576/systemd-resolve
tcp6 0 0 :::139 :::* LISTEN 1242/smbd
tcp6 0 0 :::22 :::* LISTEN 818/sshd: /usr/sbin
tcp6 0 0 :::80 :::* LISTEN 1203/nginx: master
tcp6 0 0 :::111 :::* LISTEN 1/init
tcp6 0 0 :::445 :::* LISTEN 1242/smbd
root@qemu-uboot-arm64:~#
可以用浏览器打开OMV管理页workbench:
上面的安装过程汇总如下:
安装OMV秘钥: dpkg -i openmediavault-keyring_1.0.2-2_all.deb 添加OMV软件源,用于安装php-pam和salt-minion这两个依赖包: cat <<EOF > /etc/apt/sources.list.d/openmediavault.list deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.tuna.tsinghua.edu/OpenMediaVault/public sandworm main deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.tuna.tsinghua.edu/OpenMediaVault/packages sandworm main ## Uncomment the following line to add software from the proposed repository. # deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.tuna.tsinghua.edu/OpenMediaVault/public sandworm-proposed main # deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.tuna.tsinghua.edu/OpenMediaVault/packages sandworm-proposed main ## This software is not part of OpenMediaVault, but is offered by third-party ## developers as a service to OpenMediaVault users. # deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.tuna.tsinghua.edu/OpenMediaVault/public sandworm partner # deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.tuna.tsinghua.edu/OpenMediaVault/packages sandworm partner EOF 更新软件源: aptitude update 安装openmediavault_7.2.1-1_all.deb的依赖包: aptitude install $(echo `dpkg -I openmediavault_7.2.1-1_all.deb | grep "Depends:"` | sed -E "s/.*://g" | sed -E "s/\([>=. 0-9]+\)//g" | sed -E "s/\|[^,]+,//g" | sed -E "s/\|[^,]+$//g" | sed -E "s/,//g" | sed -E "s/php-pam//g" | sed -E "s/salt-minion//g") php-pam salt-minion 或者: aptitude install $(echo `dpkg -I openmediavault_7.2.1-1_all.deb | grep "Depends:"` | sed -E "s/.*://g" | sed -E "s/\([>=. 0-9]+\)//g" | sed -E "s/\|[^,]+,//g" | sed -E "s/\|[^,]+$//g" | sed -E "s/,//g") 安装openmediavault_7.2.1-1_all.deb: dpkg -i openmediavault_7.2.1-1_all.deb
参考:
一起NAS吧!开源NAS系统Openmediavault 编译与安装过程 - 哔哩哔哩
Installation on Debian — openmediavault 7.x.y documentation
OpenMediaVault | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
本文标签: OpenMediaVault OMV nas
版权声明:本文标题:编译和安装OpenMediaVault(OMV)NAS 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.freenas.com.cn/jishu/1725892104h888372.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论