Skip to content

Instantly share code, notes, and snippets.

View senhan07's full-sized avatar
🎵
NP: 起风了 (Zhou Shen) (1:29/5:23)

SenHan senhan07

🎵
NP: 起风了 (Zhou Shen) (1:29/5:23)
View GitHub Profile
#DOCKER INSTALL
sudo apt-get update
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
@senhan07
senhan07 / zram-install.sh
Created December 6, 2022 09:01
More RAM for Raspberry Pi
#!/bin/bash
#This script enables ZRAM and attempts to optimize its effectiveness on Raspberry Pi computers.
#Useful links:
#https://haydenjames.io/linux-performance-almost-always-add-swap-part2-zram
#https://haydenjames.io/raspberry-pi-performance-add-zram-kernel-parameters/
#https://linuxreviews.org/Zram
#https://linuxize.com/post/how-to-change-the-swappiness-value-in-linux
#original zram script from novaspirit: https://github.com/novaspirit/rpi_zram
:local DHCPtag
:set DHCPtag "#DHCP"
:if ( [ :len $leaseActIP ] <= 0 ) do={ :error "empty lease address" }
:if ( $leaseBound = 1 ) do=\
{
:local ttl
:local domain
:local hostname
docker run -d --name mysql \
--restart=unless-stopped \
-e MYSQL_ROOT_PASSWORD=password \
-v mysql:/var/lib/mysql \
mysql:latest
docker run -d --name zabbix-server-mysql \
--restart=unless-stopped \
-p 10051:10051 \
-e DB_SERVER_HOST="172.17.0.2" \
docker run -d \
--name unifi-video \
--cap-add SYS_ADMIN \
--cap-add DAC_READ_SEARCH \
--security-opt apparmor:unconfined \
-p 10001:10001 \
-p 1935:1935 \
-p 6666:6666 \
-p 7080:7080 \
-p 7442:7442 \