tdeforpg安装步骤

news/2024/7/9 21:10:53 标签: postgresql

虚拟机已装有postgresql 9.6.9.

设置环境变量

为了方便安装,设置一下环境变量

export PGSRC="/home/xdb/source/postgresql-9.6.9"   //pg 源码
export PGHOME="/appdb/xdb"                         //pg path
export TDEHOME="/home/xdb/source/tdeforpg-1.2.1.0" // tde 源码
export PGPORT="5432"
export PGDATA="/data/utf8db"                      // pg data目录
export PGDATABASE="testdb"
export PGUSER="xdb"
export PGPASSWORD="123456"

安装pgcrypto

cd ${PGSRC}/contrib/pgcrypto
gmake
gmake install
pg_ctl start
psql -c "CREATE EXTENSION pgcrypto;"

编译TDE(Transparent Data Encryption)

sudo ln -s ${PGHOME}/lib/pgcrypto.so /usr/lib64/libpgcrypto.so
cd ${PGSRC}
./configure --with-openssl
cd ${TDEHOME}/SOURCES/data_encryption
sh makedencryption.sh 96 ${PGSRC}

安装TDE

ln -s ${TDEHOME}/SOURCES/data_encryption/96/data_encryption96.so.1.2.1.0 /usr/lib64/data_encryption.so

修改postgresql.conf

shared_preload_libraries='/usr/lib64/data_encryption.so'

启动postgresql,并加载externtion

pg_ctl restart -D $PGDATA

testdb=# create extension pgcrypto ; //一定要先加载externsion,否则后面TDE无法连接安装
CREATE EXTENSION
testdb=# 

安装TDE function

[root@localhost SOURCES]# sh bin/cipher_setup.sh ${PGHOME}
Transparent data encryption feature setup script
Please select from the setup menu below
Transparent data encryption feature setup menu
1: activate  the transparent data encryption feature
2: inactivate the transparent data encryption feature
select menu [1 - 2] > 1
Please enter database server port to connect : 5432
Please enter database user name to connect : xdb
Please enter password for authentication : 
Please enter database name to connect : testdb
CREATE LANGUAGE
INFO: Transparent data encryption feature has been activated

 


http://www.niftyadmin.cn/n/549204.html

相关文章

解剖SQLSERVER 第十三篇 Integers在行压缩和页压缩里的存储格式揭秘(译)

原文:解剖SQLSERVER 第十三篇 Integers在行压缩和页压缩里的存储格式揭秘(译)解剖SQLSERVER 第十三篇 Integers在行压缩和页压缩里的存储格式揭秘(译) http://improve.dk/the-anatomy-of-row-amp-page-compressed-integers/ 当…

面向对象设计的SOLID原则

面向对象设计的SOLID原则 S.O.L.I.D是面向对象设计和编程(OOD&OOP)中几个重要编码原则(Programming Priciple)的首字母缩写。 SRP The Single Responsibility Principle 单一责任原则 OCP The Open Closed Principle 开放封闭原则 LSP The Liskov Substitution Principle…

Emacs Tips

1、slime用“C-o”下开新行,在配置文件slime.el中加入:(walker放在了Key bindings那一段);;自定义快捷键 ;下开新行 (defun start-newline-next ()(interactive)(end-of-line)(newline-and-indent))(global-set-key (kbd "C-…

如何体现timescaledb在insert过程中比原生PG的优势?

目录 CASE-1 减少shared_buffer 从3GB到512MB。 CASE-2, 4个索引,4并发,总共4亿行数据,监控PG实时写入速率 CASE-3 改用HDD机械硬盘测试 接上周一篇 timescaledb和PG写入性能测试 https://blog.csdn.net/jacicson1987/article/…

IT 网址

蒋金楠 (Artech) WCF ,asp.net等 博客地址:http://www.cnblogs.com/artech/tag/WCF/ 伍华聪 博客地址:http://wuhuacong.cnblogs.com/ 关于C# datagridview 博客地址:http://www.cnblogs.com/peterzb/archive/2009/…

mysql 下 计算 两点 经纬度 之间的距离 含具体sql语句以及伪列作为查询条件实现

在原文的基础上,我新增了sql语句,方便大家理解 mysql距离计算,单位m,以及排序lon 经度 lat 纬度一般地图上显示的坐标顺序为,纬度在前(范围-90~90),经度在后(范围-180~18…

VPP编译调试环境安装步骤

首先安装Centos 7, 用grub引导安装,不能用UEFI。否则在安装好VPP后报错 IOPL call failed - cannot use virtio PMD 然后DPDK就无法加载网卡了。 参考源码如下: static void rte_virtio_pmd_init(void) {if (rte_eal_iopl_init() ! 0) {PMD_INIT_LOG…

pdf转word,免费网站

由于工作需要想把pdf转换成word格式,搜罗半天都是些客户端软件而且试用版只能转换几页,破解版处处是陷阱。后几经周折发现了两个免费转换的网站,故分享一下: http://www.pdfconvertonline.com/ https://smallpdf.com/