1、环境准备
- Debian 11.* 桌面版(个人喜欢 KDE ),以下所有步骤都基于Debian系统上操作
- 安装 jetbrains clion (自行激活)
2、安装依赖,注:使用root用户
# step 1: 切换 root 用户
su root
# step 2: 输入root 密码
# step 3: 执行以下命令
apt-get update -y
apt-get install -y git sngrep vim gnupg2 wget lsb-release
# pat_1X8EQXH6EvgajWaBVWSJCG51 是在Signalwire网站上注册账号配置的TOKEN
wget --http-user=signalwire --http-password=pat_1X8EQXH6EvgajWaBVWSJCG51 -O /usr/share/keyrings/signalwire-freeswitch-repo.gpg https://freeswitch.signalwire.com/repo/deb/debian-release/signalwire-freeswitch-repo.gpg
echo "machine freeswitch.signalwire.com login signalwire password pat_1X8EQXH6EvgajWaBVWSJCG51" > /etc/apt/auth.conf
echo "deb [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ `lsb_release -sc` main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb-src [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ `lsb_release -sc` main" >> /etc/apt/sources.list.d/freeswitch.list
# Install dependencies required for the build
apt-get update -y && apt-get build-dep freeswitch -y
3、Clone FreeSWITCH源码;注:不用使用root用户
# 在当前Linux用户`dev`,创建目录:/home/dev/Work/github
mkdir -p ~/Work/github
# 进入 /home/dev/Work/github
cd ~/Work/github
# Clone FreeSWITCH源码
git clone https://github.com/signalwire/freeswitch.git
4、项目初始化;注:不用使用root用户
# step 1: FreeSWITCH源码目录执行(/home/dev/Work/github/freeswitch)
./bootstrap.sh
# step 2:prefix指定目录安装(FreeSWITCH源码目录下的`All/Debug`)
./configure --prefix=/home/dev/Work/github/freeswitch/All/Debug
# step 3:编译安装
make -j && make -j install
5、clion 项目导入
step 1: 在clion界面上点击`Open`图标.png
step 2: 选择FreeSWITCH源码目录,点击`OK` .png
step 5: 运行前配置make install