2022年10月21日 星期五

apt-get upgrade:The following packages have been kept back

apt-get -u dist-upgrade

Atlassian JIRA REST APIs 帳號認證

APIs 認證
curl -X POST \
  http://192.168.1.1:8080/rest/auth/1/session \
  -H 'content-type: application/json' \
  -d '{ "username": "userid", "password": "123456" }'

不使用APIs
wget http://192.168.1.1/rest/gadget/1.0/login --post-data="os_username=userid&os_password=123456&os_destination=&user_role=&atl_token=&login=Log+In"

Proxmox backup client 使用筆記

備份
proxmox-backup-client backup a.pxar:/root/a --repository root@pam@192.168.1.1:8007:tmp

回復
proxmox-backup-client restore --repository root@pam@192.168.1.1:8007:tmp host/r720/2022-10-10T10:10:10Z root.pxar /tmp/a

備份清單
proxmox-backup-client list --repository root@pam@192.168.1.1:8007:tmp
proxmox-backup-client snapshot list --repository root@pam@192.168.1.1:8007:tmp

掛載
proxmox-backup-client mount host/r720/2022-10-10T01:10:10Z a.pxar /mnt2 --repository root@pam@192.168.1.1:8007:tmp

Proxmox VE 6.x 升級 Proxmox 7.x

 PVE 7.x 使用 cgroupv2,確認環境下的 LXC 模式系統是否有
1.CentOS7       更新 systemd 版本 234以上
2.Ubuntu 16.10  更新 systemd 版本 229以上

PVE 6.x 更新至最新版本
apt update && apt dist-upgrade -y

重新開機
reboot -nf

檢清更新的清單
pve6to7
pve6to7 --full

更新來源庫
sed -i 's/buster\/updates/bullseye-security/g;s/buster/bullseye/g' /etc/apt/sources.list
sed -i -e 's/buster/bullseye/g' /etc/apt/sources.list.d/pve-install-repo.list
sed -i -e 's/buster/bullseye/g' /etc/apt/sources.list.d/pve-no-subscription.list
echo "deb http://download.proxmox.com/debian/ceph-octopus bullseye main" > /etc/apt/sources.list.d/ceph.list

系統更新
apt update && apt dist-upgrade -y

Web Server Head 測試

printf "GET / HTTP/1.1\r\nHOST:z\r\n\r\n" | nc localhost 80 printf "GET / HTTP/2.0\r\nHOST:x\r\n\r\n" | nc localhost 80

OpenVPN 除錯

錯誤訊息 OpenSSL: error:140AB18E:SSL routines:SSL_CTX_use_certificate:ca md too weak

編輯 /etc/openvpn/server.conf 加入
tls-cipher "DEFAULT:@SECLEVEL=0"