CentOS7中安装:
安装依赖:
yum -y install gcc make
yum -y install ncurses ncurses-devel bison flex lynx
git clone https://github.com/redis/hiredis.git
make & make install
mysql安装:https://blog.csdn.net/chunzhenzyd/article/details/87008612
下载安装:
git clone -b 2.4 https://github.com/OpenSIPS/opensips.git opensips_2_4
cd opensips_2_4/
make menuconfig (添加编译组件redis,mysql)
修改配置:
[/usr/local/etc/opensips/opensips.cfg]
[/usr/local/etc/opensips/opensipsctlrc]
SIP_DOMAIN=192.168.17.53
NOTICE: 如果密码不为opensipsrw,那么配置文件中也需要改动密码。
由于使用的是mysql8,所以脚本里需要改动:
[/usr/local/lib64/opensips/opensipsctl/opensipsdbctl.mysql]
if [ "$DBROOTUSER" != "$DBRWUSER" ] ; then
sql_query "" "
CREATE USER '$DBRWUSER'@'%' IDENTIFIED BY '$DBRWPW';
GRANT ALL PRIVILEGES ON $1.* TO '$DBRWUSER'@'%';
ALTER user '$DBRWUSER'@'%' IDENTIFIED WITH mysql_native_password BY '$DBRWPW';
"
fi
# GRANT ALL PRIVILEGES ON $1.* TO '$DBRWUSER' IDENTIFIED BY '$DBRWPW';
# GRANT ALL PRIVILEGES ON $1.* TO '${DBRWUSER}'@'$DBHOST' IDENTIFIED BY '$DBRWPW';
即将mysql5 GRANT语句改成mysql8 语句
创建数据库:
opensipsdbctl create
运行:
opensipsctl start
客户端
Linphone: http://www.linphone.org/