Difference between revisions of "APITestPage"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
 
(74 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Getting Started with OpenMediaVault/zh|查看中文]]
+
{| class="wikitable"
==OpenMediaVault version==
+
|-
* OS: Debian 12<br />
+
! CPU
* OpenMediaVault: 7.0.5-1 (Sandworm)<br />
+
! DTS
* Docker: 26.0.1<br />
+
|-
* Others: built-in OMV-Extras<br />
+
| NanoPC-T2
==Earlier version OpenMediaVault==
+
| s5p4418-nanopi2-rev01.dts
[[Getting Started with OpenMediaVault6|OpenMediaVault6]]
+
|-
==First Look==
+
| NanoPi-S2
[[File:Openmediavault7.png|600px]]
+
| s5p4418-nanopi2-rev02.dts
==Supported platforms==
+
|-
* RK3328<br />
+
| Smart4418
* RK3399<br />
+
| s5p4418-nanopi2-rev03.dts
* RK3568<br />
+
|-
* RK3588<br />
+
| NanoPi2-Fire
==Find IP Address==
+
| s5p4418-nanopi2-rev04.dts
Since the hostname is set by default to the model of the development board, you can use the "ping" command to obtain the IP address. For example, for CM3588, you can use the following command:
+
|-
<syntaxhighlight lang="bash">
+
| NanoPi-M2A
ping CM3588
+
| s5p4418-nanopi2-rev07.dts
</syntaxhighlight>
+
|-
==Access the OpenMediaVault web page==
+
| Smart4418SDK
Enter the IP address of the development board in your web browser; the default login account for the web interface is:
+
| s5p4418-nanopi2-rev103.dts
<syntaxhighlight lang="bash">
+
|-
Username: admin
+
| SOM-4418
Password: openmediavault
+
| s5p4418-nanopi2-rev11.dts
</syntaxhighlight>
+
|-
==Change admin password==
+
| NanoPC-T3
Click on the profile icon in the upper-right corner of the web page, then select '''"Change Password"'''.
+
| s5p6818-nanopi3-rev01.dts
==Configure the web page timeout duration==
+
|-
Go to '''System -> Workbench''' and adjust the '''"Auto Logout"''' time setting.
+
| NanoPi-M3B
==Root Login via SSH==
+
| s5p6818-nanopi3-rev02.dts
<syntaxhighlight lang="bash">
+
|-
ssh pi@YourIPAddress
+
| Smart6818
</syntaxhighlight>
+
| s5p6818-nanopi3-rev03.dts
The default password is '''"pi"'''.
+
|-
==Create the root user==
+
| NanoPi-Fire3
Create the root user and add user to the root and ssh groups:
+
| s5p6818-nanopi3-rev05.dts
<syntaxhighlight lang="bash">
+
|-
sudo passwd root
+
| NanoPi-M3
sudo gpasswd -a root root
+
| s5p6818-nanopi3-rev07.dts
sudo gpasswd -a root _ssh
+
|-
</syntaxhighlight>
+
| NanoPC-T4
You can now use the root user to log in via SSH:
+
| rk3399-nanopi4-rev00.dts
<syntaxhighlight lang="bash">
+
|-
ssh root@IPAddress
+
| NanoPi-M4
</syntaxhighlight>
+
| rk3399-nanopi4-rev01.dts
==Set up your drives and shared folders==
+
|-
Note: If the hard drive has already been initialized and RAID has been preserved, you can proceed directly to step four for mounting.<br /><br />
+
| NanoPi-NEO4
The difference between the following two Raid Profiles:
+
| rk3399-nanopi4-rev04.dts
* MD RAID: has better performance, because it does a better job of parallelizing writes and striping reads.<br />
+
|-
* Btrfs RAID: has better data safety, because the checksumming lets it ID which copy of a block is wrong when only one is wrong, and means it can tell if both copies are bad.<br />
+
| SOM-RK3399
More content please refre: [https://docs.openmediavault.org/en/latest/administration/storage/raid.html]
+
| rk3399-nanopi4-rev06.dts
====Step 1: Wipe drives====
+
|-
Go to '''Storage -> Disks''', choose your storage device, and click the "Wipe" icon to initiate disk erasure (please ensure your data is backed up). Typically, you can opt for a "Quick" erase option.<br />
+
| SOM-RK3399v2
If wiping isn't effective, you should first remove the shared folder and unmount it.
+
| rk3399-nanopi4-rev07.dts
===Optional 1: Set up your drives with MD RAID===
+
|-
* Configure your RAID
+
| NanoPi-R4S
(Note: OMV does not support RAID for USB-connected devices)<br />
+
| rk3399-nanopi4-rev09.dts
Go to '''Storage -> Multiple Device''', click the '''"+"''' icon, select the desired RAID level, and apply the settings.
+
|-
* Setup file systems
+
| NanoPi-R4S
Go to '''Storage" -> "File Systems''', click on the '''"+"''' icon, and for the type, it's recommended to choose "BTRFS", Select "Single" and devices. <br />
+
| rk3399-nanopi4-rev0a.dts
If you created a RAID in the previous step, select a device starting with "/dev/md". If it's a USB hard drive, choose "/dev/sda".<br />
+
|-
After formatting is complete, OpenMediaVault will prompt you to select the file system to mount.
+
| NanoPi-R4SE
===Optional 2: Set up your drives with Btrfs RAID===
+
| rk3399-nanopi4-rev0b.dts
(Note: OMV does not support RAID for USB-connected devices)<br />
+
|-
Go to '''Storage -> File Systems''' click the '''"+"''' icon, choose the '''"BTRFS"''', choose the RAID level, select your disks, and then save the settings.<br />
+
| NanoPi-M4v2
After formatting is complete, openmediavault will let you choose which file system to mount, it doesn't list all the disks, so you should choose a drive that starts with /dev/nvme.
+
| rk3399-nanopi4-rev21.dts
===Final Step: Create shared folders===
+
|-
Go to '''Storage -> Shared Folders''', click the '''"+"''' icon to create two folders named "nfs" and "samba." We will use these folders for testing NFS and Samba sharing in the following steps.<br />
+
| NanoPi-M4B
(Note: If there were previously created shared folders on the drive, you can recreate them with the same names, and the data will be preserved.)
+
| rk3399-nanopi4-rev22.dts
==Create NAS users==
+
|-
Debian system users or Linux users created via the command line may lack certain permissions required for services like Samba and NFS. Therefore, it is recommended to use the OpenMediaVault interface to create a user specifically for accessing Samba and NFS shares. Here, I will create a user and group named "nasuser":<br />
+
| NanoPi-R2S
<br />
+
| rk3328-nanopi-r2-rev00.dts
Go to '''Users -> Groups''' and then click the '''"+"''' icon to create a user group named "nasuser".<br />
+
|-
Go to '''Users -> "Users''' then click the '''"+"''' icon to create a user named "nasuser", change user's shell to "/usr/sbin/nologin", and select the "nasuser" and "users" groups.
+
| NanoPi-NEO3
==Create a Samba share==
+
| rk3328-nanopi-r2-rev02.dts
Go to '''Services -> SMB/CIFS -> Settings''', check the box at the top for "Enabled," select "SMB1" as the minimum protocol version, and then click "Save"<br />
+
|-
<br />
+
| NanoPi-R2C
Go to '''Services -> SMB/CIFS -> Shares''', click the '''"+"''' button, and in the "Shared folder" field, select the folder you want to share. as an example, here i select the "samba" folder<br />
+
| rk3328-nanopi-r2-rev06.dts
<br />
+
|-
Testing: <br />
+
| NanoPi-R2C-Plus
On a Mac system, right-click Finder, select '''"Connect to Server"''', and enter "smb://YourIPAddress" (replace with the actual IP address). An authentication dialog will appear; enter the username "nasuser" and the password to access the share.
+
| rk3328-nanopi-r2-rev22.dts
==Create an NFS share==
+
|-
Go to '''Services -> NFS -> Settings''', check the box at the top for "Enabled", and in the "Versions" section, select all versions, including "NFSv2", then click "Save" and apply the settings.<br />
+
| NanoPi-R2S-Plus
<br />
+
| rk3328-nanopi-r2-rev24.dts
Go to '''Services -> NFS -> Shares''', click the '''"+"''' button, and in the "Shared folder" field, select the folder you want to share. here i select the "nfs" folder. In the "Client" section, enter the IP range or specific IPs that are allowed to access the share (e.g., 192.168.1.0/24). Set the permissions to "Read/Write", in the "Extra Options" field, Input:
+
|-
<syntaxhighlight lang="bash">
+
| Core3328
rw,async,insecure,no_subtree_check,all_squash,anonuid=0,anongid=0
+
| rk3328-nanopi-r2-rev25.dts
</syntaxhighlight>
+
|-
Then click "Save" and apply the settings.
+
| NanoPi-R5S
===Testing NFS mounting on a Mac===
+
| rk3568-nanopi5-rev01.dts
Viewing OpenMediaVault's NFS Share Information via Command Line:
+
|-
<syntaxhighlight lang="bash">
+
| NanoPi-R5S-LTS
# showmount -e YourIPAddress
+
| rk3568-nanopi5-rev05.dts
Exports list on YourIPAddress:
+
|-
/export                             192.168.1.0/24
+
| NanoPi-R5C
/export/nfs                         192.168.1.0/24
+
| rk3568-nanopi5-rev02.dts
</syntaxhighlight>
+
|-
Right-click Finder on your Mac, select "Connect to Server," and input the following in the address bar:
+
| NanoPi-R5C
<syntaxhighlight lang="bash">
+
| rk3568-nanopi5-rev03.dts
nfs://YourIPAddress/export/nfs
+
|-
</syntaxhighlight>
+
| NanoPi-R5C
===Testing NFS mounting on Linux===
+
| rk3568-nanopi5-rev04.dts
Installing the NFS client
+
|-
<syntaxhighlight lang="bash">
+
| CM3568
sudo apt install nfs-common
+
| rk3568-nanopi5-rev06.dts
</syntaxhighlight>
+
|-
Start to mount:
+
| NanoPC-T6
<syntaxhighlight lang="bash">
+
| rk3588-nanopi6-rev01.dts
sudo mount -t nfs YourIPAddress:/export/nfs /mnt/nfs
+
|-
</syntaxhighlight>
+
| NanoPi-R6S
Checking the Status
+
| rk3588-nanopi6-rev02.dts
<syntaxhighlight lang="bash">
+
|-
# df -h | grep nfs
+
| NanoPi-R6S
YourIPAddress:/export/nfs  7.3G  3.5M  6.8G    1% /mnt/nfs
+
| rk3588-nanopi6-rev03.dts
</syntaxhighlight>
+
|-
To configure automatic mounting at boot time, append the following line to the /etc/fstab file:
+
| NanoPi-R6C
<syntaxhighlight lang="bash">
+
| rk3588-nanopi6-rev04.dts
YourIPAddress:/export/nfs /mnt/nfs nfs defaults 0 0
+
|-
</syntaxhighlight>
+
| NanoPi-R6C
==Transferring Docker Data to a Hard Drive==
+
| rk3588-nanopi6-rev05.dts
Go to '''Storage -> Shared Folders''', and click the '''"+"''' icon to create three folders, namely:
+
|-
<syntaxhighlight lang="bash">
+
| NanoPC-T6-LTS
docker            -> The Docker data directory, defined in /etc/docker/daemon.json
+
| rk3588-nanopi6-rev07.dts
docker-compose    -> Location of compose files
+
|-
docker-data      -> Location of persistent container data
+
| CM3588
docker-app        -> For personal use, storing Dockerfiles and data
+
| rk3588-nanopi6-rev09.dts
</syntaxhighlight>
+
|-
Go to '''Services -> Compose''' enter the '''"Settings"''' interface, and configure the "Shared folder" for "Compose Files" and "Data":<br />
+
| NanoPi-M6
Access the SSH terminal and execute the following command to move Docker data to the shared folder, where "/srv/dev-disk-by-uuid-XXYYZZ/docker" represents the absolute path of the shared folder, which can be obtained from the "Storage" -> "Shared Folders" list on the web interface:
+
| rk3588-nanopi6-rev0a.dts
<syntaxhighlight lang="bash">
+
|-
su root
+
| CM3588-Plus
systemctl stop docker.socket docker.service
+
| rk3588-nanopi6-rev06.dts
mv /var/lib/docker/* /srv/dev-disk-by-uuid-XXYYZZ/docker/
+
|-
</syntaxhighlight>
+
| NanoPi-R3S
On the web interface, set the '''"Docker storage"''' to the absolute path of the "docker" shared folder. save the settings and apply, and then reboot the system.<br />
+
| rk3566-nanopi-r3-rev01.dts
Summaries:<br />
+
|-
'''Compose Files's Shared folder -> on /dev/md0, docker-compose'''<br />
+
| NanoPi-R3S-LTS
'''Data's Shared folder -> on /dev/md0, docker-data'''<br />
+
| rk3566-nanopi-r3-rev02.dts
'''Docker's Docker storage-> on /srv/dev-disk-by-uuid-XXYYZZ/docker/'''<br />
+
|-
==Install Nextcloud with Docker==
+
| NanoPi-Zero2
Run the following command in the terminal:
+
| rk3528-nanopi-rev01.dts
<syntaxhighlight lang="bash">
+
|}
su root
+
cd $(readlink -f /srv/dev-disk-by-uuid-*/docker-app)
+
mkdir nextcloud
+
cd nextcloud
+
mkdir data
+
 
+
docker run -d -p 8888:80  --name nextcloud \
+
    -v $PWD/data:/var/www/html --restart=always \
+
    --privileged=true  arm64v8/nextcloud
+
</syntaxhighlight>
+
you can access the Nextcloud web interface by opening a web browser and navigating to http://YourIPAddress:8888/ (replace YourIPAddress with the actual IP address of your device).  
+
==Install Filebrowser with Docker==
+
Run the following command in the terminal:
+
<syntaxhighlight lang="bash">
+
su root
+
cd $(readlink -f /srv/dev-disk-by-uuid-*/docker-app)
+
mkdir filebrowser
+
cd filebrowser
+
 
+
docker run -d -v $(readlink -f /srv/dev-disk-by-uuid-*):/srv \
+
    -v $PWD/filebrowserconfig.json:/etc/config.json \
+
    -v $PWD/database.db:/etc/database.db -p 8080:80 \
+
    --restart=always --name filebrowser \
+
    filebrowser/filebrowser
+
</syntaxhighlight>
+
 
+
After completing the setup, you can access the Filebrowser web interface by opening a web browser and navigating to http://YourIPAddress:8080/ (replace YourIPAddress with the actual IP address of your device). The default username and password for Filebrowser are both "admin".  
+
==Install Jellyfin with Docker==
+
Go to '''Storage -> Shared Folders''',  click the '''"+"''' icon to create a "media" folder for storing multimedia resources. Then, in the command-line terminal, you can run the following command to install Jellyfin:
+
<syntaxhighlight lang="bash">
+
su root
+
cd $(readlink -f /srv/dev-disk-by-uuid-*/docker-app)
+
mkdir jellyfin
+
cd jellyfin
+
mkdir config cache
+
 
+
docker run -d --name jellyfin \
+
-v $PWD/config:/config \
+
-v $PWD/cache:/cache \
+
-v $(readlink -f /srv/dev-disk-by-uuid-*/media):/media \
+
-p 8096:8096 \
+
--restart=always \
+
jellyfin/jellyfin
+
</syntaxhighlight>
+
After completing the setup, you can access the Jellyfin web interface by opening a web browser and navigating to http://YourIPAddress:8096/ (replace YourIPAddress with the actual IP address of your device). This will allow you to access and manage your media content using Jellyfin.
+
==Install Portainer with Docker==
+
Run the following command in the terminal:
+
<syntaxhighlight lang="bash">
+
su root
+
cd $(readlink -f /srv/dev-disk-by-uuid-*/docker-app)
+
mkdir portainer
+
cd portainer
+
mkdir data
+
 
+
docker run -d \
+
  --name portainer \
+
  --restart=always \
+
  -e TZ=Asia/Shanghai \
+
  -p 8000:8000 \
+
  -p 9000:9000 \
+
  -v /var/run/docker.sock:/var/run/docker.sock \
+
  -v $PWD/data:/data \
+
  portainer/portainer-ce:latest
+
</syntaxhighlight>
+
After completing the setup, you can access the Portainer web interface by opening a web browser and navigating to http://YourIPAddress:9000/ (replace YourIPAddress with the actual IP address of your device). The default administrator account username and password are both "admin".
+

Latest revision as of 09:18, 5 December 2024

CPU DTS
NanoPC-T2 s5p4418-nanopi2-rev01.dts
NanoPi-S2 s5p4418-nanopi2-rev02.dts
Smart4418 s5p4418-nanopi2-rev03.dts
NanoPi2-Fire s5p4418-nanopi2-rev04.dts
NanoPi-M2A s5p4418-nanopi2-rev07.dts
Smart4418SDK s5p4418-nanopi2-rev103.dts
SOM-4418 s5p4418-nanopi2-rev11.dts
NanoPC-T3 s5p6818-nanopi3-rev01.dts
NanoPi-M3B s5p6818-nanopi3-rev02.dts
Smart6818 s5p6818-nanopi3-rev03.dts
NanoPi-Fire3 s5p6818-nanopi3-rev05.dts
NanoPi-M3 s5p6818-nanopi3-rev07.dts
NanoPC-T4 rk3399-nanopi4-rev00.dts
NanoPi-M4 rk3399-nanopi4-rev01.dts
NanoPi-NEO4 rk3399-nanopi4-rev04.dts
SOM-RK3399 rk3399-nanopi4-rev06.dts
SOM-RK3399v2 rk3399-nanopi4-rev07.dts
NanoPi-R4S rk3399-nanopi4-rev09.dts
NanoPi-R4S rk3399-nanopi4-rev0a.dts
NanoPi-R4SE rk3399-nanopi4-rev0b.dts
NanoPi-M4v2 rk3399-nanopi4-rev21.dts
NanoPi-M4B rk3399-nanopi4-rev22.dts
NanoPi-R2S rk3328-nanopi-r2-rev00.dts
NanoPi-NEO3 rk3328-nanopi-r2-rev02.dts
NanoPi-R2C rk3328-nanopi-r2-rev06.dts
NanoPi-R2C-Plus rk3328-nanopi-r2-rev22.dts
NanoPi-R2S-Plus rk3328-nanopi-r2-rev24.dts
Core3328 rk3328-nanopi-r2-rev25.dts
NanoPi-R5S rk3568-nanopi5-rev01.dts
NanoPi-R5S-LTS rk3568-nanopi5-rev05.dts
NanoPi-R5C rk3568-nanopi5-rev02.dts
NanoPi-R5C rk3568-nanopi5-rev03.dts
NanoPi-R5C rk3568-nanopi5-rev04.dts
CM3568 rk3568-nanopi5-rev06.dts
NanoPC-T6 rk3588-nanopi6-rev01.dts
NanoPi-R6S rk3588-nanopi6-rev02.dts
NanoPi-R6S rk3588-nanopi6-rev03.dts
NanoPi-R6C rk3588-nanopi6-rev04.dts
NanoPi-R6C rk3588-nanopi6-rev05.dts
NanoPC-T6-LTS rk3588-nanopi6-rev07.dts
CM3588 rk3588-nanopi6-rev09.dts
NanoPi-M6 rk3588-nanopi6-rev0a.dts
CM3588-Plus rk3588-nanopi6-rev06.dts
NanoPi-R3S rk3566-nanopi-r3-rev01.dts
NanoPi-R3S-LTS rk3566-nanopi-r3-rev02.dts
NanoPi-Zero2 rk3528-nanopi-rev01.dts