LoginSignup
1
2

Ubuntu 22.04にMongoDB 6.0とOpen5GS WebUIをインストールする

Last updated at Posted at 2023-02-13

本記事は、2023.01.26にリリースされたMongoDB 6.0.4がUbuntu 22.04に対応したことを受けて、Ubuntu 22.04にMongoDB 6.0とOpen5GS WebUIをインストールする手順を簡単に説明します。


目次


MongoDB 6.0インストール

Ubuntu 22.04では、apt-keyが非推奨になり、gpgを使用します。そこで、以下のOSについてインストール手順で示します。

  • Ubuntu 20.04
  • Ubuntu 22.04
# apt update
# apt install wget gnupg software-properties-common ca-certificates lsb-release
# wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/mongodb-6.gpg
# echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/6.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-6.0.list
# apt update
# apt install -y mongodb-org

mongodサービスを有効にして、開始します。

# systemctl enable mongod
# systemctl start mongod

Open5GS WebUIインストール

事前にMongoDB 6.0をインストールして下さい。
最初に、こちらを参照して、Node.jsをインストールします。

# apt install -y ca-certificates curl gnupg
# mkdir -p /etc/apt/keyrings
# curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
# echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
# apt update
# apt install -y nodejs

次にOpen5GS WebUIをインストールします。

# git clone https://github.com/open5gs/open5gs
# cd open5gs/docs/assets/webui
# bash install

必要に応じて、以下のようにWebUIがbindするIPアドレスとポートを設定します。(例、192.168.0.111:3000)

/lib/systemd/system/open5gs-webui.service

--- open5gs-webui.service.orig  2023-02-10 22:59:41.808165291 +0900
+++ open5gs-webui.service       2023-02-10 21:56:30.191835861 +0900
@@ -7,6 +7,8 @@
 
 WorkingDirectory=/usr/lib/node_modules/open5gs
 Environment=NODE_ENV=production
+Environment=HOSTNAME=192.168.0.111
+Environment=PORT=3000
 ExecStart=/usr/bin/node server/index.js
 Restart=always
 RestartSec=2

変更後、システムサービスを更新して、WebUIを再起動します。

# systemctl daemon-reload
# systemctl restart open5gs-webui

最後に

MongoDB 6.0がUbuntu 22.04に対応したことで、Open5GSのC/U-Plane、WebUIともにUbuntu 22.04に移行できるようになりました。また、RAN/UEのシミュレータのUERANSIMもUbuntu 22.04で動作しますので、これで5Gの主なシミュレーション環境をUbuntu 22.04で構築することができますね。

最後に、元記事はGithubに書いたものです。

主な変更履歴

  • [2023.09.02] Node.jsのインストール手順を更新。
  • [2023.02.13] 初版。
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2