LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-16-2014, 01:47 AM   #1
Nikhil_Lagwankar
Member
 
Registered: Aug 2013
Location: Pune
Distribution: Centos, Ubuntu, Fedora
Posts: 36

Rep: Reputation: 0
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 !!
 
Old 02-16-2014, 03:41 AM   #2
yongitz
Member
 
Registered: Nov 2005
Location: Davao City, Philippines
Distribution: RHEL, CentOS, Ubuntu, Mint
Posts: 139

Rep: Reputation: 20
Did you change the port of the init scripts of postgresql into port 5555 as well?
 
Old 02-16-2014, 03:47 AM   #3
Nikhil_Lagwankar
Member
 
Registered: Aug 2013
Location: Pune
Distribution: Centos, Ubuntu, Fedora
Posts: 36

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yongitz View Post
Did you change the port of the init scripts of postgresql into port 5555 as well?
How do i do that?
 
Old 02-16-2014, 03:58 AM   #4
yongitz
Member
 
Registered: Nov 2005
Location: Davao City, Philippines
Distribution: RHEL, CentOS, Ubuntu, Mint
Posts: 139

Rep: Reputation: 20
If you are using postgresql 9.1, it should be under /etc/init.d/postgresql-9.1.Change the value of PGPORT to 5555.
 
Old 02-19-2014, 01:02 AM   #5
Nikhil_Lagwankar
Member
 
Registered: Aug 2013
Location: Pune
Distribution: Centos, Ubuntu, Fedora
Posts: 36

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yongitz View Post
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..
 
Old 02-19-2014, 01:07 AM   #6
Nikhil_Lagwankar
Member
 
Registered: Aug 2013
Location: Pune
Distribution: Centos, Ubuntu, Fedora
Posts: 36

Original Poster
Rep: Reputation: 0
Smile

Quote:
Originally Posted by yongitz View Post
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 ?
 
Old 02-19-2014, 02:46 AM   #7
yongitz
Member
 
Registered: Nov 2005
Location: Davao City, Philippines
Distribution: RHEL, CentOS, Ubuntu, Mint
Posts: 139

Rep: Reputation: 20
Quote:
Originally Posted by Nikhil_Lagwankar View Post
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.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
change data directory postgres with database cluster rosebeck.82 Linux - Server 1 05-25-2013 08:45 AM
multiple instances of Postgres SQL are listening on port 7337 nkd Linux - Newbie 1 11-16-2012 12:03 AM
Tomcat6 stops listening on port 80 when i change from port 8080 to port 80 trongthect Linux - Server 1 07-27-2012 05:41 PM
change port in torbutton addon problem shogun1234 Linux - Software 0 08-02-2010 12:22 PM
Help: Port SQLServer to Postgres jag Linux - Distributions 0 01-11-2002 07:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration