Quando eu executo o diretório de dados postgresql em
/etc/postgresql/9.5/main/postgresql.conf
caminho padrão do formulário
/var/lib/postgresql/9.5/main
para o meu costume
/home/user/postgresql/9.5/main
Use este manual link
Eu tenho erro:
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"?
Quando eu estou errado?
UPD1
ubuntu@rails-serv-1:~$ sudo service postgresql status
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor prese
Active: active (exited) since Wed 2016-10-19 08:52:12 UTC; 4min 52s ago
Process: 854 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 854 (code=exited, status=0/SUCCESS)
Tasks: 0
Memory: 0B
CPU: 0
CGroup: /system.slice/postgresql.service
Oct 19 08:52:12 rails-serv-1 systemd[1]: Starting PostgreSQL RDBMS...
Oct 19 08:52:12 rails-serv-1 systemd[1]: Started PostgreSQL RDBMS.
UPD2
ubuntu@rails-serv-1:~$ sudo ps auxww | grep [p]ostgresql
ubuntu@rails-serv-1:~$
está vazio
ubuntu@rails-serv-1:~$ sudo ls -al /var/run/postgresql
total 0
drwxrwsr-x 2 postgres postgres 40 Oct 19 21:28 .
drwxr-xr-x 24 root root 900 Oct 19 21:32 ..
UPD3
log
"2016-10-21 07:25:54 UTC [3493-1] FATAL: data directory "/var/lib/postgresql-new/9.5/main" has group or world access 2016-10-21 07:25:54 UTC [3493-2] DETAIL: Permissions should be u=rwx (0700)."
permissões de pastas
root@rails-serv-1:~# cd /var/lib/postgresql-new/
root@rails-serv-1:/var/lib/postgresql-new# ls -lh
total 4.0K
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 9.5
root@rails-serv-1:/var/lib/postgresql-new# cd 9.5/
root@rails-serv-1:/var/lib/postgresql-new/9.5# ls -lh
total 4.0K
drwx------ 1 postgres postgres 4.0K Oct 18 23:01 main
root@rails-serv-1:/var/lib/postgresql-new/9.5# cd main/
root@rails-serv-1:/var/lib/postgresql-new/9.5/main# ls -lh
total 80K
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 base
drwx------ 1 postgres postgres 4.0K Oct 18 23:01 global
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_clog
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_commit_ts
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_dynshmem
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_logical
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_multixact
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_notify
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_replslot
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_serial
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_snapshots
drwx------ 1 postgres postgres 4.0K Oct 18 23:01 pg_stat
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_stat_tmp
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_subtrans
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_tblspc
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_twophase
-rw------- 1 postgres postgres 4 Oct 18 23:00 PG_VERSION
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_xlog
-rw------- 1 postgres postgres 88 Oct 18 23:00 postgresql.auto.conf
-rw------- 1 postgres postgres 133 Oct 18 23:00 postmaster.opts