Browse Source

Added more RHEL-specific information for PostgreSQL

ruhnet
Ruel Tmeizeh - RuhNet 8 months ago
parent
commit
37329e7bdb
1 changed files with 32 additions and 7 deletions
  1. +32
    -7
      README.md

+ 32
- 7
README.md View File

@ -35,27 +35,44 @@ apt install -y postgresql-13 postgresql-client-13 postgresql-contrib-13 \
#### RHEL: #### RHEL:
```bash ```bash
dnf module enable postgresql:13
dnf module enable postgresql:13 # RHEL 8
dnf module enable postgresql:16 # RHEL 9
dnf install postgresql-server dnf install postgresql-server
``` ```
## 2. PostgreSQL Configuration ## 2. PostgreSQL Configuration
Initialize the config (only required on RHEL, Debian does it during installation):
```bash
postgresql-setup --initdb
```
Edit PostgreSQL configuration files: Edit PostgreSQL configuration files:
### Configure PostgreSQL access
Edit `pg_hba.conf` to allow access of the DB on 127.0.0.1 with password:
#### Debian:
```bash ```bash
# Configure PostgreSQL access
nano /etc/postgresql/13/main/pg_hba.conf nano /etc/postgresql/13/main/pg_hba.conf
``` ```
Add these lines:
#### RHEL:
```bash
nano /var/lib/pgsql/data/pg_hba.conf
```
Add this line:
``` ```
# IPv4 local connections: # IPv4 local connections:
host all all 127.0.0.1/32 password host all all 127.0.0.1/32 password
``` ```
Configure main PostgreSQL settings:
### Configure main PostgreSQL settings:
#### Debian: #### Debian:
@ -66,10 +83,10 @@ nano /etc/postgresql/13/main/postgresql.conf
#### RHEL: #### RHEL:
```bash ```bash
nano /var/lib/pgsql/data/pg_hba.conf
nano /var/lib/pgsql/data/postgresql.conf
``` ```
### Key settings to update:
##### Key settings to update:
```conf ```conf
# Basic settings # Basic settings
@ -83,15 +100,23 @@ superuser_reserved_connections = 10
# For Kamailio performance # For Kamailio performance
datestyle = 'iso, dmy' datestyle = 'iso, dmy'
timezone = 'UTC' # Or your timezone
timezone = 'UTC'
``` ```
Restart PostgreSQL: Restart PostgreSQL:
#### Debian:
```bash ```bash
systemctl restart postgresql@13-main systemctl restart postgresql@13-main
``` ```
#### RHEL:
```bash
systemctl restart postgresql
```
## 3. Kamailio Installation ## 3. Kamailio Installation
### Add Kamailio Repository ### Add Kamailio Repository


Loading…
Cancel
Save