2
1

More than 1 year has passed since last update.

Ubuntu 22.04にMongoDB 6.0とfree5GC 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とfree5GC 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

free5GC WebUIインストール

Ubuntu 22.04では、apt-keyが非推奨になり、gpgを使用します。
事前にMongoDB 6.0とGoをインストールして下さい。

最初に、Yarnをインストールします。

# apt install wget
# wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/yarn.gpg
# echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
# apt update
# apt install yarn

次に、こちらを参照して、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

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

# git clone --recursive -j `nproc` https://github.com/free5gc/free5gc.git
# cd free5gc/webconsole
# git checkout main
# cd ..
# make webconsole

WebUIを開始します。

# cd webconsole
# bin/webconsole
...
[GIN-debug] Listening and serving HTTP on :5000

バインドするIPアドレスとポート番号を指定する場合、こちらが参考になります。

最後に

MongoDB 6.0がUbuntu 22.04に対応したことで、free5GCの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] 初版。
2
1
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
2
1