Установка ManticoreSearch 4.0.3 на FreeBSD 12.2

Версия MySQL:
mysql -V
mysql Ver 14.14 Distrib 5.7.34, for FreeBSD12.2 (amd64) using EditLine wrapper

Версия FreeBSD:
uname -a
FreeBSD manticoresearch.com 12.2-RELEASE FreeBSD 12.2-RELEASE r366954 GENERIC amd64

Скачиваю Мантикору 4.0.3 с гитхаба:
wget "https://github.com/manticoresoftware/manticoresearch/archive/refs/heads/master.zip"

Распаковываю unzip master.zip

Захожу в распакованный каталог

  1. pkg install cmake bison flex icu expat

  2. pkg install galera26

  3. pkg install cmake-3.21.3

  4. Установка через cmake

cmake -DUSE_GALERA=0 -DWITH_MYSQL=1 -DWITH_RE2=1 -DWITH_EXPAT=1 -DWITH_STEMMER=1 -DDISABLE_TESTING=1 -DCMAKE_INSTALL_PREFIX=/usr/local/manticore4

  1. make

  2. make install

    Consolidate compiler generated dependencies of target udfexample
    [ 1%] Built target udfexample
    [ 2%] Generate version from sources
    – Version not changed: 4.0.3 fda3f525a@211109, from tarball

....................................................

Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/local/manticore4/etc/manticoresearch/manticore.conf
-- Installing: /usr/local/manticore4/share/manticore/stopwords
-- Installing: /usr/local/manticore4/share/manticore/stopwords/af
-- Installing: /usr/local/manticore4/share/manticore/stopwords/ar
-- Installing: /usr/local/manticore4/share/manticore/stopwords/bg
-- Installing: /usr/local/manticore4/share/manticore/stopwords/bn
-- Installing: /usr/local/manticore4/share/manticore/stopwords/ca
-- Installing: /usr/local/manticore4/share/manticore/stopwords/ckb
-- Installing: /usr/local/manticore4/share/manticore/stopwords/cz
-- Installing: /usr/local/manticore4/share/manticore/stopwords/da
-- Installing: /usr/local/manticore4/share/manticore/stopwords/de
-- Installing: /usr/local/manticore4/share/manticore/stopwords/el
-- Installing: /usr/local/manticore4/share/manticore/stopwords/en
-- Installing: /usr/local/manticore4/share/manticore/stopwords/eo
-- Installing: /usr/local/manticore4/share/manticore/stopwords/es
-- Installing: /usr/local/manticore4/share/manticore/stopwords/et
-- Installing: /usr/local/manticore4/share/manticore/stopwords/eu
-- Installing: /usr/local/manticore4/share/manticore/stopwords/fa
-- Installing: /usr/local/manticore4/share/manticore/stopwords/fi
-- Installing: /usr/local/manticore4/share/manticore/stopwords/fr
-- Installing: /usr/local/manticore4/share/manticore/stopwords/ga
-- Installing: /usr/local/manticore4/share/manticore/stopwords/gl
-- Installing: /usr/local/manticore4/share/manticore/stopwords/he
-- Installing: /usr/local/manticore4/share/manticore/stopwords/hi
-- Installing: /usr/local/manticore4/share/manticore/stopwords/hr
-- Installing: /usr/local/manticore4/share/manticore/stopwords/hu
-- Installing: /usr/local/manticore4/share/manticore/stopwords/hy
-- Installing: /usr/local/manticore4/share/manticore/stopwords/id
-- Installing: /usr/local/manticore4/share/manticore/stopwords/it
-- Installing: /usr/local/manticore4/share/manticore/stopwords/ja
-- Installing: /usr/local/manticore4/share/manticore/stopwords/ko
-- Installing: /usr/local/manticore4/share/manticore/stopwords/la
-- Installing: /usr/local/manticore4/share/manticore/stopwords/languages_list.txt
-- Installing: /usr/local/manticore4/share/manticore/stopwords/lt
-- Installing: /usr/local/manticore4/share/manticore/stopwords/lv
-- Installing: /usr/local/manticore4/share/manticore/stopwords/mr
-- Installing: /usr/local/manticore4/share/manticore/stopwords/nl
-- Installing: /usr/local/manticore4/share/manticore/stopwords/no
-- Installing: /usr/local/manticore4/share/manticore/stopwords/pl
-- Installing: /usr/local/manticore4/share/manticore/stopwords/pt
-- Installing: /usr/local/manticore4/share/manticore/stopwords/ro
-- Installing: /usr/local/manticore4/share/manticore/stopwords/ru
-- Installing: /usr/local/manticore4/share/manticore/stopwords/sk
-- Installing: /usr/local/manticore4/share/manticore/stopwords/sl
-- Installing: /usr/local/manticore4/share/manticore/stopwords/so
-- Installing: /usr/local/manticore4/share/manticore/stopwords/st
-- Installing: /usr/local/manticore4/share/manticore/stopwords/sv
-- Installing: /usr/local/manticore4/share/manticore/stopwords/sw
-- Installing: /usr/local/manticore4/share/manticore/stopwords/th
-- Installing: /usr/local/manticore4/share/manticore/stopwords/tr
-- Installing: /usr/local/manticore4/share/manticore/stopwords/yo
-- Installing: /usr/local/manticore4/share/manticore/stopwords/zh
-- Installing: /usr/local/manticore4/share/manticore/stopwords/zu
-- Installing: /usr/local/manticore4/var/lib/manticore/data
-- Installing: /usr/local/manticore4/var/run/manticore
-- Installing: /usr/local/manticore4/var/log/manticore
-- Installing: /usr/local/manticore4/share/manticore/icu/icudt65l.dat
-- Installing: /usr/local/manticore4/share/manticore/modules/libgalera_manticore.so
-- Installing: /usr/local/manticore4/bin/searchd
-- Installing: /usr/local/manticore4/bin/indexer
-- Installing: /usr/local/manticore4/bin/indextool
-- Installing: /usr/local/manticore4/bin/spelldump
-- Installing: /usr/local/manticore4/bin/wordbreaker
-- Installing: /usr/local/manticore4/bin/index_converter
-- Installing: /usr/local/manticore4/include/manticore/sphinxudf.h

