...
Just my blog

Blog about everything, mostly about tech stuff I made. Here is the list of stuff I'm using at my blog. Feel free to ask me about implementations.

Soft I recommend
Py lib I recommend

I'm using these libraries so you can ask me about them.

PostgreSQL first run

This is the most common issue for PostgreSQL first run in Linux env: configure the server to allow TCP/IP connections postgresql server it can produce PostgeSQL cannot connect to database host Here I'll show how to fix it before you struggle with firewall and ports: I've found ot here: 17.3. Starting the Database Server and How Do I Enable remote access to PostgreSQL database server? My situation:

vi /var/lib/pgsql/data/pg_hba.conf

add the string:

host all all 10.10.29.0/24 trust

Postgresql_start with my range and next config:

vi /var/lib/pgsql/data/postgresql.conf

add the string:

listen_addresses='*'

Postgresql_start_ipall After that restart the service:

systemctl restart postgresql.service

also you can use an old 'service postgresql restart'

[root@centst010 ~]# service postgresql restart
Redirecting to /bin/systemctl restart  postgresql.service

And here it is:

[root@centst010 ~]# netstat -anp | grep 5432
tcp        0      0 0.0.0.0:5432            0.0.0.0:*               LISTEN
tcp        0      0 192.168.1.40:5432       192.168.1.22:65369      ESTABLISHED
tcp6       0      0 :::5432                 :::*                    LISTEN