Open5gs
$ sudo apt update
$ sudo apt install mongodb
$ sudo systemctl start mongodb
$ sudo systemctl enable mongodb
$ sudo ip tuntap add name ogstun mode tun
$ sudo ip addr add 10.45.0.1/16 dev ogstun
$ sudo ip addr add 2001:db8:cafe::1/48 dev ogstun
$ sudo ip link set ogstun up
$ sudo apt install python3-pip python3-setuptools python3-wheel ninja-build build-essential flex bison git libsctp-dev libgnutls28-dev libgcrypt-dev libssl-dev libidn11-dev libmongoc-dev libbson-dev libyaml-dev libnghttp2-dev libmicrohttpd-dev libcurl4-gnutls-dev libnghttp2-dev libtins-dev libtalloc-dev meson
$ git clone https://github.com/open5gs/open5gs
$ cd open5gs
$ meson build --prefix=`pwd`/install
$ ninja -C build
The test program has been run on [VirtualBox - CPU: 1, Memory: 4.00 GB]
$ ./build/tests/attach/attach ## EPC Only
$ ./build/tests/registration/registration ## 5G Core Only
$ cd build
$ meson test -v
$ cd build
$ ninja install
$ cd ../
$ sudo apt install curl
$ curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
$ sudo apt install nodejs
$ cd webui
$ npm ci --no-optional
$ npm run dev
Username : admin
Password : 1423
$ ./install/bin/open5gs-${nf}d
$ ./build/tests/app/5gc
注意:這裡執行的yaml檔為open5gs/build/configs/sample.yaml需修改這個yaml檔。
$ cd ~/UERANSIM
$ build/nr-gnb -c config/open5gs-gnb.yaml
$ cd ~/UERANSIM
$ sudo build/nr-ue -c config/open5gs-ue.yaml
$ ping -I uesimtun0 google.com
$ ninja -C build
$ cd build
$ meson test -v
$ rm -Rf ../install
$ ninja install