我启动了它,显示已经启动,但是它没有运行。
postgres@zararlinuxvm:/var/run$ /etc/init.d/postgresql start
* Starting PostgreSQL 9.3 database server [ OK ]
postgres@zararlinuxvm:/var/run$ /etc/init.d/postgresql status
9.3/main (port 5432): down
postgres@zararlinuxvm:/var/run$
我的postgres.config文件如下:
listen_addresses = 'localhost'
port = 5432
max_connections = 100
unix_socket_directories = '/var/run/postgresql'
unix_socket_permissions = 0777
/var/run/postgresql的权限/所有权如下:
postgres@zararlinuxvm:/var/run$ pwd
/var/run
postgres@zararlinuxvm:/var/run$ ls -l | grep postgresql
drwxrwsr-x 2 postgres postgres 40 Dec 28 14:16 postgresql
其他信息:
postgres@zararlinuxvm:/var/run$ whereis postgresql
postgresql: /etc/postgresql /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql
postgres@zararlinuxvm:/var/run$ whoami
postgres
我不确定问题出在哪里,因为没有进程运行,也没有使用端口或套接字。
postgres@zararlinuxvm:~$ netstat -an | grep 5432
postgres@zararlinuxvm:~$
非常感谢您的帮助。