System installation

There are three types to choose from

  1. Desktop and software

  2. The desktop version

  3. The command line version

Install the Pi Dashboard

Pi Dashboard is an open source monitoring tool for IoT devices released by Raspberry Pi LABS.

Currently, the following monitoring projects have been added:

  • Real-time data such as basic CPU information, CPU status, and CPU usage
  • Real-time data used by memory, cache, and SWAP partitions
  • SD card (disk) usage
  • Real-time load data
  • Implementation process data
  • Real-time data for network interfaces
  • Raspberry PI IP, running time, operating system, HOST and other basic information

1. Install dependent software

Sudo apt-get install nginx php7.3-fpm php7.3-cli php7.3-curl php7.3-gd php7.3-cgi-yCopy the code

2. Restart the nginx service

sudo service nginx start
Copy the code

3. Restart the PHP service

Sudo service php7.3 - FPM restartCopy the code

4. Access the directory

cd /var/www/html
Copy the code

5. Download the dashboard. The git

sudo git clone https://github.com/spoonysonny/pi-dashboard.git
Copy the code

6. Grant permission to the folder

sudo chown -R www-data pi-dashboard
Copy the code

7. Modify the nginx configuration

sudo nano /etc/nginx/sites-available/default location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. # try_files $uri $uri/ =404; index index.html index.htm index.php default.html default.htm default.php; } location ~\.php${fastcgi_pass Unix :/run/ PHP /php7.3-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }Copy the code

8. Visit http://ip/pi-dashboard/

Mount the hard disk

Format the hard disk for ext4

sudo mkfs.ext4 /dev/sda
Copy the code

Mount the hard disk

sudo mount /dev/sda1 /home/pi/Dist
Copy the code

Query the UID of the hard disk

sudo blkid
Copy the code

Start mounting

sudo nano /etc/fstab
Copy the code

Fill it in

UUID=xxx  /home/pi/Dist    ext4  defaults,nofail  0  0
Copy the code

# XXX is your own UUID above

Intranet through

I use Zerotier, through P2P point-to-point penetration, can also try NGROK, FRP, etc…

Website: www.zerotier.com/

Go to the official website to register

Install zerotier

curl -s https://install.zerotier.com | sudo bash
Copy the code

join

sudo zerotier-cli join ################
Copy the code

Docker installation

Update package

sudo apt-get update
Copy the code

Download the official installation script

curl -fsSL https://get.docker.com -o get-docker.sh
Copy the code

Execute the script

sudo sh get-docker.sh
Copy the code

Add PI user to docker group, no sudo every time docker is executed

sudo usermod -aG docker pi
Copy the code

This step requires a reboot

Create and edit /etc/docker-daemon. json file to add accelerator and modify default download path

Add a mirror source and change the default storage location

{     
    "registry-mirrors": [""],   
    "data-root": ""
}
Copy the code

Restart the docker

sudo systemctl restart docker.service
Copy the code

Download Docker graphical interface portainer

sudo docker pull portainer/portainer
Copy the code

Create the Portainer container

sudo docker volume create portainer_data
Copy the code

Run the portainer

sudo docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v /home/pi/Dist/portainer/data:/data portainer/portainer
Copy the code

Visit: http://ip:9000, initialization takes some time

Install keyway cloud

docker run -d --name kodexplorer --hostname=kodexplorer -p 5210:5210 -p 5218:5218 -v /home/pi/Dist/kodexplorer:/koddata -v /home/pi/Dist/koddata:/koddata/Group/public/home/ssdDATA --restart always dennischancs/kodexplorer
Copy the code

Visit: http://ip:5210

Install aria2 – pro

docker run -d \    --name aria2-pro \    --restart unless-stopped \    --log-opt max-size=1m \    -e PUID=$UID \    -e PGID=$GID \    -e UMASK_SET=022 \    -e RPC_SECRET=1234 \    -e RPC_PORT=6800 \    -p 6800:6800 \    -e LISTEN_PORT=6888 \    -p 6888:6888 \    -p 6888:6888/udp \    -v /home/pi/Dist/aria2-config:/config \    -v /home/pi/Dist/aria2-downloads:/downloads \    p3terx/aria2-pro
Copy the code