CentOS Stream 9 + geoipupdate + Python 3.11をインストール
FreeBSDサーバーでやったことを CentOS Streamサーバーの環境でも行っているときの覚書。 Gemini 2.5 Proと対話。 環境: CentOS Stream 9, Python 3.9.23, Python 3.11.13 1. geoipupdateをインストール CentOS Streamの環境では公式リポジトリにgeoipupdateがない。 # dnf search geoip RPMをGitHubからダウンロードしてインストールするのが公式。 参考: maxmind/geoipupdate: GeoIP update client code GitHubのReleasesに掲載してあるURLを確認してダウンロード。 -OはURLのファイル名でダウンロード。-Lはリダイレクトを許可。 # curl -OL https://github.com/maxmind/geoipupdate/releases/download/v7.1.1/geoipupdate_7.1.1_linux_amd64.rpm dnfが依存関係を自動で解決してインストールしてくれる。 # dnf install ./geoipupdate_7.1.1_linux_amd64.rpm Account IDとLicense Keyを設定ファイルに記述。 国別データベースの場合は GeoLite2-Countryを指定。 # less /etc/GeoIP.conf AccountID 1234567 LicenseKey 08MzPb....pe_mmk EditionIDs GeoLite2-Country 動作確認。 # geoipupdate -v geoipupdate version 7.1.1 (6664d8b9, 2025-07-09T20:46:45Z, linux-amd64) Using config file /etc/GeoIP.conf Using database directory /usr/share/GeoIP Initializing file lock at /usr/share/GeoIP/.geoipupdate.lock Acquired lock file at /...