zoukankan      html  css  js  c++  java
  • Linux下,postgreSQL的查看与重启

    查看命令:
    ps aux | grep postgres
    netstat -npl | grep postgres

    方法1:

    #su - postgres   

    $pg_ctl restart

    方法2:

    #su - postgres   

    看下自己的postgresql的版本是多少,直接把下面的版本改掉就行了。

    例如:我的版本是9.5,直接把下面postgresql-9.4.service改为postgresql-9.5.service就ok了

    退出bash,CTRL+D就行了 

    #启动,停止,重启服务
    systemctl start  postgresql-9.4.service
    systemctl stop postgresql-9.4.service

    systemctl restart postgresql-9.4.service

    #查看一个服务的状态
    systemctl status postgresql-9.4.service

    #开机时启用一个服务
    systemctl enable postgresql-9.4.service

    #开机时关闭一个服务
    systemctl disable postgresql-9.4.service

    #查看服务是否开机启动
    systemctl is-enabled postgresql-9.4.service

  • 相关阅读:
    ThreadLocal总结
    zookeeper学习笔记
    安装solr
    VirtualBox安装Centos7
    Solr学习
    Redis缓存会出现的问题?
    面试题目总结
    mysql分库分表
    Java内存模型
    HashMap在多线程中循环链表问题(jdk1.7)
  • 原文地址:https://www.cnblogs.com/wang-yaz/p/10815251.html
Copyright © 2011-2022 走看看