在 Ubuntu 22.04 上编译 RTKLIB 的 str2str
模块和 Ntrip Caster
安装编译依赖
sudo apt-get update
sudo apt-get install build-essential git
如果遇到以下提示:
libc6-dev : 依赖: libc6 (= 2.35-0ubuntu3) 但是 2.35-0ubuntu3.1 正要被安装
则安装指定版本:
sudo apt-get install libc6=2.35-0ubuntu3
编译str2str
git clone https://github.com/tomojitakasu/RTKLIB.git
cd RTKLIB/app/str2str/gcc
make
编译完成后在当前目录下就能找到可执行文件str2str
编译 Ntrip Caster
本文使用 ntrip caster-2.0.21 版本
cd ntripcaster-2.0.21
chmod +x configure
./configure
make
sudo make install
配置 ntrip caster
# 进入配置目录
cd /usr/local/ntripcaster/conf
# 找出所有以 .dist 结尾的文件
# 全部将它们在复制一份并去掉 .dist 结尾,例如下面的配置文件
sudo cp ntripcaster.conf.dist ntripcaster.conf
# 编辑配置文件
# server name 后面替换为自定义 ip 地址,并屏蔽掉 80 端口
# 默认端口是 2101,默认推流密码 encoder_password 是 letmein
sudo vim ntripcaster.conf
# 修改其它文件
user.aut # 用户密码
groups.aut # 用户组:1. 指定所有组员可提取最大数据流 2. 从某个 ip 地址获取的最大数据流
clientmounts.aut # 用户组对特定挂载点的访问权限
sourcetable.dat # 动态资源表,定义向客户端发送的数据流
启动服务
cd /usr/local/ntripcaster/bin
sudo ./ntripcaster start| restart | stop
参考资料:
BKG Professional NtripCaster Manual