ubuntu16.04 freeswitch1.6使用odbc
来源:互联网 发布:淘宝3c认证可以用其他 编辑:程序博客网 时间:2024/05/17 06:36
1、安装MySQL
apt-get install mysql-server mysql-client
修改配置,监听所有
vim /etc/mysql/mysql.conf.d/mysqld.cnfbind-address =0.0.0.0
重启
/etc/init.d/mysql restart
建立数据库
# mysql -u root -pEnter password: Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 5Server version: 5.7.19-0ubuntu0.16.04.1 (Ubuntu)Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> CREATE USER 'freeswitch'@'%' IDENTIFIED BY '123456'; Query OK, 0 rows affected (0.00 sec)mysql> create database sofia_internal;Query OK, 1 row affected (0.00 sec)mysql> create database freeswitch;Query OK, 1 row affected (0.00 sec)mysql> grant all privileges on sofia_internal.* to 'freeswitch'@'%';Query OK, 0 rows affected (0.00 sec)mysql> grant all privileges on freeswitch.* to 'freeswitch'@'%';Query OK, 0 rows affected (0.00 sec)mysql>
2、安装ODBC
apt-get install unixodbc-dev
下载mysql的ubuntu odbc驱动
https://dev.mysql.com/downloads/connector/odbc/
解压后,拷贝lib里面的.so到/usr/lib/x86_64-linux-gnu/odbc/
在解压的bin里面,执行
./myodbc-installer -d -a -n "MySQL ODBC 5.3 Unicode Driver" -t "DRIVER=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc5w.so;SETUP=/usr/lib/x86_64-linux-gnu/odbc/myodbc5S.so"./myodbc-installer -d -a -n "MySQL ODBC 5.3 ANSI Driver" -t "DRIVER=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc5a.so;SETUP=/usr/lib/x86_64-linux-gnu/odbc/lmyodbc5S.so"
或直接在/etc/odbcinst.ini增加
[MySQL ODBC 5.3 Unicode Driver]Driver=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc5w.soSETUP=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc5S.soUsageCount=1[MySQL ODBC 5.3 ANSI Driver]Driver=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc5a.soSETUP=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc5S.soUsageCount=1
3、配置ODBC
vi /etc/odbc.ini加入
[freeswitch]Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc5w.soDATABASE = freeswitchDESCRIPTION = freeswitch coreSERVER = 127.0.0.1UID = freeswitchPASSWORD = 123456PORT = 3306SOCKET =[sofia_internal]Driver =/usr/lib/x86_64-linux-gnu/odbc/libmyodbc5w.soDATABASE = sofia_internalDESCRIPTION = sofia internalSERVER = 127.0.0.1UID = freeswitchPASSWORD = 123456PORT = 3306SOCKET =
- 测试连接
isql -v freeswitch
6、指定数据库连接
修改conf\autoload_configs\switch.conf 中的core-db-dsn
<param name="core-db-dsn" value="odbc://freeswitch:freeswitch:123456"/>
conf/sip_profiles/internal.xml中
<param name="odbc-dsn" value="odbc://sofia_internal:freeswitch:123456"/>
说明:odbc://连接方式
freeswitch:数据库名
freeswitch:用户名
123456:密码
阅读全文
0 0
- ubuntu16.04 freeswitch1.6使用odbc
- ubuntu16.04.3配置freeswitch1.6使用PostgreSQL
- ubuntu16.04 编译freeswitch1.9的视频mod_av模块
- windows配置freeswitch1.6使用mysql
- freeswitch1.6 录音功能
- ubuntu下安装freeswitch1.6
- freeSwitch1.7+vBilling centos6.6 mini install
- synergy1.6(windows7+ubuntu16.04)安装使用
- Ubuntu16.04使用vpn
- 使用ubuntu16.04
- ubuntu16.04使用ipv6
- Ubuntu16.04使用笔记
- ubuntu16.04的使用
- centos7下安装freeswitch1.6版本,亲测可行
- debian8中将freeswitch1.6的 core数据库换成mysql
- freeswitch系列一 在debian中安装freeswitch1.6
- Ubuntu16.04 wine的使用
- Ubuntu16.04Kylin使用体验
- 数学建模--数字图像处理(2)--频域变换
- Git学习笔记(7)----标签
- Java基础知识总结
- 求出0~999之间的所有“水仙花数”并输出
- Introduction to Neuroimaging
- ubuntu16.04 freeswitch1.6使用odbc
- DPDK(五):发包工具------pktgen
- <29>——Divide Two Integers
- c++基础数据类型字节数
- netty实战-自定义解码器处理半包消息
- 线程池原理(六):Executors
- Android简单的实现音乐播放器功能(一个按钮可相应两个事件的方法)
- HTML基础入门2
- Python学习笔记·代码复用(函数)