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
加上 phpmyadmin
回覆刪除檢查 docker network ls; 使用 --net librenms_default
docker run -v ./phpmyadmin_php:/usr/local/etc/php/ --name phpmyadmin -d --link librenms_db -p 8080:80 --net librenms_default -e UPLOAD_LIMIT="300M" phpmyadmin/phpmyadmin
指定 container 的目錄到 windows 目錄
回覆刪除docker run -v D:\docker_chair\phpmyadmin_php:/usr/local/etc/php/ --name phpmyadmin -d --link librenms_db -p 8080:80 --net librenms_default -e UPLOAD_LIMIT="300M" phpmyadmin/phpmyadmin
OS
回覆刪除#cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.17.5
排程
#crond --help
-c DIR Cron dir. Default:/var/spool/cron/crontabs
phpmyadmin 找不到 php.ini
回覆刪除ls -all /usr/local/etc/php
檢查 php.ini 位置
php -i |grep php.ini
Configuration File php.ini Path => /usr/local/etc/php
nginx -t to check config is good
回覆刪除nginx -s reload to reload config without restart