PGroonga 官网:https://pgroonga.github.io/
Description:PGroonga (píːzí:lúnɡά) is a PostgreSQL extension to use Groonga as the index.PostgreSQL supports full text search against languages that use only alphabet and digit. It means that PostgreSQL doesn’t support full text search against Japanese, Chinese and so on. You can use super fast full text search feature against all languages by installing PGroonga into your PostgreSQL!
一、安装相关依赖包
yum install wget curl tar gzip gcc gcc-c++ make zlib zlib-devel msgpack msgpack-devel mecab mecab-devel lz4 lz4-devel
二、下载安装 git
注意:编译要求Git版本为 V2.7.4及以上版本
wget https://www.kernel.org/pub/software/scm/git/git-2.7.4.tar.gz --no-check-certificate
tar -vzxf git-2.7.4.tar.gz
cd git-2.7.4/
#Configure
./configure --with-openssl=/usr/local/openssl
#编译安装
make && make install
#打开操作系统环境变量配置文件,修改环境变量
vi /etc/profile
#在底部加上git相关配置
export PATH=$PATH:/usr/local/git-2.7.4
#:wq保存,source命令生效
source /etc/profile
#查看git版本
git --version
三、下载编译安装 groonga
Description:Groonga is an open-source fulltext search engine and column store. It lets you write high-performance applications that requires fulltext search.
编译安装:https://groonga.org/docs/install/centos.html#centos-7
PS:下载source进行源码编译,官网上的groonga-release-latest.noarch.rpm直接在本地安装会有问题(可能会存在文件缺失)。
wget https://packages.groonga.org/source/groonga/groonga-13.0.9.tar.gz --no-check-certificate
tar -xvzf groonga-13.0.9.tar.gz
cd groonga-13.0.9
#Configure
./configure
#编译Build
make -j$(grep '^processor' /proc/cpuinfo | wc -l)
#install
sudo make install
#install之后,执行如下命令查看当前系统安装了哪些库?
pkg-config --list-all
#查看是否能查到groonga,若没有查到groonga头文件和库文件的位置,编译器无法使用,需要设置PKG_CONFIG_PATH环境变量
#查找groonga.pc的位置
find / -name groonga.pc
#设置PKG_CONFIG_PATH环境变量
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
#查看是否可输出groonga
pkg-config --list-all
#正常可输出groonga Groonga - An Embeddable Fulltext Search Engine
四、下载安装 xxHash
Description:xxHash is an Extremely fast Hash algorithm, processing at RAM speed limits. Code is highly portable, and produces hashes identical across all platforms (little / big endian).
Vcpkg用于在Windows、Linux、Mac上管理C和C++库,极大简化了第三方库的安装,它由微软开源,源码地址:https://github.com/Microsoft/