Browse Source

Merge branch '4.3-postgres' of https://github.com/kageds/kazoo-configs-kamailio into 4.3-postgres

pull/2/head
Alan R Evans 5 years ago
parent
commit
e8d4fc4570
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      POSTGRES.md

+ 4
- 4
POSTGRES.md View File

@ -29,11 +29,11 @@ sudo service postgresql-12 start
```
Create Kamailio DB
```
su postgres -c '/usr/pgsql-12/bin/createdb kamailio'
su - postgres -c '/usr/pgsql-12/bin/createdb kamailio'
```
Add DB user and grant privileges
```
sudo su postgres -c psql
sudo su - postgres -c psql
CREATE USER kamailio WITH PASSWORD 'kamailio';
GRANT ALL privileges on database kamailio to kamailio;
```
@ -50,7 +50,7 @@ host all all ::1/128 password
```
Increase the max number of connections and shared memory
```
vi /var/lib/pgsql/12/data/postgres.conf
vi /var/lib/pgsql/12/data/postgresql.conf
shared_buffers = 256MB
max_connections = 500
@ -68,7 +68,7 @@ git checkout 4.3-postgres
```
Initialize the kamailio database with all the required tables:
```
psql -U kamailio -d postgres://kamailio:kamailio@127.0.0.1/kamailio -f /etc/kazoo/kamailo/db_scripts/kamailio_initdb_postgres.sql
psql -U kamailio -d postgres://kamailio:kamailio@127.0.0.1/kamailio -f /etc/kazoo/kamailio/db_scripts/kamailio_initdb_postgres.sql
```
Notice that the backend DB in local.cfg is now postgres
```


Loading…
Cancel
Save