Discussion:
First time installing
Ron Watkins
2018-02-21 20:20:57 UTC
Permalink
Trying to follow documentation. I installed RPM's but unable to connect to
server.

CentOS Linux release 7.4.1708 (Core)



Package postgresql10-10.2-1PGDG.rhel7.x86_64 already installed and latest
version

Package postgresql10-server-10.2-1PGDG.rhel7.x86_64 already installed and
latest version



# su - postgres

-bash-4.2$ psql

psql: could not connect to server: No such file or directory

Is the server running locally and accepting

connections on Unix domain socket
"/var/run/postgresql/.s.PGSQL.5432"?



There are no files under /var/run/post*



What am I missing here?
Frederick .
2018-02-21 20:39:15 UTC
Permalink
Make sure the service is running.

As root: systemctl start postgresql

As a user:
https://www.postgresql.org/docs/10/static/server-start.html
Trying to follow documentation. I installed RPM’s but unable to connect to
server…
CentOS Linux release 7.4.1708 (Core)
Package postgresql10-10.2-1PGDG.rhel7.x86_64 already installed and latest
version
Package postgresql10-server-10.2-1PGDG.rhel7.x86_64 already installed and
latest version
# su - postgres
-bash-4.2$ psql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket
"/var/run/postgresql/.s.PGSQL.5432"?
There are no files under /var/run/post*
What am I missing here?
Ron Watkins
2018-02-21 20:40:10 UTC
Permalink
# systemctl start postgresql
Failed to start postgresql.service: Unit not found.

Am I missing a step?

-----Original Message-----
From: Frederick . [mailto:***@gmail.com]
Sent: Wednesday, February 21, 2018 1:39 PM
To: Ron Watkins
Cc: pgsql-***@lists.postgresql.org
Subject: Re: First time installing

Make sure the service is running.

As root: systemctl start postgresql

As a user:
https://www.postgresql.org/docs/10/static/server-start.html
Trying to follow documentation. I installed RPM’s but unable to
connect to server…
CentOS Linux release 7.4.1708 (Core)
Package postgresql10-10.2-1PGDG.rhel7.x86_64 already installed and
latest version
Package postgresql10-server-10.2-1PGDG.rhel7.x86_64 already installed
and latest version
# su - postgres
-bash-4.2$ psql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket
"/var/run/postgresql/.s.PGSQL.5432"?
There are no files under /var/run/post*
What am I missing here?
Frederick .
2018-02-21 20:47:03 UTC
Permalink
maybe it is not enabled?

systemctl enable postgresql

if the service isn't installed maybe a package is missing. Try to
start it using https://www.postgresql.org/docs/10/static/server-start.html
as the postgres user, to make sure postgres is OK and setup, then
worry about the systemctl service.

as postgres:
postgres -D /usr/local/pgsql/data
Post by Ron Watkins
# systemctl start postgresql
Failed to start postgresql.service: Unit not found.
Am I missing a step?
-----Original Message-----
Sent: Wednesday, February 21, 2018 1:39 PM
To: Ron Watkins
Subject: Re: First time installing
Make sure the service is running.
As root: systemctl start postgresql
https://www.postgresql.org/docs/10/static/server-start.html
Trying to follow documentation. I installed RPM’s but unable to
connect to server…
CentOS Linux release 7.4.1708 (Core)
Package postgresql10-10.2-1PGDG.rhel7.x86_64 already installed and
latest version
Package postgresql10-server-10.2-1PGDG.rhel7.x86_64 already installed
and latest version
# su - postgres
-bash-4.2$ psql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket
"/var/run/postgresql/.s.PGSQL.5432"?
There are no files under /var/run/post*
What am I missing here?
Ron Watkins
2018-02-21 20:51:32 UTC
Permalink
I created a filesystem to put the postgres database into:

drwxr-xr-x. 3 postgres postgres 4096 Feb 15 11:02 /pgsql/

I tried the command shown below, but it's not working.

-bash-4.2$ postgres -D /usr/local/pgsql/data
-bash: postgres: command not found


-----Original Message-----
From: Frederick . [mailto:***@gmail.com]
Sent: Wednesday, February 21, 2018 1:47 PM
To: Ron Watkins
Cc: pgsql-***@lists.postgresql.org
Subject: Re: First time installing

maybe it is not enabled?

systemctl enable postgresql

if the service isn't installed maybe a package is missing. Try to start it using https://www.postgresql.org/docs/10/static/server-start.html
as the postgres user, to make sure postgres is OK and setup, then worry about the systemctl service.

as postgres:
postgres -D /usr/local/pgsql/data
Post by Ron Watkins
# systemctl start postgresql
Failed to start postgresql.service: Unit not found.
Am I missing a step?
-----Original Message-----
Sent: Wednesday, February 21, 2018 1:39 PM
To: Ron Watkins
Subject: Re: First time installing
Make sure the service is running.
As root: systemctl start postgresql
https://www.postgresql.org/docs/10/static/server-start.html
Trying to follow documentation. I installed RPM’s but unable to
connect to server…
CentOS Linux release 7.4.1708 (Core)
Package postgresql10-10.2-1PGDG.rhel7.x86_64 already installed and
latest version
Package postgresql10-server-10.2-1PGDG.rhel7.x86_64 already installed
and latest version
# su - postgres
-bash-4.2$ psql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket
"/var/run/postgresql/.s.PGSQL.5432"?
There are no files under /var/run/post*
What am I missing here?
Ron Watkins
2018-02-21 20:51:50 UTC
Permalink
# systemctl enable postgresql
Failed to execute operation: No such file or directory

