315 lines
11 KiB
Markdown
315 lines
11 KiB
Markdown
---
|
|
created: 2024-11-06T02:36:20.000Z
|
|
type: note
|
|
updated: 2024-11-11T20:03:53.719Z
|
|
---
|
|
|
|
# Beelink Proxmox Media
|
|
|
|
```bash Tue Nov 05 2024 16:52:59 GMT-0700 (Mountain Standard Time)
|
|
ssh root@free.file.sync.media -i C:/Users/phares/.ssh/id_ed25519
|
|
```
|
|
|
|
## Post-PVE
|
|
|
|
```bash Tue Nov 05 2024 16:52:59 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 Tue Nov 05 2024 17:06:10 GMT-0700 (Mountain Standard Time)
|
|
lsb_release -a
|
|
apt-get install links unzip nginx git nano git ncdu -y
|
|
cd /home
|
|
ncdu
|
|
```
|
|
|
|
## Cockpit
|
|
|
|
- [cockpit](https://cockpit-project.org/)
|
|
- [podman](https://192.168.11.2:9090/podman#/?container=all)
|
|
|
|
```bash Tue Nov 05 2024 17:07:40 GMT-0700 (Mountain Standard Time)
|
|
# apt install chkservice -y
|
|
apt-cache rdepends cockpit
|
|
apt install cockpit -y
|
|
# https://192.168.31.12:3000
|
|
# https://blog.while-true-do.io/podman-web-ui-via-cockpit/
|
|
apt-get install cockpit cockpit-podman -y
|
|
systemctl enable --now cockpit.socket
|
|
adduser podman
|
|
adduser podman sudo
|
|
```
|
|
|
|
## ADGuard
|
|
|
|
- [adguard](https://snapcraft.io/adguard-home)
|
|
|
|
```bash Tue Nov 05 2024 17:09:42 GMT-0700 (Mountain Standard Time)
|
|
apt-get install snapd -y
|
|
snap install adguard-home
|
|
reboot
|
|
lsof -i -P -n | grep LISTEN
|
|
```
|
|
|
|
```conf
|
|
192.168.0.11 adguard.phares.duckdns.org # 3002
|
|
192.168.0.11 baikal.phares.duckdns.org # 8013
|
|
192.168.0.11 free.file.sync.root # 22
|
|
192.168.0.11 gitea.phares.duckdns.org # 3000
|
|
192.168.0.11 immich.phares.duckdns.org # 2283
|
|
192.168.0.11 mattermost.phares.duckdns.org # 8443
|
|
192.168.0.11 neko.phares.duckdns.org # 8082
|
|
192.168.0.11 quartz.phares.duckdns.org # /
|
|
192.168.0.11 slideshow.phares.duckdns.org # /
|
|
192.168.0.11 vaultwarden.phares.duckdns.org # 3000
|
|
192.168.0.21 free.file.sync.k0308 # 22
|
|
192.168.0.42 free.file.sync.room # 22
|
|
192.168.0.43 adguard.bchs.duckdns.org # 45158
|
|
192.168.0.43 baikal.bchs.duckdns.org # 8013
|
|
192.168.0.43 filebrowser.bchs.duckdns.org
|
|
192.168.0.43 firefly.bchs.duckdns.org
|
|
192.168.0.43 free.file.sync.loft # 22
|
|
192.168.0.43 free.file.sync.loft # 22
|
|
192.168.0.43 glances.bchs.duckdns.org # 8086
|
|
192.168.0.43 grocy.bchs.duckdns.org
|
|
192.168.0.43 ha.bchs.duckdns.org # 8124
|
|
192.168.0.43 immich.bchs.duckdns.org # 8181
|
|
192.168.0.43 kuma.bchs.duckdns.org # 3001
|
|
192.168.0.43 nextcloud.bchs.duckdns.org
|
|
192.168.0.43 nginx.bchs.duckdns.org # 81
|
|
192.168.0.43 papermerge.bchs.duckdns.org # 8000
|
|
192.168.0.43 photoprism.bchs.duckdns.org # 2342
|
|
192.168.0.43 piwigo.bchs.duckdns.org
|
|
192.168.0.43 plex.bchs.duckdns.org
|
|
192.168.0.43 postgres.bchs.duckdns.org # 5432
|
|
192.168.0.43 traccar.bchs.duckdns.org # 8082
|
|
192.168.31.12 adguard.affirm.duckdns.org # 3002
|
|
192.168.31.12 chat.affirm.duckdns.org # 5001
|
|
192.168.31.12 cockpit.affirm.duckdns.org # 9090
|
|
192.168.31.12 diskstation.affirm.duckdns.org # 5001
|
|
192.168.31.12 drive.affirm.duckdns.org # 5001
|
|
192.168.31.12 free.file.sync.media # 22
|
|
192.168.31.12 kuma.affirm.duckdns.org # 3001
|
|
192.168.31.12 photos.affirm.duckdns.org # 5001
|
|
192.168.31.12 pve.affirm.duckdns.org # 8006
|
|
192.168.31.12 quartz.affirm.duckdns.org # /
|
|
```
|
|
|
|
## Acme
|
|
|
|
```bash
|
|
cd /etc/
|
|
mkdir /etc/duckdns
|
|
cd /etc/duckdns
|
|
nano duck.sh
|
|
```
|
|
|
|
```conf
|
|
echo url="https://www.duckdns.org/update?domains=affirm&token=1d3fc707-7052-4459-a624-fb01250f00b9&verbose=true&ip=" | curl -k -o /etc/duckdns/duck.log -K -
|
|
```
|
|
|
|
```bash Tue Nov 05 2024 17:18:42 GMT-0700 (Mountain Standard Time)
|
|
chmod 700 duck.sh
|
|
./duck.sh
|
|
cat duck.log
|
|
```
|
|
|
|
```bash Tue Nov 05 2024 17:19:25 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 '*.affirm.duckdns.org' --debug --home /root/.acme.sh --dnssleep 120 --days 90 --ecc --server https://acme-v02.api.letsencrypt.org/directory
|
|
cp -R /root/.acme.sh/\*.affirm.duckdns.org_ecc/ /root/.acme.sh/wild-affirm
|
|
mv /root/.acme.sh/wild-affirm/\*.affirm.duckdns.org.cer /root/.acme.sh/wild-affirm/affirm.duckdns.org.cer
|
|
mv /root/.acme.sh/wild-affirm/\*.affirm.duckdns.org.conf /root/.acme.sh/wild-affirm/affirm.duckdns.org.conf
|
|
mv /root/.acme.sh/wild-affirm/\*.affirm.duckdns.org.csr /root/.acme.sh/wild-affirm/affirm.duckdns.org.csr
|
|
mv /root/.acme.sh/wild-affirm/\*.affirm.duckdns.org.csr.conf /root/.acme.sh/wild-affirm/affirm.duckdns.org.csr.conf
|
|
mv /root/.acme.sh/wild-affirm/\*.affirm.duckdns.org.key /root/.acme.sh/wild-affirm/affirm.duckdns.org.key
|
|
./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
|
|
cp -R /root/.acme.sh/\*.bchs.duckdns.org_ecc /root/.acme.sh/wild-bchs
|
|
mv /root/.acme.sh/wild-bchs/\*.bchs.duckdns.org.cer /root/.acme.sh/wild-bchs/bchs.duckdns.org.cer
|
|
mv /root/.acme.sh/wild-bchs/\*.bchs.duckdns.org.conf /root/.acme.sh/wild-bchs/bchs.duckdns.org.conf
|
|
mv /root/.acme.sh/wild-bchs/\*.bchs.duckdns.org.csr /root/.acme.sh/wild-bchs/bchs.duckdns.org.csr
|
|
mv /root/.acme.sh/wild-bchs/\*.bchs.duckdns.org.csr.conf /root/.acme.sh/wild-bchs/bchs.duckdns.org.csr.conf
|
|
mv /root/.acme.sh/wild-bchs/\*.bchs.duckdns.org.key /root/.acme.sh/wild-bchs/bchs.duckdns.org.key
|
|
./acme.sh --issue --dns dns_duckdns -d '*.phares.duckdns.org' --debug --home /root/.acme.sh --dnssleep 120 --days 90 --ecc --server https://acme-v02.api.letsencrypt.org/directory
|
|
cp -R /root/.acme.sh/\*.phares.duckdns.org_ecc/ /root/.acme.sh/wild-phares
|
|
mv /root/.acme.sh/wild-phares/\*.phares.duckdns.org.cer /root/.acme.sh/wild-phares/phares.duckdns.org.cer
|
|
mv /root/.acme.sh/wild-phares/\*.phares.duckdns.org.conf /root/.acme.sh/wild-phares/phares.duckdns.org.conf
|
|
mv /root/.acme.sh/wild-phares/\*.phares.duckdns.org.csr /root/.acme.sh/wild-phares/phares.duckdns.org.csr
|
|
mv /root/.acme.sh/wild-phares/\*.phares.duckdns.org.csr.conf /root/.acme.sh/wild-phares/phares.duckdns.org.csr.conf
|
|
mv /root/.acme.sh/wild-phares/\*.phares.duckdns.org.key /root/.acme.sh/wild-phares/phares.duckdns.org.key
|
|
|
|
## ssh
|
|
|
|
```bash Tue Nov 05 2024 17:24:54 GMT-0700 (Mountain Standard Time)
|
|
lsblk -I 8 -o NAME,SIZE,TYPE,FSUSED,FSUSE%
|
|
lvs
|
|
# lvextend -l +100%FREE pve/root
|
|
# resize2fs /dev/mapper/pve-root
|
|
# lvchange -ay /dev/pve/root
|
|
```
|
|
|
|
```bash Tue Nov 05 2024 17:54:27 GMT-0700 (Mountain Standard Time)
|
|
apt-get install ssh-import-id -y
|
|
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
|
|
```
|
|
|
|
## nginx
|
|
|
|
```bash Tue Nov 05 2024 17:54:30 GMT-0700 (Mountain Standard Time)
|
|
# systemctl start nginx
|
|
nginx -t
|
|
nginx -s reload
|
|
tail -f /var/log/nginx/error.log
|
|
```
|
|
|
|
## Log
|
|
|
|
```bash Tue Nov 05 2024 17:54:32 GMT-0700 (Mountain Standard Time)
|
|
ln -s /var/log/nginx /var/www/html/log-nginx
|
|
ls -la /var/www/html
|
|
exit
|
|
```
|
|
|
|
```bash Tue Nov 05 2024 17:54:35 GMT-0700 (Mountain Standard Time)
|
|
cp ~/.bash_history /etc/bash_history_2024-11-05.txt
|
|
cat /etc/bash_history_2024-11-05.txt
|
|
exit
|
|
```
|
|
|
|
## Podman Quadlet Rootless Example
|
|
|
|
```bash Tue Nov 05 2024 17:54:37 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
|
|
exit
|
|
```
|
|
|
|
```bash Tue Nov 05 2024 17:55:28 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
|
|
```
|
|
|
|
## 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 Tue Nov 05 2024 17:56:47 GMT-0700 (Mountain Standard Time)
|
|
nano ~/.bash_profile
|
|
```
|
|
|
|
```conf Tue Nov 05 2024 17:56:49 GMT-0700 (Mountain Standard Time)
|
|
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
|
|
```
|
|
|
|
- [user-flag-rootless-containers](https://www.redhat.com/en/blog/user-flag-rootless-containers)
|
|
|
|
```bash Tue Nov 05 2024 18:36:38 GMT-0700 (Mountain Standard Time)
|
|
podman run --user 1000 -d fedora sleep 10
|
|
find / -name "*fedora*" 2>/dev/null
|
|
podman run --user 1000 -d docker.io/louislam/uptime-kuma
|
|
```
|
|
|
|
```bash Tue Nov 05 2024 19:17:28 GMT-0700 (Mountain Standard Time)
|
|
exit
|
|
podman pull docker.io/louislam/uptime-kuma:1
|
|
systemctl --user daemon-reload
|
|
systemctl --user start uptime-kuma-server
|
|
# Failed to start uptime-kuma-server.service: Unit uptime-kuma-server.service not found.
|
|
# Podman rootless unit search path
|
|
# Quadlet files for non-root users can be placed in the following directories
|
|
# ~/.config/containers/systemd/
|
|
chown -R podman:podman /home/podman/.config/containers/systemd
|
|
chown -R podman:podman /home/podman
|
|
systemctl --user list-unit-files
|
|
ls -la /usr/libexec/podman
|
|
# lrwxrwxrwx 1 root root 19 Nov 4 2021 catatonit -> ../../bin/catatonit
|
|
# -rwxr-xr-x 1 root root 1999200 Oct 1 14:54 quadlet
|
|
# -rwxr-xr-x 1 root root 3558560 Oct 1 14:54 rootlessport
|
|
/usr/libexec/podman/quadlet -dryrun --user
|
|
/usr/libexec/podman/quadlet --user /home/podman/libexec-podman-quadlet-output
|
|
# -bash: /usr/libexec/podman/quadlet: No such file or directory
|
|
systemctl enable podman.socket
|
|
systemctl start podman.socket
|
|
apt install software-properties-common uidmap -y
|
|
apt-get install -y libapparmor-dev
|
|
```
|
|
|
|
## Arch DMS
|
|
|
|
- [arc-releases](https://github.com/AuxXxilium/arc/releases)
|
|
- [youtube](https://www.youtube.com/watch?v=e-ZyoHe5wGk&t=304s)
|
|
|
|
```bash
|
|
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
|
|
# 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/)
|