顯示具有 debian 11 標籤的文章。 顯示所有文章
顯示具有 debian 11 標籤的文章。 顯示所有文章

2024/06/16

今天把librenms的OS從debian 11 升到 12
照步驟做沒問題
要注意的是php不能升到 8.3
只能到 8.2
原來在debian 11上的是 8.1



2022/12/20

今天更新 debian
直接下完
apt update
apt upgrade -y 後
librenms就打不開了
跑了 ./daily.sh 
出現

Updating to latest codebase                        OK
Updating Composer packages                         FAIL
> LibreNMS\ComposerHelper::preInstall
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - fgrosse/phpasn1 is locked to version v2.4.0 and an update of this package was not requested.
    - fgrosse/phpasn1 v2.4.0 requires php ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 -> your php version (8.2.0) does not satisfy that requirement.
  Problem 2
    - fgrosse/phpasn1 v2.4.0 requires php ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 -> your php version (8.2.0) does not satisfy that requirement.
    - web-token/jwt-core v2.2.11 requires fgrosse/phpasn1 ^2.0 -> satisfiable by fgrosse/phpasn1[v2.4.0].
    - web-token/jwt-core is locked to version v2.2.11 and an update of this package was not requested.
Updated from ae22662c8 to 1ab238a4d                OK
Updating SQL-Schema                                OK
Updating submodules                                OK
Cleaning up DB                                     OK
Fetching notifications                             OK
Caching PeeringDB data                             OK
Caching Mac OUI data                               OK

看來是php不能升到 8.2

只能倒回備分
再排除以下的更新 

php-cli/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-common/bullseye 2:93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:93+0~20221029.44+debian11~1.gbpaae3e9]
php-curl/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-fpm/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-gd/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-gmp/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-json/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-mbstring/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-mysql/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-pear/bullseye 1:1.10.13+submodules+notgz+2022032202-2+0~20221209.38+debian11~1.gbpfd4c1d all [upgradable from: 1:1.10.13+submodules+notgz+2022032202-2+0~20220330.37+debian11~1.gbpfd4c1d]
php-snmp/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-xml/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-zip/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]

再來把以上的package hold住 不要更新
指令如下

Hold a package:

sudo apt-mark hold <package-name>
Remove the hold:

sudo apt-mark unhold <package-name>
Show all packages on hold:

sudo apt-mark showhold

指令下完後 apt upgrade 時就不會更新

不過如果是下 apt install 還是會更新 此時就不受 hold影響 要特別注意


2022/12/16

graylog 迎來了5 版的更新

依然還是無法原几升級

記錄一下安裝的過程 以debian 11 為例

依照官方文件的流程 先裝mongodb

由於新版的mongodb需要使用 cpu 的 avx 功能

所以proxmox 上 guest的 cpu type 必須要改成 host 不能使用 預設值 kvm64

光是這個問題就卡關好久

而且mongodb 5版裝完後無法執行 6 版沒問題

接下來新的版本可以選擇使用 

OpenSearch 或 Elasticsearch

我是選擇 Elasticsearch

第三步是安裝 graylog server

安裝後調整參數

/etc/elasticsearch/jvm.options 這個檔

-Xms8g
-Xmx8g

以上的參數依照記憶体進行調整


/etc/default/graylog-server 檔案裡

GRAYLOG_SERVER_JAVA_OPTS="-Xms1g -Xmx1g -server -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow"


-Xms1g -Xmx1g

這二個參數也是依照記憶体進行調整


其他依文件安裝問題不大

不過文件上有些斷行有問題 需要自行調整

例如

wget -qO - https://www.mongodb.org/static/pgp/server-5.x.asc | sudo apt-key add -

echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.x main" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.x.list

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -


echo "deb https://artifacts.elastic.co/packages/oss-7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list


另外使用almalinux 8 跟 9 安裝過程沒有出現錯誤 但 graylog server 啟動打開管理介面

出現以下的錯誤



Error Loading active authentication service type failed with status: SyntaxError: JSON.parse: unexpected character at line 2 column 1 of the JSON data

不知道是那裡出問題 有空再來試了

找到問題了 firewalld 沒關

systemctl disable firewalld

systemctl stop firewalld


https://go2docs.graylog.org/5-0/what_is_graylog/what_is_graylog.htm


2022/09/30

最近登入librenms時出現以下提示




 




目前使用的這個版本是從官網下載ubunbu 20.04 ova

試著升級但升完後有很多問題

於是打算重裝

選定debian 11 

依照官網的流程一步步順利裝完

再來依照官方FAQ的方式移轉

也順利完成

最後有問題的是weathermap

如果直接copy ubuntu 20.04的目錄過來會發生無法執行的情況

不過官方已有針對php 8.1 進行修改

所以直接 git clone

git clone https://github.com/librenms-plugins/Weathermap.git

再mv目錄 

mv Weathermap /opt/librenms/html/plugins/

把原几的 conf 複制到以下目錄

/opt/librenms/html/plugins/Weathermap/configs


以上就大致完成了

目前觀察中 看看還有沒有其他問題


https://github.com/librenms/packer-builds/releases/tag/21.2.0


https://www.librenms.org/#downloads


https://docs.librenms.org/Installation/Install-LibreNMS/#prepare-linux-server


https://docs.librenms.org/Support/FAQ/#how-do-i-migrate-my-librenms-install-to-another-server