Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Centos7 compiles PGSQL9.6 and configures UUID

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

System version:

Centos7.2

# yum install readline-devel zlib-devel-y

If you do not install the above two packages, compiling postgresql will report an error that the corresponding package is missing, causing it to fail.

# yum install postgresql-contrib

Http://mirror.centos.org/centos/7/os/x86_64/Packages/uuid-devel-1.6.2-26.el7.x86_64.rpm

The version is the same as the uuid version of the system, uuid-1.6.2-26.el7.x86_64

# rpm-ivh uuid-devel-1.6.2-26.el7.x86_64.rpm

If you do not install one of the above packages, compiling postgresql will report the following error:

# configure: error: library 'ossp-uuid' or' uuid' is required for OSSP-UUID "

If you have this package in the source, you can install it using yum.

Upload package postgresql-9.6.3.tar.gz

# tar-zxf postgresql-9.6.3.tar.gz

# cd postgresql-9.6.3

#. / configure-prefix=/usr/local/postgresql-with-ossp-uuid

# make & & make install

# cd contrib/uuid-ossp

# make & & make install

If the uuid-ossp is not compiled above, the following error occurs:

Postgres=# create extension "uuid-ossp"

ERROR: could not open extension control file "/ usr/local/postgresql/share/extension/uuid-ossp.control": No such file or directory

# vi / etc/profile

Export PGHOME=/usr/local/postgresql

Export PGDATA=/data/pg_data

Export PATH=$PATH:$PGHOME/bin

# source / etc/profile

Other configurations are basically the same as the 9.2 configuration of the previous yum installation, note that the configuration file may be different, according to the actual configuration, such as the following configuration file:

# find /-name "recovery.conf.sample"

/ usr/local/postgresql/share/recovery.conf.sample

/ data/postgresql-9.6.3/src/backend/access/transam/recovery.conf.sample

# cp / usr/local/postgresql/share/recovery.conf.sample / data/pg_data/recovery.conf

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report