Home >Database >Mysql Tutorial >关于Linux系统下PostgreSQL添加uuid组件的步骤

关于Linux系统下PostgreSQL添加uuid组件的步骤

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 16:57:463117browse

source /etc/profile第四步。进入su postgres用户psql -U postgres -d mydb lt; /usr/local/pgsql/share/contrib/uuid-ossp.sql

值得注意的地方

1.find / -name uuid-ossp.so搜索看看时候存在

如果不存在。点击这里下载uuid-1.6.1.tar.gz并安装。注意。./configure安装就好。这个时候在/usr/local/lib会存在uuid-ossp.so文件

2.安装postgresql.的时候 如果报错。

checking for uuid_export in -lossp-uuid... no
checking for uuid_export in -luuid... no
configure: error: library 'ossp-uuid' or 'uuid' is required for OSSP-UUID"
那一定是没有安装UUID包。也就是第一步没有做好。
./configure --with-libxml --with-ossp-uuid --with-libs=/usr/local/lib --with-includes=/usr/local/include

这个时候通过安装。

3。添加组件

进入cd post安装包目录/contrib/uuid-ossp/

make && make install

4配置环境变量

/etc/profile

PGLIB=/usr/local/pgsql/lib
PGDATA=$HOME/data
PATH=$PATH:/usr/local/pgsql/bin
MANPATH=$MANPATH:/usr/local/pgsql/man
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export PGLIB PGDATA PATH MANPATH

source /etc/profile

第四步。

进入su postgres用户

psql -U postgres -d mydb

mydb为自己建立的数据库

其中损去很多代码。

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn