... | ... | @@ -34,21 +34,86 @@ Check build types with './build_amf -h' |
|
|
ubuntu@test-amf:~/oai-cn5g-amf/build/scripts$ ./build_amf -c -V -b Debug -j
|
|
|
```
|
|
|
|
|
|
## AMF Configuration
|
|
|
# MySQL Installation
|
|
|
At this stage, AMF does not support authentication/authorization procedures via UDM/AUSF. These procedures are implemented locally in AMF. Also, we relied on a MySQL database to store the user information. This DB can be deployed in a separated machine or in the same machine with AMF.
|
|
|
|
|
|
|
|
|
## AMF Configuration
|
|
|
|
|
|
**Create AMF configuration files**
|
|
|
Update information in the script `build/scripts/generate_amf_conf.sh` according to your configuration and then generate the configuration file for AMF (`/usr/local/etc/oai/amf.conf`).
|
|
|
|
|
|
Update information in the script `build/scripts/generate_amf_conf.sh` according to your configuration
|
|
|
|
|
|
```
|
|
|
ubuntu@test-amf:~/oai-cn5g-amf/build/scripts$ ./generate_amf_conf.sh
|
|
|
# prompt has been removed for easier Ctrl+C Ctrl+V
|
|
|
# please update the following information according to your configuration
|
|
|
|
|
|
INSTANCE=1
|
|
|
PREFIX='/usr/local/etc/oai'
|
|
|
sudo mkdir -m 0777 -p $PREFIX
|
|
|
cp ../../etc/amf.conf $PREFIX
|
|
|
|
|
|
declare -A AMF_CONF
|
|
|
|
|
|
AMF_CONF[@INSTANCE@]=$INSTANCE
|
|
|
AMF_CONF[@PREFIX@]=$PREFIX
|
|
|
AMF_CONF[@PID_DIRECTORY@]='/var/run'
|
|
|
|
|
|
AMF_CONF[@MCC@]='208'
|
|
|
AMF_CONF[@MNC@]='95'
|
|
|
AMF_CONF[@REGION_ID@]='128'
|
|
|
AMF_CONF[@AMF_SET_ID@]='1'
|
|
|
|
|
|
AMF_CONF[@SERVED_GUAMI_MCC_0@]='208'
|
|
|
AMF_CONF[@SERVED_GUAMI_MNC_0@]='95'
|
|
|
AMF_CONF[@SERVED_GUAMI_REGION_ID_0@]='128'
|
|
|
AMF_CONF[@SERVED_GUAMI_AMF_SET_ID_0@]='1'
|
|
|
AMF_CONF[@SERVED_GUAMI_MCC_1@]='460'
|
|
|
AMF_CONF[@SERVED_GUAMI_MNC_1@]='11'
|
|
|
AMF_CONF[@SERVED_GUAMI_REGION_ID_1@]='10'
|
|
|
AMF_CONF[@SERVED_GUAMI_AMF_SET_ID_1@]='1'
|
|
|
|
|
|
AMF_CONF[@PLMN_SUPPORT_MCC@]='208'
|
|
|
AMF_CONF[@PLMN_SUPPORT_MNC@]='95'
|
|
|
AMF_CONF[@PLMN_SUPPORT_TAC@]='0xa000'
|
|
|
AMF_CONF[@SST_0@]='222'
|
|
|
AMF_CONF[@SD_0@]='123'
|
|
|
AMF_CONF[@SST_1@]='1'
|
|
|
AMF_CONF[@SD_1@]='12'
|
|
|
|
|
|
AMF_CONF[@AMF_INTERFACE_NAME_FOR_NGAP@]='ens3'
|
|
|
AMF_CONF[@AMF_INTERFACE_NAME_FOR_N11@]='ens3'
|
|
|
|
|
|
AMF_CONF[@SMF_INSTANCE_ID_0@]='1'
|
|
|
AMF_CONF[@SMF_IPV4_ADDR_0@]='192.168.122.1'
|
|
|
AMF_CONF[@SMF_HTTP_VERSION_0@]='v1'
|
|
|
AMF_CONF[@SMF_INSTANCE_ID_1@]='2'
|
|
|
AMF_CONF[@SMF_IPV4_ADDR_1@]='192.168.122.2'
|
|
|
AMF_CONF[@SMF_HTTP_VERSION_1@]='v1'
|
|
|
|
|
|
|
|
|
AMF_CONF[@MYSQL_SERVER@]='127.0.0.1'
|
|
|
AMF_CONF[@MYSQL_USER@]='root'
|
|
|
AMF_CONF[@MYSQL_PASS@]='linux'
|
|
|
AMF_CONF[@MYSQL_DB@]='oai_db'
|
|
|
AMF_CONF[@OPERATOR_KEY@]='63bfa50ee6523365ff14c1f45f88737d'
|
|
|
|
|
|
for K in "${!AMF_CONF[@]}"; do
|
|
|
egrep -lRZ "$K" $PREFIX | xargs -0 -l sed -i -e "s|$K|${AMF_CONF[$K]}|g"
|
|
|
ret=$?;[[ ret -ne 0 ]] && echo "Tried to replace $K with ${AMF_CONF[$K]}"
|
|
|
done
|
|
|
|
|
|
```
|
|
|
Then, generate the configuration file for AMF (`/usr/local/etc/oai/amf.conf`) by executing the following command
|
|
|
|
|
|
# MySQL Installation
|
|
|
At this stage, AMF does not support authentication/authorization procedures via UDM/AUSF. These procedures are implemented locally in AMF. Also, we relied on a MySQL database to store the user information. This DB can be deployed in a separated machine or in the same machine with AMF.
|
|
|
```
|
|
|
ubuntu@test-amf:~/oai-cn5g-amf/build/scripts$ ./generate_amf_conf.sh
|
|
|
```
|
|
|
|
|
|
# Launch AMF
|
|
|
|
|
|
After that, you can launch AMF by executing the following command
|
|
|
|
|
|
```
|
|
|
ubuntu@test-amf:~/oai-cn5g-amf/build/scripts$ sudo amf -c /usr/local/etc/oai/amf.conf -o
|
|
|
```
|
... | ... | |