freeswitch是一款简单好用的VOIP开源软交换平台。
centos7 docker上编译安装fs的流程记录。
docker engine:Version 24.0.6
centos docker:7
freeswitch:v1.6.19
docker hub拉取centos镜像。
sudo docker pull centos:7
启动docker容器,版本使用centos7。
sudo docker run -itd --name centos.7-fs.1.6.19-compile.1.1 centos:7
进入docker容器。
sudo docker exec -it centos.7-fs.1.6.19-compile.1.1 bash
更新系统。
cd /root/
cat /etc/redhat-release
yum update
安装fs依赖。
yum install -y centos-release-scl centos-release-scl-rh
yum install -y scl-utils scl-utils-build yum-utils
yum install -y devtoolset-9-gcc
echo "signalwireusername" > /etc/yum/vars/signalwireusername
echo "TOKEN" > /etc/yum/vars/signalwiretoken
yum install -y https://$(< /etc/yum/vars/signalwireusername):$(< /etc/yum/vars/signalwiretoken)@freeswitch.signalwire.com/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm
yum install -y epel-release
yum-builddep -y freeswitch --skip-broken
yum install -y autoconf automake libtool gcc-c++ ncurses-devel make zlib-devel libjpeg-devel yasm nasm libevent-devel
yum install -y openssl-devel e2fsprogs-devel curl-devel pcre-devel speex-devel sqlite-devel mysql-devel
yum install -y ldns-devel libedit-devel lua-devel libsndfile-devel libshout-devel lame-devel
yum install -y which git
ln -s /usr/lib64/ilbc2/libilbc.so.0 /usr/lib64/libilbc.so.0
下载fs。
git clone https://github.com/signalwire/freeswitch.git -bv1.16.19 freeswitch
cd freeswitch
编译安装。
chmod 775 -R *
sh support-d/prereq.sh
./bootstrap.sh -j
./configure
make
make install
清理多余的文件。
yum clean all
rm -rf /var/cache/yum
rm -rf /root/freeswitch-1.6.19
制作镜像。
sudo docker commit -m="centos.7-fs.1.6.19-release" -a="zr" centos.7-fs.1.6.19-compile? 10.55.55.136:5000/zr/centos.7-fs.1.6.19-release:v1.2
上传镜像到registry。
sudo docker images
sudo docker push 10.55.55.136:5000/zr/centos.7-fs.1.6.19-release:v1.2
下载镜像。
sudo docker pull 10.55.55.136:5000/zr/centos.7-fs.1.6.19-release:v1.2
启动容器release。
sudo docker run -itd --net=host -v /usr/local/freeswitch/conf:/usr/local/freeswitch/conf -v /usr/local/freeswitch/log:/usr/local/freeswitch/log -v /usr/local/freeswitch/recordings:/usr/local/freeswitch/recordings --name centos.7-fs.1.6.19-as 10.55.55.136:5000/zr/centos.7-fs.1.6.19-release:v1.2 /usr/local/freeswitch/bin/freeswitch -nonat -nosql -nonatmap -nocal -nort
sudo docker logs centos.7-fs.1.6.19-as
sudo docker exec -it centos.7-fs.1.6.19-as /usr/local/freeswitch/bin/fs_cli -x status
sudo docker rm -f centos.7-fs.1.6.19-as
centos系统后续的维护问题需要关注。
Debian系统的依赖包大多比较新,比centos要友好。
Debian和rocky的方向需要验证和抉择一下。
空空如常
求真得真