PostgreSQL 11 install with jit on CentOS 7.5 X64

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PostgreSQL 11 install with jit on CentOS 7.5 X64相关的知识,希望对你有一定的参考价值。

1.system info
CentOS Linux release 7.5.1804 X86_64

2.disable selinux and firewalld

  1. install require os packages
    -# yum install -y epel-release
    -# yum install -y gcc gcc-c++ readline-devel zlib-devel libicu-devel

4.llvm install
1).cmake
-# wget https://cmake.org/files/v3.11/cmake-3.11.4.tar.gz
-# tar zxvf cmake-3.11.4.tar.gz
-# ./configure
-# make
-# make install

2).llvm
-# wget http://releases.llvm.org/7.0.0/llvm-7.0.0.src.tar.xz
-# tar -xJf llvm-7.0.0.src.tar.xz
-# mv llvm-7.0.0.src llvm

3).Clang
-# wget http://releases.llvm.org/7.0.0/cfe-7.0.0.src.tar.xz
-# tar -xJf cfe-7.0.0.src.tar.xz
-# mv cfe-7.0.0.src llvm/tools/clang
-# mkdir build
-# cd build/
-# cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86" ../llvm
-# make -j 8
-# make install

编译提示:
-DLLVM_TARGETS_TO_BUILD="X86",仅编译X86平台,如果64位操作系统,
默认为 x86_64-unknown-linux-gnu;否则,编译所有平台库,
此选项产生编译文件较大可能几十GB。

------ check install

-# clang --version
clang version 7.0.0 (tags/RELEASE_700/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
-#

-# llvm-config --version
7.0.0
-#

  1. pg11 source download
    -# mkdir /home/soft
    -# cd /home/soft/
    -# wget https://ftp.postgresql.org/pub/source/v11.0/postgresql-11.0.tar.gz
    -# tar zxf postgresql-11.0.tar.gz
    -# cd postgresql-11.0
    -# ./configure --prefix=/opt/pgsql/11.0 --with-llvm --with-icu
    -# make -j 8
    -# make install

编译选项:
--with-llvm,jit support

  1. add postgres user and startup scripts

以上是关于PostgreSQL 11 install with jit on CentOS 7.5 X64的主要内容,如果未能解决你的问题,请参考以下文章

Postgres 不知道在哪里可以找到服务器配置文件。在“brew install postgresql”之后

PostgreSQL编译安装

PostgreSQL installations

Install PostgreSql in Fedora 27

Install PostgreSql in Fedora 27

YUM Installation PostgreSQL