手工启动:
[postgres@develop ~]$ pg_start
server starting
[postgres@develop ~]$ps -ef|grep postgres
发现还是没起来,查看日志,里面有如此报错信息:
[postgres@develop ~]$ tail -f pg_log
FATAL: data directory "/home/postgres/data" has wrong ownership
HINT: The server must be started by the user that owns the data directory.
FATAL: data directory "/home/postgres/data" has group or world access
DETAIL: Permissions should be u=rwx (0700).
[postgres@develop ~]$ ll /home/postgres
drwxrwxrwx 14 tomcat ddd 4096 10-29 09:41 data
改回去:
[postgres@develop ~]$chown -R postgres:postgres /home/postgres/data
[postgres@develop ~]$chmod 0700 /home/postgres/data
drwx------ 14 postgres postgres 4096 10-29 09:41 data
再启动
总结:
原文链接:https://www.f2er.com/postgresql/196091.html