最近安装了一下openggsn-0.92来模拟gtp消息,这边做简单记录一下:
(1)下载openggsn源码文件:
https://github.com/osmobuntu/openggsn
进行解压,进入文件夹
(2)这里需要使用automake工具来生成makefile文件,ubuntu下直接安装即可
apt-get install automake
(3)编译源码
root@Client5:~/openggsn-master# autoscan
root@Client5:~/openggsn-master# aclocal
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
aclocal: warning: couldn't open directory 'm4': No such file or directory
提示的warning暂时不管它
root@Client5:~/openggsn-master# autoconf
root@Client5:~/openggsn-master# autoheader
root@Client5:~/openggsn-master# automake -a
提示如下错误:
configure.in:24: error: required file './ltmain.sh' not found
只需配置一下libtoolsize
root@Client5:~/openggsn-master# libtoolize
继续执行:
root@Client5:~/openggsn-master# automake -a
root@Client5:~/openggsn-master# ./configure
root@Client5:~/openggsn-master# make
root@Client5:~/openggsn-master# make install
即可完成安装。
ggsn: error while loading shared libraries: libgtp.so.0: cannot open shared object file: No such file or directory
执行一下动态库的链接命令
root@Client5:~/openggsn-master# ldconfig
root@Client5:~/openggsn-master# ggsn -h
openggsn 0.91
Usage: openggsn [OPTIONS]...
-h, --help Print help and exit
-V, --version Print version and exit
-f, --fg Run in foreground (default=off)
-d, --debug Run in debug mode (default=off)
-c, --conf=STRING Read configuration file (default=`/etc/ggsn.conf')
--pidfile=STRING Filename of process id file
(default=`/var/run/ggsn.pid')
--statedir=STRING Directory of nonvolatile data
(default=`/var/lib/ggsn/')
-l, --listen=STRING Local interface
-n, --net=STRING Network (default=`192.168.0.0/24')
--ipup=STRING Script to run after link-up
--ipdown=STRING Script to run after link-down
--dynip=STRING Dynamic IP address pool
--statip=STRING Static IP address pool
--pcodns1=STRING PCO DNS Server 1 (default=`0.0.0.0')
--pcodns2=STRING PCO DNS Server 2 (default=`0.0.0.0')
--timelimit=INT Exit after timelimit seconds (default=`0')
-a, --apn=STRING Access point name (default=`internet')
-q, --qos=INT Requested quality of service (default=`0x0b921f')
到此安装结束