首页 > 数据库 >centos7 安装 postgresql-9.2

centos7 安装 postgresql-9.2

时间:2023-03-16 19:22:37浏览次数:33  
标签:postgresql 04 service 16 postgresql92 centos7 9.2

1. 添加yum 配置

  yum install -y http://download.postgresql.org/pub/repos/yum/9.2/redhat/rhel-7-x86_64/pgdg-centos92-9.2-3.noarch.rpm

2. 安装服务

  yum install -y postgresql92-server postgresql92-contrib

3. 启动

  systemctl start postgresql-9.2.service

4. 发现下面的报错, 按提示看报错信息, 执行

  {

    

-- Unit postgresql-9.2.service has begun starting up.
3月 16 04:08:14 bogon postgresql92-check-db-dir[1240]: "/var/lib/pgsql/9.2/data/" is missing or empty.
3月 16 04:08:14 bogon postgresql92-check-db-dir[1240]: Use "/usr/pgsql-9.2/bin/postgresql92-setup initdb" to initialize the datab
3月 16 04:08:14 bogon postgresql92-check-db-dir[1240]: See /usr/share/doc/postgresql92-9.2.24/README.rpm-dist for more informatio
3月 16 04:08:14 bogon systemd[1]: postgresql-9.2.service: control process exited, code=exited status=1
3月 16 04:08:14 bogon systemd[1]: Failed to start PostgreSQL 9.2 database server.
-- Subject: Unit postgresql-9.2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit postgresql-9.2.service has failed.

 

 

}

 

 

  执行初始化解决问题:

  /usr/pgsql-9.2/bin/postgresql92-setup initdb

  重新启动:

  systemctl  restart  postgresql-9.2.service

  systemctl  status  postgresql-9.2.service

5. 调整配置文件

  

 

标签:postgresql,04,service,16,postgresql92,centos7,9.2
From: https://www.cnblogs.com/S--S/p/17223866.html

相关文章

  • Centos7配置本地及网络yum源
    开源镜像站:阿里云开源镜像站:https://mirrors.aliyun.com/网易开源镜像站:https://mirrors.163.com/中科大开源镜像站:https://mirrors.ustc.edu.cn/清华开源镜像站:http......
  • CentOS7永久挂载硬盘
    mkdir/mnt/cdrom//创建挂载硬盘目录mount-orw/dev/vdb1/mnt/cdrom//挂载硬盘设备/dev/vdb1rw是可读可写,ro是只读上面步骤重启会失效,解决办......
  • centos7拷贝挂载硬盘一些命令检查硬盘序列号
    Centos新增硬盘以后,系统不能自动进行识别。1.由于不知道新增硬盘挂载的位置,可以先查看现有硬盘挂载的适配器。ls-l/sys/block/sdalrwxrwxrwx.1rootroot0Jun1511......
  • centos7 安装docker 错误解决
    yum-config-manager--add-repohttp://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repoyum-yinstalldocker-ce安装报错:错误:软件包:2:container-selinux-2......
  • PG从小白到专家 - Part 11:PostgreSQL控制文件作用与管理
     PostgreSQL从小白到专家,是从入门逐渐能力提升的一个系列教程,内容包括对PG基础的认知、包括安装使用、包括角色权限、包括维护管理、、等内容,希望对热爱PG、学习PG的同......
  • centos7.6安装GCC9.3.0
    CentOS7.6下安装gcc9.3.0本文主要介绍怎么在CentOS7.6环境下安装GCC9.3.0,适用于部分源码包需要高版本的gcc进行编译的场景,需要准备的环境有:CentOS7.6gcc-9.3.0.......
  • Centos7的kafka集群搭建
    CentOS7搭建kafka集群原创 莫问 记录栈 2022-11-1619:49 发表于陕西收录于合集#centos6个#kafka1个#linux9个#kafka集群1个/***@系统:CentOSLinux......
  • 【大数据】Centos7、Hadoop3.3.1、分布式搭建
    主要遵照 https://www.cnblogs.com/lehoso/p/15550119.html进行搭建,文章里写的很清楚了,我就不多说了。在搭建过程中,用思维导图绘制了一个大纲。可点击下载安装过程中的......
  • PostgreSQL 计数查询效率,物化视图 [重复]
    PostgreSQL计数查询效率,物化视图[重复]问题:PostgreSQL计数查询效率,物化视图[重复]可能重复:PostgreSQL计数查询优化使用PostgreSQL9.2,我们试图弄清楚是否有......
  • 06centos7部署安装prometheus+exproter+grafana
    一.prometheus二进制编译安装1.关闭防火墙(或放通具体应用端口)systemctlstopfirewalld2.下载prometheus安装包官网:https://github.com/prometheus/prometheu......