aaron_castro1990
Posts: 2
Joined: Sun Dec 11, 2016 3:00 am

Re: Postgres is not working

Sun Dec 11, 2016 9:03 pm

Hi, I'd made it work by following the next steps:

Download postgres from http://ftp.postgresql.org/pub/source/v9 ... .1.tar.bz2
Extract those files as any other bz2 and tar file.

Install by following this steps:

Code: Select all

sed -i '/DEFAULT_PGSOCKET_DIR/s@/tmp@/run/postgresql@' src/include/pg_config_manual.h &&
./configure --prefix=/usr          \
            --enable-thread-safety \
            --docdir=/usr/share/doc/postgresql-9.6.1 &&
make
Now, as the root user::

Code: Select all

make install      &&
make install-docs
Initialize a database cluster with the following commands issued by the root user:

Code: Select all

install -v -dm700 /srv/pgsql/data &&
install -v -dm755 /run/postgresql &&

groupadd -g 41 postgres &&
useradd -c "PostgreSQL Server" -g postgres -d /srv/pgsql/data \
        -u 41 postgres &&

chown -Rv postgres:postgres /srv/pgsql /run/postgresql
Now, initialize the database at the root user:

Code: Select all

su - postgres -c 'pg_ctl -D /srv/pgsql/data -l /srv/pgsql/data/logfile start'
This help me to figure it out: http://www.linuxfromscratch.org/blfs/vi ... resql.html
Hope it helps somebody!

mugambi
Posts: 5
Joined: Mon Feb 20, 2017 1:37 pm

Re: Postgres is not working

Thu Aug 31, 2017 4:49 pm

found the below link and was useful

http://www.stuartellis.name/articles/solus-setup/

erikrs92
Posts: 1
Joined: Tue Feb 13, 2018 5:20 pm

Re: Postgres is not working

Tue Feb 13, 2018 5:23 pm

Thanks men, i love you. :D

thamudi
Posts: 1
Joined: Tue Jun 26, 2018 11:03 pm

Re: Postgres is not working

Wed Jun 27, 2018 6:16 pm

This article helped me well along with what gerardo said about creating the directory in /home/postgres


https://www.codementor.io/engineerapart ... -are8jcopb

Return to “Tutorials”