[Manticore Search] 环境安装

目录

参考文献

创建应用

docker安装

Linux


参考文献

manticoresearch install

创建应用

可以选择 docker镜像安装 或 自己搭建环境。

docker安装

1、从网站https://www.docker.com/下载适用于我们平台的 Docker Desktop :

2、安装后,我们需要获取官方的 Manticore 图像。在应用程序的顶部栏中,有一个搜索栏。只需在其中输入“ManticoreSearch”即可。

3、在输出中,我们有“manticoresearch/manticore”。

至此,就可以在本机运行 Manticore Search docker镜像了。

Linux

以 Centos7为例,可以下载对应的依赖包,安装部署到服务器。

本地编写dockerfile

FROM centos:7.9.2009
 
COPY . /manticore-binaries
RUN cd /manticore-binaries && ls -al && bash install.sh
# install.sh
yum -y install *.rpm
# configure
mv manticore.ini /etc/supervisord.d/
mv manticore.conf /etc/manticoresearch/manticore.conf

*其中 *.rpm是预先下载好的manticore的依赖包(在生产环境无法通过网络下载这些依赖包)

arch 根据实际安装的镜像填写

[powerop@root ~]$ arch
x86_64
# manticore依赖包
arch=`arch`
yum -y install https://repo.manticoresearch.com/repository/manticoresearch/release/centos/7/${arch}/manticore-common-6.3.2_24062606.c296dc7c8-1.el7.centos.noarch.rpm \
https://repo.manticoresearch.com/repository/manticoresearch/release/centos/7/${arch}/manticore-server-6.3.2_24062606.c296dc7c8-1.el7.centos.${arch}.rpm \
https://repo.manticoresearch.com/repository/manticoresearch/release/centos/7/${arch}/manticore-server-core-6.3.2_24062606.c296dc7c8-1.el7.centos.${arch}.rpm \
https://repo.manticoresearch.com/repository/manticoresearch/release/centos/7/${arch}/manticore-tools-6.3.2_24062606.c296dc7c8-1.el7.centos.${arch}.rpm \
https://repo.manticoresearch.com/repository/manticoresearch/release/centos/7/${arch}/manticore-6.3.2_24062606.c296dc7c8-1.el7.centos.${arch}.rpm \
https://repo.manticoresearch.com/repository/manticoresearch/release/centos/7/${arch}/manticore-devel-6.3.2_24062606.c296dc7c8-1.el7.centos.noarch.rpm \
https://repo.manticoresearch.com/repository/manticoresearch/release/centos/7/${arch}/manticore-buddy-2.3.10_24052208.7612a4f-1.el7.noarch.rpm \
https://repo.manticoresearch.com/repository/manticoresearch/release/centos/7/${arch}/manticore-backup-1.3.8_24052208.57fc406-1.el7.noarch.rpm \
https://repo.manticoresearch.com/repository/manticoresearch/release/centos/7/${arch}/manticore-executor-1.1.6_24052206.c55bc2b-1.el7.${arch}.rpm \
https://repo.manticoresearch.com/repository/manticoresearch/release/centos/7/${arch}/manticore-columnar-lib-2.3.0_24052206.88a01c3-1.el7.centos.${arch}.rpm \
https://repo.manticoresearch.com/repository/manticoresearch/release/centos/7/${arch}/manticore-icudata.rpm \
https://repo.manticoresearch.com/repository/manticoresearch/release/centos/7/${arch}/manticore-galera-3.37-1.el7.${arch}.rpm \
https://repo.manticoresearch.com/repository/manticoresearch/release/centos/7/${arch}/manticore-tzdata-1.0.0_240522.a8aa66e-1.noarch.rpm

相关配置

[program:manticore]
user=root
command=/usr/bin/searchd --config /etc/manticoresearch/manticore.conf
autostart=true
stdout_logfile=/opt/logs/%(ENV_app_id)s/manticore.out
stdout_logfile_maxbytes=0
redirect_stderr=true
stopwaitsecs=60
priority=999
searchd {
    listen = 0.0.0.0:9312
    listen = 0.0.0.0:9306:mysql
    listen = 0.0.0.0:9308:http
    log = /var/log/manticore/searchd.log
    query_log = /var/log/manticore/query.log
    pid_file = /run/manticore/searchd.pid
    data_dir = /var/lib/manticore
}

Manticore 的配置文件(manticore.conf)包含了您可以使用的各种选项和参数来配置 Manticore 搜索引擎的行为。以下是一些常见的配置选项: 1. `index` 部分:您可以在这里定义索引的名称、路径、字段定义、停用词等。您可以使用 `path` 参数指定索引的存储路径,使用 `charset_table` 参数指定字符集,使用 `morphology` 参数指定词形还原器,等等。 2. `searchd` 部分:您可以在这里配置搜索守护进程的行为。例如,您可以定义监听的端口号(`listen` 参数)、查询超时时间(`query_timeout` 参数)、最大查询时间(`max_query_time` 参数)等。 3. `source` 部分:您可以在这里定义数据源的名称、类型和连接信息。例如,您可以使用 `mysql` 数据源连接到 MySQL 数据库,使用 `xmlpipe2` 数据源从 XML 文件中索引数据,等等。 4. `indexer` 部分:您可以在这里配置索引器的行为。例如,您可以定义索引任务的内存限制(`mem_limit` 参数)、临时文件路径(`tmpfs` 参数)、并行索引构建的线程数(`workers` 参数)等。 5. `searchd` 部分:您可以在这里配置搜索守护进程的行为。例如,您可以定义监听的端口号(`listen` 参数)、查询超时时间(`query_timeout` 参数)、最大查询时间(`max_query_time` 参数)等。 以上只是一些常见的配置选项示例。完整的配置文件选项和参数可以在 Manticore 的官方文档中找到(https://manual.manticoresearch.com/Configuration/Configuration_File.html)。 请注意,修改配置文件后,您需要重新启动 Manticore 以使更改生效。使用以下命令启动 Manticore:`searchd --config /path/to/manticore.conf`(将 `/path/to/manticore.conf` 替换为您实际的配置文件路径)。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值