/usr/local/manticore4/bin/indexer -v

Manticore 4.0.3 fda3f525a@211109 dev
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2021, Manticore Software LTD (https://manticoresearch.com)
/usr/local/manticore4/bin/searchd -v

Manticore 4.0.3 fda3f525a@211109 dev
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2021, Manticore Software LTD (https://manticoresearch.com)

END

1 Like

На момент, когда настраивали CI на фряхе, там ещё не было cmake с поддержкой .pkg
(вроде как в 3.21.X подвезли, но конкретно на фряхе надо было либо из исходников, либо предыдщий 3.19, который этого не мог).
Как только станет возможно делать cmake --build package, чтобы создавал .pkg - попробуем вставить это в сборочную виртуалку.

Для Manticore 5.0.2 под 13.1 описанный вариант не зашел. Но есть как мне кажется проще:

wget -c https://github.com/manticoresoftware/manticoresearch/archive/refs/tags/5.0.2.tar.gz

** Помня что версия может измениться

mkdir build
cd build
cmake …
make install clean

** Я создал юзера и группу _manticore, соответственно pid и логам права поправить надо и по аналогии со старым сфинксовым получился инитскрипт

/usr/local/etc/rc.d/manticoresearch
#!/bin/sh

# PROVIDE: manticoresearch
# REQUIRE: LOGIN
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable manticoresearch:
#
# manticoresearch_enable="YES"
#
# Other rc.conf variables:
#
# manticoresearch_conffile="/usr/local/etc/manticoresearch/manticore.conf"
#                          -- path to config file
# manticoresearch_pidfile="/usr/local/var/run/manticore/searchd.pid"
#                          -- location of pidfile: must match setting
#                             in ${manticoresearch_conffile}
# manticoresearch_user="_manticore"
#                          -- user to run searchd as
# manticoresearch_group="_manticore"
#                          -- group to run searchd as
# manticoresearch_logdir="/var/log/manticoresearch"
#                          -- directory searchd writes logs to
# manticoresearch_dir="/var/db/manticoresearch"
#                          -- working directory used by searchd et al:
#                             must match setting in ${manticoresearch_conffile}
#
. /etc/rc.subr

name=manticoresearch
rcvar=manticoresearch_enable

load_rc_config ${name}

: ${manticoresearch_enable="NO"}
: ${manticoresearch_conffile="/usr/local/etc/manticoresearch/manticore.conf"}
: ${manticoresearch_pidfile="/usr/local/var/run/manticore/searchd.pid"}
: ${manticoresearch_user="_manticore"}
: ${manticoresearch_group="_manticore"}
: ${manticoresearch_logdir="/var/log/manticoresearch"}
: ${manticoresearch_dir="/var/db/manticoresearch"}

command=/usr/local/bin/searchd
pidfile=${manticoresearch_pidfile}
required_files=${manticoresearch_conffile}
start_precmd=manticoresearch_prestart

manticoresearch_prestart ()
{
    piddir=$(dirname ${manticoresearch_pidfile})
    if [ ! -d ${piddir} ]; then
        mkdir -m 755 -p ${piddir}
        chown -R ${manticoresearch_user}:${manticoresearch_group} ${piddir}
    fi
    if [ ! -d ${manticoresearch_logdir} ]; then
        mkdir -m 755 -p ${manticoresearch_logdir}
        chown -R ${manticoresearch_user}:${manticoresearch_group} \
            ${manticoresearch_logdir}
    fi
    if [ ! -d ${manticoresearch_dir} ]; then
        mkdir -m 755 -p ${manticoresearch_dir} ${manticoresearch_dir}/data
        chown -R ${manticoresearch_user}:${manticoresearch_group} \
            ${manticoresearch_dir}
    fi
}

case "${manticoresearch_flags}" in
    *--config\ *)
    echo "Warning \$manticoresearch_flags includes --config option." \
        "Please use \$manticoresearch_conffile instead."
    ;;
    *)
    manticoresearch_flags="--config ${manticoresearch_conffile} ${manticoresearch_flags}"
    ;;
esac

run_rc_command "$1"

После только прописать в rc.conf manticoresearch_enable=“YES” и оно работает

1 Like