2024年2月20日 星期二

photon os

https://github.com/vmware/photon/wiki/Downloading-Photon-OS

VMware Player 開 OVA 

啟動 docker 

systemctl start docker 啟動 Docker 服務

開機系統自動啟動 Docker 服務,systemctl enable docker


photon 安全更新

tdnf updateinfo info
tdnf upgrade --security

yum update tdnf

photon 更新
tdnf update -y
tdnf upgrade
tdnf check-update
tdnf distro-sync

2024年1月19日 星期五

Librenms Docker Windows

Version:

Windows 11p 22631.3007

Docker v4.26.1

Docker Compose version v2.23.3-desktop.2


建一個 docker 用的目錄

D:\dockerDATA\

再建一個 Librenms 專用目錄

D:\dockerDATA\Librenms\


下載官方範本 https://codeload.github.com/librenms/docker/zip/refs/heads/master

解開 docker-master\examples\compose 中的 4 個檔 (.env, compose.yml, msmtpd.env) 到 D:\dockerDATA\Librenms\


powershell>

cd D:\dockerDATA\Librenms\

docker compose -f compose.yml up -d


maridb 無法啟動出錯 

2024-01-19 15:09:11 2024-01-19 08:09:11+01:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

2024-01-19 15:09:11     command was: mysqld --innodb-file-per-table=1 --lower_case_table-names=0 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --verbose --help

2024-01-19 15:09:11     2024-01-19  8:09:11 0 [ERROR] The server option 'lower_case_table_names' is configured to use case sensitive table names but the data directory resides on a case-insensitive file system. Please use a case sensitive file system for your data directory or switch to a case-insensitive table name mode.


powershell>

docker compose down

cd D:\dockerDATA\Librenms\

fsutil.exe file queryCaseSensitiveInfo ./db

目錄區分大小寫屬性停用

fsutil.exe file setCaseSensitiveInfo ./db enable

目錄區分大小寫屬性啟用


參考來源:

https://github.com/librenms/docker

https://learn.microsoft.com/zh-tw/windows/wsl/case-sensitivity

2024年1月8日 星期一

fortigate cli ping, traceroute

 登入 fortigate 管理介面後,點擊右上角 CLI 功能。


執行 Ping 的指令:

execute ping [IP address]

例如要 ping 8.8.8.8:

execute ping 8.8.8.8


但是因為有時候需要指定 ping 的來源 ip ,或者調整封包大小等,就會需要修改 ping 參數,下面介紹各種支援的參數。

檢查目前的參數設定:

execute ping-options view-settings


自適應 PING:

execute ping-options adaptive-ping [ enable / disable ]


PING 封包大小 (預設 56 bytes):

execute ping-options data-size [ 0 ~ 65507 ]


指定 PING 對象的網路介面:

execute ping-options interface  [ Auto / "outgoing interface" ]


PING 間格秒數:

execute ping-options interval [ 秒數 ]


PING 次數:

execute ping-options repeat-count [ 1 ~2147483647 ]


還原 PING 參數至預設值:

execute ping-options reset


PING 的來源 IP:

execute ping-options source [ Auto / "source interface IP" ]


PING 的逾時時間長度:( 預設二秒)

execute ping-options timeout [ 秒數 ]


執行 traceroute 的指令:

execute traceroute [IP address]

例如要 traceroute 8.8.8.8:

execute traceroute 8.8.8.8


下面介紹 traceroute 支援的參數。

檢查目前的參數設定:

execute traceroute-options view-settings


指定每跳的查詢數:

execute traceroute-options queries [次數]


指定 traceroute 介面:

execute traceroute-options device [ Auto / "Interface name" ]


指定 traceroute 來源 IP:

execute traceroute-options source [ Auto / "source interface IP" ]


參考:

https://blog.esafe360.com/2022/11/fortigate-ping.html

https://blog.esafe360.com/2022/11/fortigate-traceroute.html