WSL ping 主机解决:
管理员运行:
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL (Hyper-V firewall))" -Action Allow
自动安装
apt install
opensips-http-modules
opensips-mysql-module
opensips-postgres-module
opensips-json-module
opensips-wss-module
opensips-tls-module
opensips-tcp-module
手动安装
https://www.php.cn/faq/66993.html
git clone 3.4.9版本
根据模块需要安装:
apt-get install build-essential gcc make autoconf
apt-get install bison flex
apt-get install libncurses5-dev ncurses-dev #图像界面需要
apt-get install libmysqlclient20 libmysqlclient21 libmysqlclient-dev #mysql需要
apt-get install mysql-client mysql-server #mysql需要
apt-get install libpq5 libpq-dev postgresql-all postgresql postgresql-client #pg需要
apt-get install libssl-dev #tls需要
apt-get install libmicrohttpd libmicrohttpd-dev #httpd需要
apt-get install libwolfssl-dev #tls_wolfssl模块需要
apt-get install uuid-dev #uuid需要
找不到deb就去panfind.ubuntu.org去找
dpkg -l|grep xxx
dpkg -r xx.deb
dpkg -i xx.deb
MySQL URL格式如下 mysql://username:password@domain/dbname
opensips支持mysql数据库,在编译安装的时候,就要支持mysql模块。方法如下:
修改opensips中的Makefile.conf,在exclude_modules中去掉db_mysql,在include_modules中
添加db_mysql,
make include_modules="db_mysql" modules prefix=/usr/local/
注:如果直接使用apt install opensips-* 容易报错不易安装。常用的就是httpd和wss,直接安装相关模块即可。
make menuconfig
db_mysql #http数据库,这里不需要,只要下面模块
db_postgres
proto_tls
proto_wss
tls_openssl
tls_wolfssl
uuid
httpd
You have enabled the ‘db_mysql’ module, so please install ‘ development libraries of mysql-client , typically libmysqlcl
You have enabled the ‘proto_tls’ module, so please install ‘ SSL development library, typically libssl-dev’
You have enabled the ‘proto_wss’ module, so please install ‘ SSL development library, typically libssl-dev’
You have enabled the ‘tls_openssl’ module, so please install ‘ SSL development library, typically libssl-dev’
You have enabled the ‘tls_wolfssl’ module, so please install ”
You have enabled the ‘uuid’ module, so please install ‘ uuid-dev’
根据提示安装
mysql-client
libmysqlclient
libssl-dev
libmicrohttpd
libwolfssl-dev
前缀写’/usr/local/’
save会生成Makefile.conf文件,cat Makefile.conf
然后
make
make install
出现make: ‘opensips’ is up to date.
或者报错漏安装需要make clean
重新make和make install
wolfssl报找不到autogen.sh
git clone https://github.com/wolfSSL/wolfssl.git
cd wolfssl
把所有的文件拷到module/tls_wolfssl目录下
./autogen.sh
./configure –enable-opensslextra –enable-stunnel
make
make install
或者用openssl,二选一
这里先取消 wolfssl模块,安装通过
apt install opensips-cli
vim ~/.opensips-cli.cfg
[default]
log_level: WARNING
prompt_name: opensips-cli
prompt_intro: Welcome to OpenSIPS Command Line Interface!
prompt_emptyline_repeat_cmd: False
history_file: ~/.opensips-cli.history
history_file_size: 1000
output_type: pretty-print
fifo_file: /tmp/opensips_fifo
communication_type: http
database_modules: acc clusterer dialog dialplan dispatcher domain rtpproxy usrloc
database_modules: ALL
管理员账号连接串,自行修改
database_admin_url: mysql://root:123456@localhost:3306
普通账户连接串,自行修改
database_url: mysql://root:123456@localhost:3306
database_name: opensips
修改成 opensips 源码路径下的scripts
database_schema_path: /mnt/e/opensips/opensips-3.4.9/scripts
有需要联系QQ:82658400
转载请注明:SuperIT » opensip 3.4.9编译安装