LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   postgres port change problem... (https://www.linuxquestions.org/questions/linux-server-73/postgres-port-change-problem-4175495092/)

Nikhil_Lagwankar 02-16-2014 01:47 AM

postgres port change problem...
 
Hi ,

I'm running CentOS 6 Final version.

PostgreSQL starts with default port number. However when i entered

Code:

port = 5555
in the pg_hba.conf file the postgres fails to start.

The port 5555 is unoccupied also also i have made this port entry in semanage.

Help urgently please !!

yongitz 02-16-2014 03:41 AM

Did you change the port of the init scripts of postgresql into port 5555 as well?

Nikhil_Lagwankar 02-16-2014 03:47 AM

Quote:

Originally Posted by yongitz (Post 5118558)
Did you change the port of the init scripts of postgresql into port 5555 as well?

How do i do that?

yongitz 02-16-2014 03:58 AM

If you are using postgresql 9.1, it should be under /etc/init.d/postgresql-9.1.Change the value of PGPORT to 5555.

Nikhil_Lagwankar 02-19-2014 01:02 AM

Quote:

Originally Posted by yongitz (Post 5118562)
If you are using postgresql 9.1, it should be under /etc/init.d/postgresql-9.1.Change the value of PGPORT to 5555.

I changed the PGPORT value to 5555 , it still doesn't start..

Nikhil_Lagwankar 02-19-2014 01:07 AM

Quote:

Originally Posted by yongitz (Post 5118562)
If you are using postgresql 9.1, it should be under /etc/init.d/postgresql-9.1.Change the value of PGPORT to 5555.


It finally worked when i removed 'port=5555' from pg_hba.conf file.

So does this mean i need not add anything to config file at all and just change the init file to change port ?

yongitz 02-19-2014 02:46 AM

Quote:

Originally Posted by Nikhil_Lagwankar (Post 5120628)
It finally worked when i removed 'port=5555' from pg_hba.conf file.

So does this mean i need not add anything to config file at all and just change the init file to change port ?

Yes and you don't need to put and port config on your pg_hba.conf as that file contains only access list for your postgres users.


All times are GMT -5. The time now is 05:03 PM.