执行命令

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基本的安装和配置完成。

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

CentOS7安装Postgresql的更多相关文章

  1. Centos7安装 PostgreSQL步骤

    1. 安装服务器即可. Yum install postgresql-server Yum install postgresql-contrib 2. 验证是否安装成功: rpm -aq| grep ...

  2. 阿里云ecs centos7安装 postgresql 9.4

    rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm yum insta ...

  3. centos7 安装 PostgreSql

    确定你是管理员,然后运行命令: yum -y install postgresql-server postgresql-contrib 初始化数据库 postgresql-setup initdb 启 ...

  4. CentOS7 安装Postgresql 11+ 源码编译安装Postgis-2.5.2

    ####安装Postgresql-11yum install zlib-devel gcc makegroupadd postgresuseradd -g postgres postgrespassw ...

  5. centos7安装postgresql和postgis

    1.安装步骤 -- 安装对应的rpm文件(其他系统的rpm包,请自行到https://yum.postgresql.org/下载)yum install -y https://download.pos ...

  6. Centos7 源码安装PostgreSQL Citus集群 (转载)

    citus的分布式集群目前在苏宁大规模应用,苏宁陈华军也做了很多技术分享和博客介绍.目前所有的教程都是rpm和pg一起安装,个人不喜欢,毕竟citus定位是个插件,我想在我已安装的pg上源码装一个ci ...

  7. CentOS7安装配置Bacula yum方法

    参考: https://www.baidu.com/link?url=o2QIy2YZWjsJPAFJuYFhrH3nPvtyRkSe-o5Q_FqFZ5E1EMOsIOmGeKm0HAonwHOw8 ...

  8. centos7 安装配置postgresql

    考:https://www.linuxidc.com/Linux/2017-10/147536.htm http://blog.51cto.com/12482328/2090844 https://w ...

  9. 19.CentOS7下PostgreSQL安装过程

    CentOS7下PostgreSQL安装过程 装包 sudo yum install postgresql-server postgresql-contrib 说明: 这种方式直接明了,其他方法也可以 ...

随机推荐

  1. Hive分区和桶

    SMB 存在的目的主要是为了解决大表与大表间的 Join 问题,分桶其实就是把大表化成了“小表”,然后 Map-Side Join 解决之,这是典型的分而治之的思想.在聊 SMB Join 之前,我们 ...

  2. java:条件表达式

    if (results.length() == 0) { return ""; } else { return results.substring(0, results.lengt ...

  3. mysql主键,外键,索引

    主键 唯一而非空,只能有一个 作用: 1.唯一的标识一行  2.作为一个可以被外键有效引用的对象  3.保证数据完整性 设计原则: 1. 主键应当是对用户没有意义的.如果用户看到了一个表示多对多关系的 ...

  4. 【前端】Vue和Vux开发WebApp日志一、整合vue+cordova和webpack+gulp

    转载请注明出处:http://www.cnblogs.com/shamoyuu/p/vue_vux.html 项目github地址:https://github.com/shamoyuu/vue-vu ...

  5. 3.3.3 PCI设备对可Cache的存储器空间进行DMA读写

    PCI设备向"可Cache的存储器空间"进行读操作的过程相对简单.对于x86处理器或者PowerPC处理器,如果访问的数据在Cache中命中,CPU会通知FSB总线,PCI设备所访 ...

  6. Java中用正则表达式判断日期格式是否正确

    1.Java中用正则表达式判断日期格式是否正确 DateType.java: /** * @Title:DateType.java * @Package:com.you.dao * @Descript ...

  7. My97 DatePicker普通调用

    My97 DatePicker普通调用 1.设计源码 <%@ page language="java" import="java.util.*" page ...

  8. linux下驱动模块化编译,动态加载以及卸载

    步骤:: 1.编写first_driver_hello.c文件,将其放在/linux2.6.32/drivers/char路径下: 2.在/linux2.6.32/drivers/cha/Kconfi ...

  9. Indent Guides for Visual Studio 代码格式化收缩插件

    代码格式化收缩插件 下载地址:http://indentguide.codeplex.com/releases/view/110312 更多关注付义方技术博客:http://blog.csdn.net ...

  10. Nethogs - 网络流量监控工具

    命令iftop来检查带宽使用情况.netstat用来查看接口统计报告.还有其他的一些工具Bandwidthd.Speedometer.Nethogs.Darkstat.jnettop.ifstat.i ...