-----Original Message-----
From: Frederick . [mailto:***@gmail.com]
Sent: Wednesday, February 21, 2018 1:47 PM
To: Ron Watkins
Cc: pgsql-***@lists.postgresql.org
Subject: Re: First time installing

maybe it is not enabled?

systemctl enable postgresql

if the service isn't installed maybe a package is missing. Try to start it using https://www.postgresql.org/docs/10/static/server-start.html
as the postgres user, to make sure postgres is OK and setup, then worry about the systemctl service.

as postgres:
postgres -D /usr/local/pgsql/data
Post by Ron Watkins
# systemctl start postgresql
Failed to start postgresql.service: Unit not found.
Am I missing a step?
-----Original Message-----
Sent: Wednesday, February 21, 2018 1:39 PM
To: Ron Watkins
Subject: Re: First time installing
Make sure the service is running.
As root: systemctl start postgresql
https://www.postgresql.org/docs/10/static/server-start.html
Trying to follow documentation. I installed RPM’s but unable to
connect to server…
CentOS Linux release 7.4.1708 (Core)
Package postgresql10-10.2-1PGDG.rhel7.x86_64 already installed and
latest version
Package postgresql10-server-10.2-1PGDG.rhel7.x86_64 already installed
and latest version
# su - postgres
-bash-4.2$ psql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket
"/var/run/postgresql/.s.PGSQL.5432"?
There are no files under /var/run/post*
What am I missing here?
Ron Watkins
2018-02-21 20:52:45 UTC
Permalink
The "EXACT" steps I used to install postgres. Is anything missing here?

yum install -y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7.4-x86_64/pgdg-centos10-10-2.noarch.rpm
yum install -y postgresql10
yum install -y postgresql10-server
Keith
2018-02-21 20:54:47 UTC
Permalink
Post by Ron Watkins
The "EXACT" steps I used to install postgres. Is anything missing here?
yum install -y https://download.postgresql.org/pub/repos/yum/10/redhat/
rhel-7.4-x86_64/pgdg-centos10-10-2.noarch.rpm
yum install -y postgresql10
yum install -y postgresql10-server
Yes, you are missing the cluster initialization and service enable steps.
As I said in the earlier email, enter your OS/PG versions into this form
and it will give you the commands to run

https://www.postgresql.org/download/linux/redhat/
Keith
2018-02-21 20:48:15 UTC
Permalink
Post by Ron Watkins
# systemctl start postgresql
Failed to start postgresql.service: Unit not found.
Am I missing a step?
-----Original Message-----
Sent: Wednesday, February 21, 2018 1:39 PM
To: Ron Watkins
Subject: Re: First time installing
Make sure the service is running.
As root: systemctl start postgresql
https://www.postgresql.org/docs/10/static/server-start.html
Trying to follow documentation. I installed RPM’s but unable to
connect to server

CentOS Linux release 7.4.1708 (Core)
Package postgresql10-10.2-1PGDG.rhel7.x86_64 already installed and
latest version
Package postgresql10-server-10.2-1PGDG.rhel7.x86_64 already installed
and latest version
# su - postgres
-bash-4.2$ psql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket
"/var/run/postgresql/.s.PGSQL.5432"?
There are no files under /var/run/post*
What am I missing here?
RHEL/CentOS does not enable the service nor create a cluster by default
after package installation. Plug in your versions to this form and it will
give you all the commands to run to get the package managed cluster
installed

https://www.postgresql.org/download/linux/redhat/
Devrim Gündüz
2018-03-27 22:46:39 UTC
Permalink
hi,
Post by Ron Watkins
# systemctl start postgresql
Failed to start postgresql.service: Unit not found.
Am I missing a step?
You are missing two steps:

1) /usr/pgsql-10/bin/postgresql-10-setup initdb

That will initialize the cluster for you. Please run it as root.

2) systemctl enable postgresql-10
systemctl staart postgresql-10

Please check the version number appended to postgresql -- multiple version RPMs
can be installed in parallel.

-HTH

Regards,
--
Devrim GÃŒndÃŒz
EnterpriseDB: https://www.enterprisedb.com
PostgreSQL Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR
Hrvoje Zokovic
2018-02-21 20:47:02 UTC
Permalink
Typically installing postgres to your OS creates an "initial DB" and
starts the
postgres server daemon running. If not then you'll need to run initdb
https://www.postgresql.org/docs/9.6/static/app-initdb.html
HTH
Hrvoje
Trying to follow documentation. I installed RPM’s but unable to
connect to server

CentOS Linux release 7.4.1708 (Core)
Package postgresql10-10.2-1PGDG.rhel7.x86_64 already installed and
latest version
Package postgresql10-server-10.2-1PGDG.rhel7.x86_64 already installed
and latest version
# su - postgres
-bash-4.2$ psql
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket
"/var/run/postgresql/.s.PGSQL.5432"?
There are no files under /var/run/post*
What am I missing here?
Loading...