小智 17
欢迎来到systemd的世界
尝试类似:
service postgresql-9.2 stop
Run Code Online (Sandbox Code Playgroud)
如果这不起作用,请尝试找到正确的服务名称:
systemctl list-units|grep postgresql
Run Code Online (Sandbox Code Playgroud)
并使用“.service”之前的结果部分重试上述命令。
小智 8
在 Centos 7 上,您应该使用systemctl. 前任。:
/bin/systemctl stop postgresql
Run Code Online (Sandbox Code Playgroud)