2023年2月16日 星期四

Debian 11 安裝 MegaCli

apt-get install -y alien
apt-get install libncurses5

opwd=`pwd`

mkdir /tmp/megacli
cd  /tmp/megacli
wget -q -O- https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip |busybox unzip -

cd Linux

alien MegaCli-8.07.14-1.noarch.rpm
dpkg -i megacli_8.07.14-2_all.deb

cd $opwd

安裝路徑
/opt/MegaRAID/MegaCli

查詢 ip address 地區

Debian 安裝
apt install geoip-bin geoip-database

Alpine 安裝
apk add geoip libmaxminddb

使用
geoiplookup 8.8.8.8

相關參考資料
https://dev.maxmind.com/geoip/geolite2-free-geolocation-data?lang=en
https://dev.maxmind.com/geoip/release-notes/2022#geoip-legacy-databases-have-been-retired?lang=en

IP轉換 32-bit-integer-into-ip
$ip = $bit32>>24,"." + $bit32<<8>>24,".",$bit32<<16>>24,".",$bit32<<24>>24;

其他相關
https://www.miyuru.lk/geoiplegacy

pip install & uninstall recursively in non-interactive mode

pip3 install --no-input md5hash

pip3 uninstall --yes md5hash

CentOS7 instal l X-Window Xfce

yum install epel-release -y
yum groupinstall "X Window system" -y
yum groupinstall "Xfce" -y

GOLAMG static link

 go build -ldflags "-linkmode external -extldflags '-static'" exp.go