使用cloudera manager安装hadoop,过程中日志记录错误如下:
Could not initialize database server.
This usually means that your PostgreSQL installation failed or isn't working properly.
PostgreSQL is installed using the set of repositories found on this machine. Please
ensure that PostgreSQL can be installed. Please also uninstall any other instances of
PostgreSQL and then try again., giving up
是PostgreSQL没有启动成功,查看PostgreSQL启动日志
cat /var/lib/pgsql/pgstartup.log
看到如下信息
FATAL: could not create lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
FATAL: could not create lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
FATAL: could not create lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
FATAL: could not create lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
是因为没有权限操作/tmp目录
执行:
chmod 1777 /tmp
问题解决~!