sudo vcgencmd get_camera
If exists:
supported=1 detected=1, libcamera interfaces=0
sudo vcgencmd get_camera
If exists:
supported=1 detected=1, libcamera interfaces=0
Browse the link: Image File Utilities
Download image-utils.zip
cf: https://forums.raspberrypi.com/viewtopic.php?t=84999
Turn off hdmi at bootup.
sudo raspi-config
1. System Options -> S5 Boot -> B1 Console
Click 確定
done.
cf: https://forums.raspberrypi.com/viewtopic.php?t=265516
Edit /etc/dhcpcd.conf:
interface wlan0
#chiao, 2023-5-5
#inform 192.168.1.14
static ip_address=192.168.1.14
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
static domain_search=61.31.1.1
cf: http://linux.how2shout.com/how-to-install-phpmyadmin-on-debian-11-bullseye-apache/
sudo apt -y install php-cgi php-mysqli php-pear php-mbstring libapache2-mod-php php-common php-phpseclib php-mysqlwget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gzudo tar xvf phpMyAdmin-latest-all-languages.tar.gzsudo mv phpMyAdmin-*-all-languages/ /var/www/html/phpmyadmincd /var/www/html
sudo cp phpmyadmin/config.sample.inc.php phpmyadmin/config.inc.phpsudo mkdir /var/www/html/phpmyadmin/tmpopenssl rand -base64 32
(copy the output key)sudo vim /var/www/html/phpmyadmin/config.inc.phpPut the key in Step 6 into:
$cfg[‘blowfish_secret’] = ‘your-key‘; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */And add this line:
$cfg['TempDir'] = '/var/www/html/phpmyadmin/tmp';sudo chown -R www-data:www-data /var/www/html/phpmyadminsudo vim /etc/apache2/conf-available/phpmyadmin.confAdd the followings:
Alias /phpmyadmin /var/www/html/phpmyadmin
<Directory /var/www/html/phpmyadmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
<RequireAny>
Require all granted
</RequireAny>
</IfModule>
</Directory>
<Directory /var/www/html/phpmyadmin/setup/>
<IfModule mod_authz_core.c>
<RequireAny>
Require all granted
</RequireAny>
</IfModule>
</Directory>sudo a2enconf phpmyadmin.confsudo systemctl restart apache2
cf: https://pimylifeup.com/raspberry-pi-ssl-lets-encrypt/
Some settings about firewall:
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/kpchiao9600k.sino.tw/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/kpchiao9600k.sino.tw/privkey.pem
Your cert will expire on 2023-05-29. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew *all* of
your certificates, run "certbot renew"
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
Run this to update certificaion:
sudo certbot certonly --standalone -d example.com -d www.example.com
cf: https://coldnew.github.io/ff159f7c/
The script file: (cf: https://github.com/AlexanderAmelkin/mountimg/blob/master/mountimg)
#!/bin/bash
IMAGE="$1"
PART="$2"
WHERE="$3"
shift 3
OPTIONS="$*"
if [ ! -f "$IMAGE" ] || [ -z "$PART" ] || [ -z "$WHERE" ]; then
echo "Disk image partition mounter by Alexander Amelkin."
echo "Version 1.0"
echo
echo "Usage: mountimg <image> <partition> <where> [<mount options>]"
echo "Example: mountimg sdcard.img 1 /mnt/sdcard0p1 -t vfat -o ro,codepage=866,iocharset=utf-8"
exit 1
fi
# Now find the first unused loop device and use it
OFFSET=$(
sfdisk -l $IMAGE |
grep $IMAGE$PART |
awk 'BEGIN { FS="[ *\t]+"}
/.+/ { print $2; found=1 }
END { if(!found) exit 1 }'
) || { echo "No such partition in the image"; exit 1; }
echo "Mounting $IMAGE partition $PART (offset $OFFSET) to $WHERE via $LODEV"
set -e
mount $OPTIONS -o loop,offset=$((OFFSET * 512)) $IMAGE $WHERE
cf: https://superuser.com/questions/1429490/unmanaged-network-manager-in-ubuntu
This works for my ubuntu 20.04.3 at pi4.
As root, edit /etc/NetworkManager/NetworkManager.conf to match the following. You can use the command sudo nano /etc/NetworkManager/NetworkManager.conf to do so.
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=true
[keyfile]
unmanaged-devices=*,except:type:wifi,except:type:gsm,except:type:cdma,except:type:wwan,except:type:ethernet,except:type:vlan
[device]
wifi.scan-rand-mac-address=no