错误码
error: 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"?
我的安装步骤
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
apt-get update
apt-get -y install postgresql
我的安装步骤是参考官方给的脚本执行安装的。在我虚拟机中安装一切正常。但是我在我的云服务器上安装就遇到了这样的问题。
好像是无法创建目录,但是我是用root用户执行的脚本。
在执行完成后,/etc/postgresql/ 这个文件夹下是空的,但是postgresql 的运行状态,又是在运行中....
网上查了很多的资料,和我遇到的问题不一样,不知道是我哪里问题!!!!
请问这种情况我该怎么处理
postgresql 运行状态
重新启动
查找安装位置,配置位置
错误信息
用
journalctl -u postgresql@14-main.service
看看启动日志, -u后面的参数根据你安装的版本而定.