rasberry pi doc

  • Author: Admin
  • Published On: 3/1/2026
  • Category: editor
# ip address raspberry pi myhome:
  + 192.168.0.127
  + [root][sap123ok]
# setting ip address raspberry pi static
  + sudo nano /etc/dhcpcd.conf
  
# install nodejs raspberry
  + apt update -y 
  + curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
# set timezone Asia/Jakarta raspberry
  + sudo timedatectl set-timezone Asia/Jakarta
  
# install docker raspberry bullseye
  + sudo apt update
  + sudo apt upgrade -y
  + sudo apt dist-upgrade -y
  + apt install apt-transport-https ca-certificates curl software-properties-common -y
  + curl -fsSL https://download.docker.com/linux/raspbian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  + echo "deb [arch=armhf signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/raspbian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  + sudo apt update 	
  + sudo apt install docker-ce docker-ce-cli containerd.io -y
# ip address raspberry pi myhome:
  + 192.168.0.127
  + [root][sap123ok]
# setting ip address raspberry pi static
  + sudo nano /etc/dhcpcd.conf
  
# install nodejs raspberry
  + apt update -y 
  + curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
  + apt install nodejs -y
# set timezone Asia/Jakarta raspberry
  + sudo timedatectl set-timezone Asia/Jakarta
  
# install docker raspberry bullseye
  + sudo apt update
  + sudo apt upgrade -y
  + sudo apt dist-upgrade -y
  + apt install apt-transport-https ca-certificates curl software-properties-common -y
  + curl -fsSL https://download.docker.com/linux/raspbian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  + echo "deb [arch=armhf signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/raspbian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  + sudo apt update
  + sudo apt install docker-ce docker-ce-cli containerd.io -y
  
# install docker raspberry trixie
  + my raspi version : Raspbian GNU/Linux 13 (trixie)
  + sudo install -m 0755 -d /etc/apt/keyrings
  + 
  ===================================================================
	  curl -fsSL https://download.docker.com/linux/debian/gpg | \
	  sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
  ===================================================================
  + sudo chmod a+r /etc/apt/keyrings/docker.gpg
  ======================================================================================
		echo \
		"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
		https://download.docker.com/linux/debian bookworm stable" | \
		sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  ======================================================================================
  + sudo apt update
  + sudo apt install docker-ce docker-ce-cli containerd.io
# install nginx
  + apt update
  + apt install nginx -y
# copy file with exlude directory name node_modules use terminal raspberry	
  + rsync -av --exclude=node_modules /root/nurulhuda /root/bak/nurulhuda															
  
# mount disk 
  + lsblk
    output 
     sda
	 └─sda1
  + mkdir /mnt/usb
  + mount /dev/sda1 /mnt/usb
  
# Ubuntu via SSH key-based authentication
  + in windows 
    + Windows (PowerShell / Git Bash)
		+ ssh-keygen -t ed25519 -C "[email protected]"
		+ C:\Users\USERNAME\.ssh\id_ed25519 -> default saved location
		+ cat ~/.ssh/id_ed25519.pub -> Paste key → save to ubuntu server in nano ~/.ssh/authorized_keys
    + test from windows via cmd
		+ ssh -p 222 [email protected]
    + nano ~/.ssh/config -> via Git Bash
		==========================================
		Host ubuntu-ssh
			HostName 192.168.0.39
			User root
			Port 222
			IdentityFile ~/.ssh/id_ed25519
		==========================================
  + in ubuntu server
    + mkdir -p ~/.ssh
	+ nano ~/.ssh/authorized_keys
	+ Paste key → save
	+ Set permission:
	  + chmod 700 ~/.ssh
	  + chmod 600 ~/.ssh/authorized_keys
	  + nano /etc/ssh/sshd_config
	    ======================================
	    PasswordAuthentication no
		PubkeyAuthentication yes
		PermitRootLogin no
		Port 2222
        ======================================
	  + ss -tulpn | grep ssh -> check if you want to change the default port from 22 to 2222, make sure there is no conflict
	  + systemctl restart ssh
	  
# copy file from local to remote ssh windows 
  + scp -r -P 222 -i C:\Users\hakim\.ssh\id_ed25519 nurulhuda [email protected]:/root
# Install Node.js
  + apt update
  + apt install -y ca-certificates curl gnupg
  + curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
  + apt install -y nodejs
  + node -v
  + npm -v
# convert .jpg to .svg 
  + apt install potrace
  + apt install -y python3-pil python3-numpy
  + convetert
    ========================================================================
    from PIL import Image
	import subprocess
	# Step 1: Convert JPG to PBM (black & white)
	img = Image.open("input.jpg").convert("L")  # grayscale
	img = img.point(lambda x: 0 if x < 128 else 255, "1")  # threshold
	img.save("temp.pbm")
	# Step 2: Convert PBM to SVG using potrace
	subprocess.run(["potrace", "temp.pbm", "-s", "-o", "output.svg"])
	print("SVG created: output.svg")
	========================================================================
	
# convert .jpg to .svg 
  + apt install python3-full
  + cd ~/python
  + python3 -m venv venv
  + source venv/bin/activate
  + pip install vtracer
# raspi model check
  + cat /proc/cpuinfo
 	
  • Share On: