diff --git a/POSTGRES.md b/POSTGRES.md index a9c2035..ec0b92e 100644 --- a/POSTGRES.md +++ b/POSTGRES.md @@ -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 ```