ubuntu16.04.3配置freeswitch1.6使用PostgreSQL
来源:互联网 发布:待业在家知乎 编辑:程序博客网 时间:2024/05/16 19:34
安装 PostgreSQL
sudo apt-get -y install postgresql
创建存放表空间目录
sudo mkdir -p /usr/local/freeswitch/db/psdbsudo chown postgres:postgres /usr/local/freeswitch/db/psdb
修改监听IP
sudo vim /etc/postgresql/9.5/main/postgresql.conf
做如下修改
listen_addresses = '*'
对所有网段全开放:
sudo vim /etc/postgresql/9.5/main/pg_hba.conf#IPV4host all all 0.0.0.0/0 md5#IPV6host all all ::/0 md5
重启ps
sudo /etc/init.d/postgresql restart
修改PostgreSQL密码
sudo su - postgres postgres@ubuntu:~$ psqlpostgres@ubuntu:~$ psqlpsql (9.5.8)Type "help" for help.postgres=# \passwordEnter new password: Enter it again:
建数据库
创建角色postgres=# create role freeswitch createdb createrole login password '123456';创建表空间postgres=# create tablespace freeswitch_space owner freeswitch location '/usr/local/freeswitch/db/psdb';CREATE TABLESPACE切换角色并创建数据库postgres=# set session authorization freeswitch;SETpostgres=> create database freeswitch_core tablespace freeswitch_space ;CREATE DATABASEpostgres=> create database sofia_reg_internal tablespace freeswitch_space ;CREATE DATABASEpostgres=> create database sofia_reg_external tablespace freeswitch_space ;CREATE DATABASEpostgres=> create database sofia_reg_internal6 tablespace freeswitch_space ;CREATE DATABASEpostgres=> create database sofia_reg_external6 tablespace freeswitch_space ;CREATE DATABASEpostgres=> create database call_limit tablespace freeswitch_space ;CREATE DATABASEpostgres=> create database fifo tablespace freeswitch_space ;CREATE DATABASE建立新用户、角色postgres=> create user freeswitch_core password '123456' createdb;CREATE ROLEpostgres=> 使用新用户登入freeswitch_core数据库postgres=> \qpostgres@ubuntu:~$ psql -U freeswitch_core -h localhost -d freeswitch_core
修改fs配置后重启
sudo vim /usr/local/freeswitch/conf/autoload_configs/switch.conf.xml<param name="core-db-dsn" value="pgsql://hostaddr='127.0.0.1' dbname='freeswitch_core' user='freeswitch_core' password='123456' options='-c client_min_messages=NOTICE' application_name='freeswitch'" /> sudo vim /usr/local/freeswitch/conf/sip_profiles/internal.xml <param name="odbc-dsn" value="pgsql://hostaddr='127.0.0.1' dbname='sofia_reg_internal' user=freeswitch password='123456' options='-c client_min_messages=NOTICE' application_name='freeswitch'" />sudo vim /usr/local/freeswitch/conf/sip_profiles/internal-ipv6.xml <param name="odbc-dsn" value="pgsql://hostaddr='127.0.0.1' dbname='sofia_reg_internal6' user=freeswitch password='123456' options='-c client_min_messages=NOTICE' application_name='freeswitch'" />sudo vim /usr/local/freeswitch/conf/sip_profiles/external.xml <param name="odbc-dsn" value="pgsql://hostaddr='127.0.0.1' dbname='sofia_reg_external' user=freeswitch password='123456' options='-c client_min_messages=NOTICE' application_name='freeswitch'" />sudo vim /usr/local/freeswitch/conf/sip_profiles/external-ipv6.xml <param name="odbc-dsn" value="pgsql://hostaddr='127.0.0.1' dbname='sofia_reg_external6' user=freeswitch password='123456' options='-c client_min_messages=NOTICE' application_name='freeswitch'" />sudo vim /usr/local/freeswitch/conf/autoload_configs/db.conf.xml<param name="odbc-dsn" value="pgsql://hostaddr='127.0.0.1' dbname='call_limit' user=freeswitch password='123456' options='-c client_min_messages=NOTICE' application_name='freeswitch'" />sudo vim /usr/local/freeswitch/conf/autoload_configs/fifo.conf.xml<settings><param name="odbc-dsn" value="pgsql://hostaddr='127.0.0.1' dbname='fifo' user=freeswitch password='123456' options='-c client_min_messages=NOTICE' application_name='freeswitch'" /></settings>
阅读全文
0 0
- ubuntu16.04.3配置freeswitch1.6使用PostgreSQL
- ubuntu16.04 freeswitch1.6使用odbc
- windows配置freeswitch1.6使用mysql
- freeswitch1.6 录音功能
- ubuntu下安装freeswitch1.6
- ubuntu16.04 编译freeswitch1.9的视频mod_av模块
- postgresql 内存使用配置
- Ubuntu16.04配置使用deepnlp
- freeSwitch1.7+vBilling centos6.6 mini install
- ubuntu16.4安装postgresql
- PostgreSQL-Linux配置使用记录
- ubuntu16.04配置php5.6
- ubuntu16.04安装、配置、使用tftp
- ubuntu16.04输入法使用,fcitx输入法配置
- ubuntu16.04使用EAP配置802.1x
- centos7下安装freeswitch1.6版本,亲测可行
- debian8中将freeswitch1.6的 core数据库换成mysql
- freeswitch系列一 在debian中安装freeswitch1.6
- 机器学习之决策树算法python实现
- 2-1 2-2 2-3 2-4 2-5 2-6 2-7: Model regression and Cost function
- 环境变量配置
- activiti学习--08 连线
- OJ 2597: 编程题B-选拔飞行员
- ubuntu16.04.3配置freeswitch1.6使用PostgreSQL
- 【预习笔记】读几个Java集合类源代码—ArrayList
- python异常处理
- 用ipython的好处
- Ubuntu 搭建VPN(PPTP)并开机自启
- C# 装箱和拆箱
- BZOJ2286: [Sdoi2011]消耗战(虚树)
- screen 命令使用
- HDU