308 lines
12 KiB
Markdown
308 lines
12 KiB
Markdown
---
|
|
created: 2024-11-05T23:51:40.000Z
|
|
type: note
|
|
updated: 2024-11-11T19:25:23.422Z
|
|
---
|
|
|
|
# Trigkey Proxmox
|
|
|
|
## Post-PVE
|
|
|
|
```bash Mon Jun 17 2024 09:04:47 GMT-0700 (Mountain Standard Time)
|
|
# https://www.youtube.com/watch?v=kcpu4z5eSEU&t=225s
|
|
# https://tteck.github.io/Proxmox/
|
|
# https://github.com/tteck/Proxmox
|
|
bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-pve-install.sh)"
|
|
uname -r
|
|
bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/kernel-clean.sh)"
|
|
```
|
|
|
|
```bash Mon Nov 04 2024 16:03:02 GMT-0700 (Mountain Standard Time)
|
|
lsb_release -a
|
|
apt-get install links unzip net-tools ufw nginx git nano ncdu -y
|
|
ncdu
|
|
```
|
|
|
|
## Arch DMS
|
|
|
|
- [arc-releases](https://github.com/AuxXxilium/arc/releases)
|
|
- [youtube](https://www.youtube.com/watch?v=e-ZyoHe5wGk&t=304s)
|
|
|
|
```bash Mon Oct 28 2024 14:07:50 GMT-0700 (Mountain Standard Time)
|
|
qm disk import 201 /var/lib/vz/template/iso/arc.img local-lvm
|
|
# ls -l /dev/disk/by-id
|
|
# qm set 201 -sata1 /dev/disk/by-id/*your disk ID*
|
|
```
|
|
|
|
- Any release
|
|
- User boot loader to update
|
|
- write-back for both drives
|
|
|
|
```bash Mon Oct 28 2024 21:46:57 GMT-0700 (Mountain Standard Time)
|
|
# https://blog.aaronlenoir.com/2018/05/06/ssh-into-synology-nas-with-ssh-key/
|
|
# sudo vim /etc/ssh/sshd_config
|
|
#RSAAuthentication yes
|
|
#PubkeyAuthentication yes
|
|
# sudo synoservicectl --reload sshd
|
|
```
|
|
|
|
- [how-to-install-nano-on-synology-nas](https://andyyang.co.uk/how-to-install-nano-on-synology-nas/)
|
|
- [ssh-into-synology-nas-with-ssh-key](https://blog.aaronlenoir.com/2018/05/06/ssh-into-synology-nas-with-ssh-key/)
|
|
|
|
```bash Tue Oct 29 2024 07:38:54 GMT-0700 (Mountain Standard Time)
|
|
lvs
|
|
lvextend -l +100%FREE pve/root
|
|
resize2fs /dev/mapper/pve-root
|
|
lvchange -ay /dev/pve/root
|
|
```
|
|
|
|
```bash Tue Oct 29 2024 10:20:05 GMT-0700 (Mountain Standard Time)
|
|
apt-get install ssh-import-id
|
|
ssh-import-id gh:mikepharesjr
|
|
service ssh restart
|
|
nano ~/.ssh/authorized_keys
|
|
service ssh restart
|
|
ssh root@free.file.sync.media -i C:/Users/phares/.ssh/id_ed25519
|
|
```
|
|
|
|
## Linux (Proxmox) backup of the following
|
|
|
|
```bash Tue Oct 29 2024 10:43:09 GMT-0700 (Mountain Standard Time)
|
|
"D:\1-Images-A\Images-304b5e2a"
|
|
"D:\3-Videos-A\Device-Videos-2_0_0_3-Current-Year"
|
|
"D:\4-Videos-B"
|
|
```
|
|
|
|
```conf Tue Oct 29 2024 12:13:44 GMT-0700 (Mountain Standard Time)
|
|
D:\6-Other-Large-Z\Images-current-Results
|
|
\System Volume Information\
|
|
\$Recycle.Bin\
|
|
\RECYCLE?\
|
|
\Recovery\
|
|
*\thumbs.db
|
|
*\.git\*
|
|
*\*.mount
|
|
*\*.db
|
|
*\Parsing-Packets-Physical-Address\
|
|
*\C)Resize\
|
|
*\C2)BlurHasher\
|
|
*\D2)FaceParts\
|
|
*\Z)lnk-url - Collage\
|
|
*\Z)lnk-url - Corrupt\
|
|
*\Z)lnk-url - Indecent\
|
|
```
|
|
|
|
```log Tue Oct 29 2024 12:18:28 GMT-0700 (Mountain Standard Time)
|
|
root@pve-phares:~# cd /home/free-file-sync/
|
|
1-Images-A/ 3-Videos-A/ 4-Videos-B/ 6-Other-Large-Z/ ffs_gui/ kanban/ kee-pass/ notes/ proxmox/
|
|
```
|
|
|
|
- [Access Proxmox VMA Backup Files and Partitions on Windows](https://www.youtube.com/watch?v=AGllcgOKZDE)
|
|
- [linux-reader](https://www.diskinternals.com/linux-reader/)
|
|
|
|
## Podman Quadlet Rootless Example
|
|
|
|
```bash Mon Nov 04 2024 16:03:02 GMT-0700 (Mountain Standard Time)
|
|
apt-get install podman -y
|
|
apt-cache rdepends podman-compose
|
|
apt-get install podman-compose -y
|
|
apt-get install sudo
|
|
# apt-get remove podman-compose -y
|
|
# apt-get purge podman-compose -y
|
|
adduser podman
|
|
mkdir /home/podman/.ssh
|
|
cp /root/.ssh/authorized_keys /home/podman/.ssh/authorized_keys
|
|
chown podman:podman -R /home/podman
|
|
adduser podman sudo
|
|
loginctl enable-linger
|
|
sudo -iu podman
|
|
# 2.
|
|
podman --version
|
|
# podman version 4.3.1
|
|
# https://www.redhat.com/sysadmin/quadlet-podman
|
|
cd ~/
|
|
mkdir -p .config/containers/systemd/
|
|
# nano .config/containers/systemd/mysleep.container
|
|
```
|
|
|
|
```bash Mon Nov 04 2024 16:03:02 GMT-0700 (Mountain Standard Time)
|
|
# cp -R /run/user/0/ /run/user/1000/
|
|
mkdir -p /run/user/1000/
|
|
chown -R podman:podman /run/user/1000/
|
|
sudo -iu podman
|
|
cd ~/
|
|
mkdir -p ~/.bashrc.d
|
|
echo "export XDG_RUNTIME_DIR=/run/user/$(id -u)" > ~/.bashrc.d/systemd
|
|
source ~/.bashrc.d/systemd
|
|
sudo loginctl enable-linger 1000
|
|
systemctl --user daemon-reload
|
|
podman ps -a --sort names
|
|
# systemctl --user enable --now podman.socket
|
|
# systemctl --user status mysleep.service
|
|
```
|
|
|
|
## Cockpit
|
|
|
|
- [cockpit](https://cockpit-project.org/)
|
|
- [podman](https://192.168.11.2:9090/podman#/?container=all)
|
|
|
|
```bash Mon Nov 04 2024 16:03:02 GMT-0700 (Mountain Standard Time)
|
|
# apt install chkservice -y
|
|
apt-cache rdepends cockpit
|
|
apt install cockpit -y
|
|
# https://192.168.31.12:9090
|
|
# https://blog.while-true-do.io/podman-web-ui-via-cockpit/
|
|
apt-get install cockpit cockpit-podman -y
|
|
systemctl enable --now cockpit.socket
|
|
```
|
|
|
|
## how to run a shell scripts at every login
|
|
|
|
- [how-to-run-a-shell-scripts-at-every-login](https://serverfault.com/questions/782433/how-to-run-a-shell-scripts-at-every-login-in-centos)
|
|
|
|
```bash Mon Nov 04 2024 16:03:02 GMT-0700 (Mountain Standard Time)
|
|
nano ~/.bash_profile
|
|
```
|
|
|
|
```conf
|
|
cd ~/
|
|
mkdir -p ~/.bashrc.d
|
|
echo "export XDG_RUNTIME_DIR=/run/user/$(id -u)" > ~/.bashrc.d/systemd
|
|
source ~/.bashrc.d/systemd
|
|
loginctl enable-linger 1000
|
|
systemctl --user daemon-reload
|
|
podman ps -a --sort names
|
|
```
|
|
|
|
```bash Mon Nov 04 2024 16:03:02 GMT-0700 (Mountain Standard Time)
|
|
podman pull docker.io/louislam/uptime-kuma:1
|
|
systemctl --user daemon-reload
|
|
systemctl --user start uptime-kuma-server
|
|
systemctl --user status uptime-kuma-server
|
|
journalctl -fu uptime-kuma-server.service
|
|
podman logs uptime-kuma-server
|
|
systemctl --user stop uptime-kuma-server
|
|
systemctl --user disable uptime-kuma-server
|
|
podman exec -ti uptime-kuma-server /bin/sh
|
|
podman exec -ti uptime-kuma-server /bin/bash
|
|
```
|
|
|
|
## Log
|
|
|
|
```bash Mon Nov 04 2024 16:03:02 GMT-0700 (Mountain Standard Time)
|
|
ln -s /var/log/nginx /var/www/html/log-nginx
|
|
ls -la /var/www/html
|
|
exit
|
|
```
|
|
|
|
```bash Mon Nov 04 2024 16:03:02 GMT-0700 (Mountain Standard Time)
|
|
cp ~/.bash_history /etc/bash_history_2024-11-04.txt
|
|
cat /etc/bash_history_2024-11-04.txt
|
|
exit
|
|
```
|
|
|
|
## Free File Sync
|
|
|
|
```bash Mon Nov 04 2024 16:03:02 GMT-0700 (Mountain Standard Time)
|
|
ssh root@free.file.sync.media -i C:/Users/phares/.ssh/id_ed25519
|
|
mv /home/free-file-sync/6-Other-Large-Z/Images-current-Results/A\)Property/304b5e2a /home/free-file-sync/6-Other-Large-Z/Images-current-Results/A\)Property/d8013da9
|
|
mv /home/free-file-sync/6-Other-Large-Z/Images-current-Results/A2\)People/304b5e2a /home/free-file-sync/6-Other-Large-Z/Images-current-Results/A2\)People/d8013da9
|
|
mv /home/free-file-sync/6-Other-Large-Z/Images-current-Results/B\)Metadata/304b5e2a /home/free-file-sync/6-Other-Large-Z/Images-current-Results/B\)Metadata/d8013da9
|
|
mv /home/free-file-sync/6-Other-Large-Z/Images-current-Results/C\)Resize/304b5e2a /home/free-file-sync/6-Other-Large-Z/Images-current-Results/C\)Resize/d8013da9
|
|
mv /home/free-file-sync/6-Other-Large-Z/Images-current-Results/C2\)BlurHasher/304b5e2a /home/free-file-sync/6-Other-Large-Z/Images-current-Results/C2\)BlurHasher/d8013da9
|
|
mv /home/free-file-sync/6-Other-Large-Z/Images-current-Results/D\)Face/304b5e2a /home/free-file-sync/6-Other-Large-Z/Images-current-Results/D\)Face/d8013da9
|
|
mv /home/free-file-sync/6-Other-Large-Z/Images-current-Results/D2\)FaceParts/304b5e2a /home/free-file-sync/6-Other-Large-Z/Images-current-Results/D2\)FaceParts/d8013da9
|
|
mv /home/free-file-sync/6-Other-Large-Z/Images-current-Results/E\)Distance/304b5e2a /home/free-file-sync/6-Other-Large-Z/Images-current-Results/E\)Distance/d8013da9
|
|
mv /home/free-file-sync/6-Other-Large-Z/Images-current-Results/F\)Immich/304b5e2a /home/free-file-sync/6-Other-Large-Z/Images-current-Results/F\)Immich/d8013da9
|
|
mv /home/free-file-sync/6-Other-Large-Z/Images-current-Results/F\)PhotoPrism/304b5e2a /home/free-file-sync/6-Other-Large-Z/Images-current-Results/F\)PhotoPrism/d8013da9
|
|
mv /home/free-file-sync/6-Other-Large-Z/Images-current-Results/F\)Random/304b5e2a /home/free-file-sync/6-Other-Large-Z/Images-current-Results/F\)Random/d8013da9
|
|
rm -R /home/free-file-sync/3-Videos-A
|
|
```
|
|
|
|
## Acme
|
|
|
|
```bash Mon Nov 04 2024 16:03:02 GMT-0700 (Mountain Standard Time)
|
|
cd /etc/
|
|
mkdir /etc/duckdns
|
|
cd /etc/duckdns
|
|
nano duck.sh
|
|
```
|
|
|
|
```conf
|
|
echo url="https://www.duckdns.org/update?domains=pve-phares&token=1d3fc707-7052-4459-a624-fb01250f00b9&verbose=true&ip=" | curl -k -o /etc/duckdns/duck.log -K -
|
|
```
|
|
|
|
```bash Mon Nov 04 2024 16:03:02 GMT-0700 (Mountain Standard Time)
|
|
chmod 700 duck.sh
|
|
./duck.sh
|
|
cat duck.log
|
|
```
|
|
|
|
```bash Mon Nov 04 2024 16:03:02 GMT-0700 (Mountain Standard Time)
|
|
# https://www.snbforums.com/threads/duckdns-with-letsencrypt.86114/
|
|
cd /tmp
|
|
git clone https://github.com/acmesh-official/acme.sh.git
|
|
cd /tmp/acme.sh
|
|
./acme.sh --install -m mikepharesjr@msn.com
|
|
export DuckDNS_Token=1d3fc707-7052-4459-a624-fb01250f00b9
|
|
echo $DuckDNS_Token
|
|
./acme.sh --register-account -m mikepharesjr@msn.com
|
|
./acme.sh --set-default-ca --server letsencrypt
|
|
# https://intodns.com/
|
|
# ./acme.sh --issue --dns dns_duckdns -d '*.bchs.duckdns.org' --debug --home /root/.acme.sh --dnssleep 120 --days 90 --ecc --server https://acme-v02.api.letsencrypt.org/directory
|
|
# mv /root/.acme.sh/\*.bchs.duckdns.org_ecc /root/.acme.sh/bchs.duckdns.org_ecc
|
|
# mv /root/.acme.sh/bchs.duckdns.org_ecc/\*.bchs.duckdns.org.cer /root/.acme.sh/bchs.duckdns.org_ecc/bchs.duckdns.org.cer
|
|
# mv /root/.acme.sh/bchs.duckdns.org_ecc/\*.bchs.duckdns.org.conf /root/.acme.sh/bchs.duckdns.org_ecc/bchs.duckdns.org.conf
|
|
# mv /root/.acme.sh/bchs.duckdns.org_ecc/\*.bchs.duckdns.org.csr /root/.acme.sh/bchs.duckdns.org_ecc/bchs.duckdns.org.csr
|
|
# mv /root/.acme.sh/bchs.duckdns.org_ecc/\*.bchs.duckdns.org.csr.conf /root/.acme.sh/bchs.duckdns.org_ecc/bchs.duckdns.org.csr.conf
|
|
# mv /root/.acme.sh/bchs.duckdns.org_ecc/\*.bchs.duckdns.org.key /root/.acme.sh/bchs.duckdns.org_ecc/bchs.duckdns.org.key
|
|
./acme.sh --issue --dns dns_duckdns -d '*.affirm.duckdns.org' --debug --home /root/.acme.sh --dnssleep 120 --days 90 --ecc --server https://acme-v02.api.letsencrypt.org/directory
|
|
```
|
|
|
|
## ADGuard
|
|
|
|
- [adguard](https://snapcraft.io/adguard-home)
|
|
|
|
```bash Mon Nov 04 2024 16:03:02 GMT-0700 (Mountain Standard Time)
|
|
apt-get install snap -y
|
|
apt-get install snapd -y
|
|
snap install adguard-home
|
|
snap remove adguard-home
|
|
snap install adguard-home
|
|
```
|
|
|
|
## nginx
|
|
|
|
```bash Mon Nov 04 2024 16:03:02 GMT-0700 (Mountain Standard Time)
|
|
# systemctl start nginx
|
|
nginx -t
|
|
nginx -s reload
|
|
tail -f /var/log/nginx/error.log
|
|
```
|
|
|
|
## Immich
|
|
|
|
|
|
```bash Mon Nov 04 2024 22:47:25 GMT-0700 (Mountain Standard Time)
|
|
apt-get install archivemount -y
|
|
# archivemount [archive file] [mount point]
|
|
# mkisofs -o /tmp/cd.iso /tmp/directory/
|
|
# genisoimage vs mkisofs
|
|
mkisofs -o /tmp/'All Pictures from Wedding Originals 2006.iso' /home/free-file-sync/1-Images-A/Images-d8013da9/'All Pictures from Wedding Originals 2006'
|
|
mkisofs -o /tmp/All\ Pictures\ from\ Wedding\ Originals\ 2006\ !9'.iso /home/free-file-sync/1-Images-A/Images-d8013da9/All\ Pictures\ from\ Wedding\ Originals\ 2006\ !9
|
|
mkisofs -o /tmp/Phares\ Slides\ ####.iso /home/free-file-sync/1-Images-A/Images-d8013da9/Phares\ Slides\ ####
|
|
mkisofs -o /tmp/Rex\ Memorial\ ####.iso /home/free-file-sync/1-Images-A/Images-d8013da9/Rex\ Memorial\ ####
|
|
mkisofs -o /tmp/Scanned\ Grandma\'s\ Quilt\ ####.iso /home/free-file-sync/1-Images-A/Images-d8013da9/Scanned\ Grandma\'s\ Quilt\ ####
|
|
mkisofs -o /tmp/Slides\ Pictures.iso /home/free-file-sync/1-Images-A/Images-d8013da9/Slides\ Pictures
|
|
mkdir /mnt/vm-301-disk-1
|
|
mount /dev/pve/vm-301-disk-1 /mnt/vm-301-disk-1
|
|
# umount /mnt/vm-301-disk-1
|
|
mv /tmp/*.iso /mnt/vm-301-disk-1/
|
|
mkdir /mnt/iso-all-pictures-from-wedding-originals-2006
|
|
mount -o loop /mnt/vm-301-disk-1/'All Pictures from Wedding Originals 2006.iso' /mnt/iso-all-pictures-from-wedding-originals-2006
|
|
# umount /mnt/iso-all-pictures-from-wedding-originals-2006
|
|
cd /
|
|
umount /mnt/iso-all-pictures-from-wedding-originals-2006
|
|
umount /mnt/vm-301-disk-1
|
|
```
|