当前位置:Gxlcms > 数据库问题 > PostgreSQL 11 install with jit on CentOS 7.5 X64

PostgreSQL 11 install with jit on CentOS 7.5 X64

时间:2021-07-01 10:21:17 帮助过:18人阅读

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

标签:load   tar   support   3.1   lease   adl   inux   files   .gz   

人气教程排行