Обсуждение: [pgsql-www] Wiki editor request -

Поиск
Список
Период
Сортировка

[pgsql-www] Wiki editor request -

От
"Phillips,Robert V"
Дата:

I do not necessarily want to be an editor, but I think a clarification should be made on https://wiki.postgresql.org/wiki/First_steps

 

It says there to “ First connect/login as root” and then it shows:

 

#su – postgres

$ psql

 

ISSUE: on RHEL 7.3, user postgres does not have psql in the path, and when, as user postgres I add a file ~/.bashrc with the line:

 

export PATH=/usr/pgsql-9.6/bin:$PATH

 

and relogin as posgtres, the command $ psql is still not found ( I guess redhat 7.3 ignores the ~/.bashrc file --- it is owned by postgress and I set it to mode 755 – and still it has no effect).

 

However, I must manually do that export command as user posgres in the shell, and only then will the command $psql work.

 

 

FYI,

 

Robert Phillips

Re: [pgsql-www] Wiki editor request -

От
Marcin Cieslak
Дата:
On Thu, 31 Aug 2017, Phillips,Robert V wrote:

> I do not necessarily want to be an editor, but I think a clarification should be made on
https://wiki.postgresql.org/wiki/First_steps
> 
> It says there to " First connect/login as root" and then it shows:
> 
> #su - postgres
> $ psql
> 
> ISSUE: on RHEL 7.3, user postgres does not have psql in the path, and when, as user postgres I add a file ~/.bashrc
withthe line:
 
> 
> export PATH=/usr/pgsql-9.6/bin:$PATH
> 
> and relogin as posgtres, the command $ psql is still not found ( I guess redhat 7.3 ignores the ~/.bashrc file --- it
isowned by postgress and I set it to mode 755 - and still it has no effect).
 
> 
> However, I must manually do that export command as user posgres in the shell, and only then will the command $psql
work.

Can you check if adding

PATH=/usr/pgsql-9.6/bin:$PATH
export PATH

in the home directory of the user postgres works? Also make sure it is actually readable by the user.

Marcin