LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   postgresql start failed (https://www.linuxquestions.org/questions/linux-newbie-8/postgresql-start-failed-4175428750/)

cheche.buretche 09-24-2012 04:36 AM

postgresql start failed
 
hello everyone,

May I request for your guidance.

I am configuring "postgresql" but it never start the result is always failed.

Kindly refer below;

For pg_hba.conf
> # TYPE DATABASE USER CIDR-ADDRESS METHOD
>
> # "local" is for Unix domain socket connections only
> local all all trust
> # IPv4 local connections:
> host all all 127.0.0.1/32 trust
> host all all 192.168.1.1/24 trust
> # IPv6 local connections:
> host all all ::1/128 trust
>
> -------------------------------------------------------------

For postgresql.conf

> # CONNECTIONS AND AUTHENTICATION
> #------------------------------------------------------------
> # - Connection Settings -
>
>#listen_addresses='localhost'
listen_addresses='*'

># port =5432
port =5432 -------------------------------------------------------------

when i did the test the result:

> [root@localhost ~]# /etc/init.d/postgresql restart
> Stopping postgresql service: [FAILED]
> Starting postgresql service: [FAILED]
> [root@localhost ~]#
-------------------------------------------------------------

Thank you very much...

TB0ne 09-24-2012 10:14 AM

Quote:

Originally Posted by cheche.buretche (Post 4787851)
hello everyone,
May I request for your guidance. I am configuring "postgresql" but it never start the result is always failed. Kindly refer below;
when i did the test the result:

> [root@localhost ~]# /etc/init.d/postgresql restart
> Stopping postgresql service: [FAILED]
> Starting postgresql service: [FAILED]
> [root@localhost ~]#

Thank you very much...

Well, did you check the log files? What error(s) were present in them? Without details, there's nothing we can help you with...you don't say what version/distro of Linux, how you installed postgresql, what version of postgresql, etc. Check the logs....chances are, they will tell you what error(s) you have in your configs.

fernfrancis 09-25-2012 08:28 AM

Follow this procedure for installation for compiling and installing the database server

copy the tar file (postgresql-.....tar) to /usr/local
extract it tar -xvf postgresql-.....tar
cd postgresql-...
configure with the parameters needed i usually do this

./configure -- prefix-/usr/local/pgsql --enable-multibyte --enable-unicode --with-java --without-readline
make
make install
/usr/sbin/adduser postgres
cd /usr/local/pgsql/data
chown -R postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data

later in this file /usr/local/pgsql/data/postgresql.conf

add the listen_address =" your server address"

/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start


this should start the database

let me know if you need help


All times are GMT -5. The time now is 10:52 PM.