溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

centos7編譯PGSQL9.6并配置UUID

發(fā)布時間:2020-07-11 19:13:16 來源:網(wǎng)絡(luò) 閱讀:2041 作者:斷臂人 欄目:數(shù)據(jù)庫

系統(tǒng)版本:

centos7.2 


# yum install readline-devel zlib-devel -y

如果不安裝以上兩個包,編譯postgresql就會報缺少相應(yīng)包的錯誤,導(dǎo)致無法通過。


# yum install postgresql-contrib


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

版本和系統(tǒng)的uuid版本一樣,uuid-1.6.2-26.el7.x86_64

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

如果不安裝以上的一個包,編譯postgresql就會報以下的錯誤:

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

如果源里邊有這個包,可以使用yum進(jìn)行安裝。


上傳包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 

上邊如果不編譯uuid-ossp,就會出現(xiàn)下面的錯誤:

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


其他基本上和之前的yum安裝的9.2版本的配置一樣,注意配置文件可能不同,按實際的來配置,如下面的配置文件:

# 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

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI