超級好用的docker更新工具
kk的blog
2026/03/10
2026/03/09
上週因為ruckus switch 的power壞了
查log時竟然查到內部攻擊者
想說能不能從vsz把user踢掉
程式如下
#!/bin/bash
#how to use
#./vsz_kick_ip ip
VSZ="https://10.1.1.1:8443"
USER="user"
PASS="passwd"
IP="$1"
#拿到cookie.txt
curl -k -c /tmp/cookie.txt -X POST "$VSZ/wsg/api/public/v6_1/session" \
-H "Content-Type: application/json" \
-d "{\"username\": \"$USER\", \"password\": \"$PASS\"}"
#使用cookie.txt 找出 ip 是那個 mac
MAC=$(curl -sk -b /tmp/cookie.txt -X POST "$VSZ/wsg/api/public/v6_1/query/client" -H "Content-Type: application/json" -d '{"limit": 100000,"index": 0}'|jq|grep $IP -A 2|tail -n 1|cut -d '"' -f 4)
echo $MAC
#取出 mac 並斷線
curl -sk -b /tmp/cookie.txt -X POST "$VSZ/wsg/api/public/v6_1/clients/disconnect" -H "Content-Type: application/json" -d '{"mac":"'$MAC'"}'
運作沒問題
但踢掉後又會馬上連線 所以沒用
本來是想再加入黑名單
但現在的無線又是隨几mac
所以感覺作用不大
再想想要怎麼處理
2026/03/05
今天要把graylog升到 7.0.5
竟然出現以下問題
file /usr/lib/.build-id/0f/5bf41e3e207feb6cab260b2366f1697c13555b conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
file /usr/lib/.build-id/2a/45eebcedc9ddddd7e43512f1c1d13a625cfe52 conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
file /usr/lib/.build-id/32/f8130f4d86dfcf5f9af96b1cb932eda8015165 conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
file /usr/lib/.build-id/3c/51e24cab713cbc44a4b05fed44660d7d8e4035 conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
file /usr/lib/.build-id/3d/552045a6af8c09b554b88b43d19a50b9e52b99 conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
file /usr/lib/.build-id/7f/0274197caa4afcc5c5430232e140211d611a4f conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
file /usr/lib/.build-id/db/dfd874aa078c8f1feacc28175a6a874c060d6a conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
file /usr/lib/.build-id/e7/189286cdb1e6c44b0968f6d52855af9696ae2c conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
都是官方的吔 沒測試就丟出來
只能直接手動下載二個rpm
https://downloads.graylog.org/el/stable/7.0/x86_64
再來
rpm -ivh --force graylog-server-7.0.5-1.x86_64.rpm graylog-datanode-7.0.5-1.x86_64.rpm
2026/03/03
還是 ollama
一開始安裝是使用 官方提供的script 裝在lxc上
curl -fsSL https://ollama.com/install.sh | sh
接下來視需求跑model
ollama run gpt-oss:20b
要看下載了那些 model
使用 ollama ls
跑起來在文字介面上可以下指令
如果需要有網頁界面
最快的方式是在同一台几器跑 open-webui
docker run -d --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 --name open-webui --restart always ghcr.io/open-webui/open-webui:main
登入後就可以選擇任何已下載的模型來使用 很方便 直接選擇就能用 不需要 先 ollma run
ollama 也有docker可以使用
https://hub.docker.com/r/ollama/ollama
docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
裝好後使用以下指令進到內部再下指令
docker exec -it ollama /bin/bash
2026/03/02
有台 CISCO UCS C240 M5S 的HD最近壞了
換新之後 smart 捉不到資料了
# smartctl -i /dev/bus/0 -d megaraid,2
smartctl 7.4 2024-10-15 r5620 [x86_64-linux-6.17.13-1-pve] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke,
www.smartmontools.org
Smartctl open device: /dev/bus/0 [megaraid_disk_02] failed: INQUIRY failed
看了一下是firmware比較新
等待原廠回應如何解決
2026/02/25
訂閱:
意見 (Atom)