zoukankan      html  css  js  c++  java
  • CentOS7安装Postgresql

    执行命令

    Yum install postgresql-server

     

    Yum install postgresql-contrib

     

    安装完成后,检查postgresql的服务状态

    Systemctl status postgresql

     

    服务未启动

    执行systemctl start postgresql启动服务

    执行过程有可能会报错

    Job for postgresql.service failed because the control process exited with error code. See "systemctl status postgresql.service" and "journalctl -xe" for details.

     

    安装postgresql后需要初始化数据库

    执行postgresql-setup initdb

     

    再次启动postgresql服务

     

    用ps命令查看postgresql进程信息

     

    用su – postgres切换到postgresql用户执行psql的操作

     

    使用l查看postgresql的所有数据库信息

     

    到此可以看到postgresql已正确安装。为了以后每次开机可以启动postgresql,执行如下命令

     

    到此postgresql基本的安装和配置完成。

    更多文章关注微信公众号“挨踢学霸”

  • 相关阅读:
    CSS3--box-shadow
    C#快捷键
    c#基础3
    C#基础2
    C#基础
    javascript 字符串总结
    javasrcipt中的for in 循环
    javascript复习总结
    结构体数组排序
    ArrayList集合排序
  • 原文地址:https://www.cnblogs.com/itxb/p/8644351.html
Copyright © 2011-2022 走看看