紀錄工作上的點點滴滴

Linux Gdisk Error

2025-02-06 linux

今天在實驗室中擴充一顆虛擬硬碟到 150 G,原先是 50G。但是不管是重新開機都無法識別。 後來發現 GPT 分割表未更新,如下 root@moniter:~# fdisk -l /dev/sda GPT PMBR size mismatch (104857599 != 314572799) ... Read More

LibreNMS 安裝設定紀錄

2025-02-02 Home Lab LibreNMS LDAP

部署環境 OS: Debian12 CPU: 2 Sockets, 2 Cores RAM: 6G Database: MariaDB: 11.4 System Requirement LibreNMS CPU: 2 Sockets, 4 Cores Memory: 2G Disk Type: ... Read More

linux 登入使用 google auth 二階段驗證

2025-01-11 linux

環境 OS: Debian 12 安裝及部屬 安裝 安裝 libpam-google-authenticator sudo apt -y install libpam-google-authenticator 設定 ssh 登入 /etc/pam.d/sshd auth required ... Read More

Disable Gnome Auto Upate

2025-01-09 linux gnome

禁止 Gnome 自動背景更新 設定文件: /etc/PackageKit/PackageKit.conf 設定文禁止更新 #PreventNetworkAccess=false PreventNetworkAccess=true sudo systemctl daemon-reload sudo ... Read More

tomcat log 格式探究

2025-01-02 tomcat

這幾天工作上有針對日誌設定做討論,但是單純對tomcat 日誌設定似乎缺少了實做探究,於是在下班之餘稍微探究了一下。今天先對日誌格式做研究。 在官網對於 log 工具預設是由 java 原生日誌工具處理 java.util.logging 原始設定 以下是 tomcat9 對 log ... Read More

Oracle Delete Database

2024-12-30 Oracle

Oracle 刪除資料庫 先查詢資料庫名稱 select name, open_mode from v$database; SQL> select name, open_mode from v$database; NAME OPEN_MODE --------- ... Read More

將腳本丟到背景執行

2024-12-30 linux

# 將腳本丟到背景執行,會輸出背景執行 PID Number nohup /usr/local/bin/example-shell.sh & # 監控結果 tail -f nohup.out # 監控背景程序還有執行 watch -n 1 "ps -p 120448 -o ... Read More

Grails Export Dependencies

2024-12-24 grails gradle

Grails 匯出專案中相依套件的 jar 環境 grails version: grails5 設定方式 在 build.gradle 新增設定 configurations { runtime.extendsFrom(compileClasspath, runtimeOnly) } task ... Read More

systemctl

2024-12-22 linux

變更 systemctl 默認編輯器 sudo update-alternatives --config editor 執行結果 root@example:~# sudo update-alternatives --config editor There are 3 choices for the ... Read More

Install Postgresql on Debian12

2024-12-22 postgresql

環境 OS: Debian 12 Database version: postgresql 14 安裝 sudo apt -y install curl ca-certificates sudo install -d /usr/share/postgresql-common/pgdg sudo ... Read More