Difference between revisions of "Open5gs: Download"
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
(35 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
Berikut adalah langkah yang perlu di lakukan untuk mendownload dan menginstalasi open5gs. | Berikut adalah langkah yang perlu di lakukan untuk mendownload dan menginstalasi open5gs. | ||
− | Install aplikasi pendukung | + | ==Asumsi Konfigurasi== |
+ | |||
+ | * OS Ubuntu 22.04 | ||
+ | * Open5GS & IMS satu mesin | ||
+ | * Satu Interface enp0s3 | ||
+ | * IP Statik 192.168.0.4/24 gateway 192.168.0.222 | ||
+ | * MCC 999 MNC 70 | ||
+ | |||
+ | |||
+ | |||
+ | ==Setup IP Statik== | ||
+ | |||
+ | Edit | ||
+ | |||
+ | vi /etc/netplan/00-installer-config.yaml | ||
+ | |||
+ | Pastikan, | ||
+ | |||
+ | # This is the network config written by 'subiquity' | ||
+ | # network: | ||
+ | # ethernets: | ||
+ | # enp0s3: | ||
+ | # dhcp4: true | ||
+ | # version: 2 | ||
+ | |||
+ | network: | ||
+ | version: 2 | ||
+ | renderer: networkd | ||
+ | ethernets: | ||
+ | enp0s3: | ||
+ | addresses: | ||
+ | - 192.168.0.4/24 | ||
+ | nameservers: | ||
+ | addresses: [8.8.8.8, 8.8.4.4] | ||
+ | routes: | ||
+ | - to: default | ||
+ | via: 192.168.0.222 | ||
+ | |||
+ | ==Install aplikasi pendukung== | ||
sudo apt update | sudo apt update | ||
+ | sudo apt upgrade | ||
sudo apt install -y software-properties-common | sudo apt install -y software-properties-common | ||
+ | |||
+ | ==Install MongoDB== | ||
+ | |||
+ | Import public key | ||
+ | |||
+ | sudo apt update | ||
+ | sudo apt install -y gnupg curl | ||
+ | curl -fsSL https://pgp.mongodb.com/server-6.0.asc | \ | ||
+ | sudo gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg \ | ||
+ | --dearmor | ||
+ | |||
+ | Buat file | ||
+ | |||
+ | /etc/apt/sources.list.d/mongodb-org-6.0.list | ||
+ | |||
+ | Di Ubuntu 22.04 (Jammy) | ||
+ | |||
+ | 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 | ||
+ | |||
+ | Install MongoDB | ||
+ | |||
+ | sudo apt update | ||
+ | sudo apt install -y mongodb-org | ||
+ | sudo apt install -y mongodb # Ubuntu 18.04 | ||
+ | |||
+ | Restart, Enable, cek status Ubuntu 18.04 | ||
+ | |||
+ | sudo systemctl start mongodb # Ubuntu 18.04 | ||
+ | sudo systemctl enable mongodb # Ubuntu 18.04 | ||
+ | sudo systemctl status mongodb # Ubuntu 18.04 | ||
+ | |||
+ | Restart, Enable, cek status Ubuntu 22.04 | ||
+ | |||
+ | sudo systemctl start mongod | ||
+ | sudo systemctl enable mongod | ||
+ | sudo systemctl status mongod | ||
+ | |||
+ | Tip: MongoDB digunakan sebagai database untuk NRF/PCF/UDR dan PCRF/HSS. | ||
+ | |||
+ | ==Install 5G== | ||
Tambahkan Open5gs ke repository yang ada di sistem operasi, | Tambahkan Open5gs ke repository yang ada di sistem operasi, | ||
Line 11: | Line 90: | ||
sudo add-apt-repository ppa:open5gs/latest | sudo add-apt-repository ppa:open5gs/latest | ||
− | + | Instalasi Open5gs | |
− | + | sudo apt update | |
+ | sudo apt install -y open5gs | ||
+ | Restart, Enable | ||
− | + | sudo systemctl start open5gs-amfd | |
+ | sudo systemctl start open5gs-ausfd | ||
+ | sudo systemctl start open5gs-bsfd | ||
+ | sudo systemctl start open5gs-hssd | ||
+ | sudo systemctl start open5gs-mmed | ||
+ | sudo systemctl start open5gs-nrfd | ||
+ | sudo systemctl start open5gs-nssfd | ||
+ | sudo systemctl start open5gs-pcfd | ||
+ | sudo systemctl start open5gs-pcrfd | ||
+ | sudo systemctl start open5gs-scpd | ||
+ | sudo systemctl start open5gs-sgwcd | ||
+ | sudo systemctl start open5gs-sgwud | ||
+ | sudo systemctl start open5gs-smfd | ||
+ | sudo systemctl start open5gs-udmd | ||
+ | sudo systemctl start open5gs-udrd | ||
+ | sudo systemctl start open5gs-upfd | ||
− | + | sudo systemctl enable open5gs-amfd | |
− | + | sudo systemctl enable open5gs-ausfd | |
− | sudo | + | sudo systemctl enable open5gs-bsfd |
+ | sudo systemctl enable open5gs-hssd | ||
+ | sudo systemctl enable open5gs-mmed | ||
+ | sudo systemctl enable open5gs-nrfd | ||
+ | sudo systemctl enable open5gs-nssfd | ||
+ | sudo systemctl enable open5gs-pcfd | ||
+ | sudo systemctl enable open5gs-pcrfd | ||
+ | sudo systemctl enable open5gs-scpd | ||
+ | sudo systemctl enable open5gs-sgwcd | ||
+ | sudo systemctl enable open5gs-sgwud | ||
+ | sudo systemctl enable open5gs-smfd | ||
+ | sudo systemctl enable open5gs-udmd | ||
+ | sudo systemctl enable open5gs-udrd | ||
+ | sudo systemctl enable open5gs-upfd | ||
− | Install | + | ==Install WebUI Open5GS== |
− | + | WebUI memungkinkan Anda mengedit data pelanggan secara interaktif. Meskipun tidak penting untuk menggunakan ini, itu membuat segalanya lebih mudah ketika Anda baru memulai petualangan Open5GS Anda. (Tool command line tersedia untuk advanced user). | |
− | |||
− | |||
+ | Node.js diperlukan untuk menginstal WebUI Open5GS | ||
− | + | Distribusi Linux berbasis Debian dan Ubuntu dapat menginstal Node.js sebagai berikut: | |
sudo apt update | sudo apt update | ||
− | sudo apt install -y open5gs | + | sudo apt upgrade |
+ | sudo apt install curl | ||
+ | curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - | ||
+ | sudo apt install -y gcc g++ make | ||
+ | sudo apt install -y nodejs | ||
+ | |||
+ | |||
+ | ===ERROR=== | ||
+ | |||
+ | Error Ubuntu 18.04 saat instalasi WebUI versi libc6 yang ada kurang tinggi | ||
+ | |||
+ | The following packages have unmet dependencies: | ||
+ | nodejs : Depends: libc6 (>= 2.28) but 2.27-3ubuntu1.6 is to be installed | ||
+ | E: Unable to correct problems, you have held broken packages. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | Install yarn | ||
+ | |||
+ | curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null | ||
+ | echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | ||
+ | |||
+ | sudo apt-get update && sudo apt install -y yarn | ||
+ | |||
+ | Install WebUI Open5GS. | ||
+ | |||
+ | curl -fsSL https://open5gs.org/open5gs/assets/webui/install | sudo -E bash - | ||
+ | |||
+ | Agar bisa di akses dari Remote PC. Edit | ||
+ | |||
+ | cd /etc/systemd/system/multi-user.target.wants | ||
+ | vi open5gs-webui.service | ||
− | + | Pastikan | |
− | + | [Unit] | |
− | + | Description=Open5GS WebUI | |
− | + | Wants=mongodb.service mongod.service | |
− | open5gs- | + | |
− | + | [Service] | |
+ | Type=simple | ||
+ | |||
+ | WorkingDirectory=/usr/lib/node_modules/open5gs | ||
+ | Environment=NODE_ENV=production | ||
+ | Environment=HOSTNAME=0.0.0.0 # tambahan untuk Remote Akses | ||
+ | Environment=PORT=8080 # tambahan untuk Remore Akses | ||
+ | ExecStart=/usr/bin/node server/index.js | ||
+ | Restart=always | ||
+ | RestartSec=2 | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | Restart | ||
+ | systemctl daemon-reload | ||
+ | systemctl restart open5gs-webui | ||
+ | systemctl enable open5gs-webui | ||
+ | systemctl status open5gs-webui | ||
+ | ● open5gs-webui.service - Open5GS WebUI | ||
+ | Loaded: loaded (/lib/systemd/system/open5gs-webui.service; enabled; vendor preset: enabled) | ||
+ | Active: active (running) since Sun 2023-07-23 04:19:06 UTC; 6s ago | ||
+ | Main PID: 51827 (node) | ||
+ | Tasks: 11 (limit: 10656) | ||
+ | Memory: 58.6M | ||
+ | CPU: 1.264s | ||
+ | CGroup: /system.slice/open5gs-webui.service | ||
+ | └─51827 /usr/bin/node server/index.js | ||
+ | |||
+ | Jul 23 04:19:06 server2204 systemd[1]: Started Open5GS WebUI. | ||
+ | Jul 23 04:19:08 server2204 node[51827]: > Ready on http://0.0.0.0:8080 | ||
+ | Default URL http://localhost:3000 | ||
+ | Setelah diubah menjadi URL http://ip-address:8080 - untuk remote akses | ||
+ | Administrator Account [Username:admin, Password:1423] | ||
==Pranala Menarik== | ==Pranala Menarik== | ||
* [[5G]] | * [[5G]] |
Latest revision as of 14:29, 4 August 2023
Untuk mengoperasikan Open5gs direkomendasi menggunakan sistem operasi Ubuntu 22.04. Berikut adalah langkah yang perlu di lakukan untuk mendownload dan menginstalasi open5gs.
Asumsi Konfigurasi
- OS Ubuntu 22.04
- Open5GS & IMS satu mesin
- Satu Interface enp0s3
- IP Statik 192.168.0.4/24 gateway 192.168.0.222
- MCC 999 MNC 70
Setup IP Statik
Edit
vi /etc/netplan/00-installer-config.yaml
Pastikan,
# This is the network config written by 'subiquity' # network: # ethernets: # enp0s3: # dhcp4: true # version: 2 network: version: 2 renderer: networkd ethernets: enp0s3: addresses: - 192.168.0.4/24 nameservers: addresses: [8.8.8.8, 8.8.4.4] routes: - to: default via: 192.168.0.222
Install aplikasi pendukung
sudo apt update sudo apt upgrade sudo apt install -y software-properties-common
Install MongoDB
Import public key
sudo apt update sudo apt install -y gnupg curl curl -fsSL https://pgp.mongodb.com/server-6.0.asc | \ sudo gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg \ --dearmor
Buat file
/etc/apt/sources.list.d/mongodb-org-6.0.list
Di Ubuntu 22.04 (Jammy)
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
Install MongoDB
sudo apt update sudo apt install -y mongodb-org sudo apt install -y mongodb # Ubuntu 18.04
Restart, Enable, cek status Ubuntu 18.04
sudo systemctl start mongodb # Ubuntu 18.04 sudo systemctl enable mongodb # Ubuntu 18.04 sudo systemctl status mongodb # Ubuntu 18.04
Restart, Enable, cek status Ubuntu 22.04
sudo systemctl start mongod sudo systemctl enable mongod sudo systemctl status mongod
Tip: MongoDB digunakan sebagai database untuk NRF/PCF/UDR dan PCRF/HSS.
Install 5G
Tambahkan Open5gs ke repository yang ada di sistem operasi,
sudo add-apt-repository ppa:open5gs/latest
Instalasi Open5gs
sudo apt update sudo apt install -y open5gs
Restart, Enable
sudo systemctl start open5gs-amfd sudo systemctl start open5gs-ausfd sudo systemctl start open5gs-bsfd sudo systemctl start open5gs-hssd sudo systemctl start open5gs-mmed sudo systemctl start open5gs-nrfd sudo systemctl start open5gs-nssfd sudo systemctl start open5gs-pcfd sudo systemctl start open5gs-pcrfd sudo systemctl start open5gs-scpd sudo systemctl start open5gs-sgwcd sudo systemctl start open5gs-sgwud sudo systemctl start open5gs-smfd sudo systemctl start open5gs-udmd sudo systemctl start open5gs-udrd sudo systemctl start open5gs-upfd
sudo systemctl enable open5gs-amfd sudo systemctl enable open5gs-ausfd sudo systemctl enable open5gs-bsfd sudo systemctl enable open5gs-hssd sudo systemctl enable open5gs-mmed sudo systemctl enable open5gs-nrfd sudo systemctl enable open5gs-nssfd sudo systemctl enable open5gs-pcfd sudo systemctl enable open5gs-pcrfd sudo systemctl enable open5gs-scpd sudo systemctl enable open5gs-sgwcd sudo systemctl enable open5gs-sgwud sudo systemctl enable open5gs-smfd sudo systemctl enable open5gs-udmd sudo systemctl enable open5gs-udrd sudo systemctl enable open5gs-upfd
Install WebUI Open5GS
WebUI memungkinkan Anda mengedit data pelanggan secara interaktif. Meskipun tidak penting untuk menggunakan ini, itu membuat segalanya lebih mudah ketika Anda baru memulai petualangan Open5GS Anda. (Tool command line tersedia untuk advanced user).
Node.js diperlukan untuk menginstal WebUI Open5GS
Distribusi Linux berbasis Debian dan Ubuntu dapat menginstal Node.js sebagai berikut:
sudo apt update sudo apt upgrade sudo apt install curl curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt install -y gcc g++ make sudo apt install -y nodejs
ERROR
Error Ubuntu 18.04 saat instalasi WebUI versi libc6 yang ada kurang tinggi
The following packages have unmet dependencies: nodejs : Depends: libc6 (>= 2.28) but 2.27-3ubuntu1.6 is to be installed E: Unable to correct problems, you have held broken packages.
Install yarn
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt install -y yarn
Install WebUI Open5GS.
curl -fsSL https://open5gs.org/open5gs/assets/webui/install | sudo -E bash -
Agar bisa di akses dari Remote PC. Edit
cd /etc/systemd/system/multi-user.target.wants vi open5gs-webui.service
Pastikan
[Unit] Description=Open5GS WebUI Wants=mongodb.service mongod.service [Service] Type=simple WorkingDirectory=/usr/lib/node_modules/open5gs Environment=NODE_ENV=production Environment=HOSTNAME=0.0.0.0 # tambahan untuk Remote Akses Environment=PORT=8080 # tambahan untuk Remore Akses ExecStart=/usr/bin/node server/index.js Restart=always RestartSec=2 [Install] WantedBy=multi-user.target
Restart
systemctl daemon-reload systemctl restart open5gs-webui systemctl enable open5gs-webui systemctl status open5gs-webui
● open5gs-webui.service - Open5GS WebUI Loaded: loaded (/lib/systemd/system/open5gs-webui.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2023-07-23 04:19:06 UTC; 6s ago Main PID: 51827 (node) Tasks: 11 (limit: 10656) Memory: 58.6M CPU: 1.264s CGroup: /system.slice/open5gs-webui.service └─51827 /usr/bin/node server/index.js Jul 23 04:19:06 server2204 systemd[1]: Started Open5GS WebUI. Jul 23 04:19:08 server2204 node[51827]: > Ready on http://0.0.0.0:8080
Default URL http://localhost:3000 Setelah diubah menjadi URL http://ip-address:8080 - untuk remote akses Administrator Account [Username:admin, Password:1423]