官网文档https://open5gs.org/open5gs/docs/guide/01-quickstart/
先安装ubuntu22.04

1.安装 MongoDB

MongoDB数据库是open5g必备的
sudo apt update
sudo apt install gnupg
curl -fsSL https://pgp.mongodb.com/server-6.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg --dearmor
echo “deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse” | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt update
sudo apt install -y mongodb-org

重启服务
sudo systemctl start mongod
sudo systemctl enable mongod

2.安装 open5gs

sudo add-apt-repository ppa:open5gs/latest
sudo apt update
sudo apt install open5gs

3.安装 the WebUI of Open5GS

WebUI 可以通过浏览器快速方便地编辑用户数据。这不是必须的,但在刚开始使用 Open5GS 时,WebUI能更轻松地使用。

安装 Open5GS 的 WebUI 需要先下载 Node.js

sudo apt update
sudo apt install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg

修改NODE_MAJOR环境变量

NODE_MAJOR=20
echo “deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main” | sudo tee /etc/apt/sources.list.d/nodesource.list

开始安装nodejs

sudo apt update
sudo apt install nodejs -y

安装webui
curl -fsSL https://open5gs.org/open5gs/assets/webui/install | sudo -E bash -

查看open5gs有关进程
ps -ef|grep open5gs
在这里插入图片描述
重启webui服务
systemctl stop open5gs-webui.service
systemctl start open5gs-webui.service

查看webui服务状态
systemctl status open5gs-webui.service
在这里插入图片描述

可以看到ready on localhost:9999字样
每个人这里看到的端口可能不一样,以自己的环境为准

查看webui的ip和端口设置
cat /usr/lib/node_modules/open5gs/server/index.js
在这里插入图片描述
若要修改配置可编辑该文件
IP地址为localhost,如需外部访问可将此处localhost改为本地ip地址
端口号为9999

使用netstat -pan|grep 9999查看端口开放情况
在这里插入图片描述
使用浏览器访问localhost:9999,默认账号密码:admin/1423
在这里插入图片描述
在这里插入图片描述
参考链接:https://blog.csdn.net/weixin_45555543/article/details/134135957
【open5gs安装(5g仿真环境部署2)】

如有错误或问题请指正,欢迎私信交流

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