Terminal Terminal | Web Web
Home  //  Play

Manticore Search - Compiling on CentOS 7

Difficulty: Beginner
Estimated Time: 5 minutes

Manticoresearch - compiling on CentOS

In this tutorial you will learn how to compile Manticore Search on CentOS.

Manticore Search - Compiling on CentOS 7

Step 1 of 3

Step 1

Downloading Manticore package

Please note that some actions are already 'preloaded' - like downloading or actual compiling - as they would take longer to execute on our learning platform.

Let's start by installing the dependencies required for building a full-featured Manticore build

yum -y install gcc gcc-c++ make cmake mysql-devel expat-devel postgresql-devel unixODBC-devel openssl-devel boost-devel rpm-build systemd-units git flex bison

mysql,expat,postgresql and unixODBC are optional and used by indexer tool. There is one thing we need to take care off: the cmake version that come with CentOS7 is 2.8, which is not fine as manticore requires 3.13 or above. Cmake 3 is found in the EPEL repositories which can be installed with yum -y install epel-release.

yum -y install cmake3

Our next step is to clone the Manticore Search repository from GitHub to get the latest code:

'git clone https://github.com/manticoresoftware/manticoresearch.git'

Step 2

Compiling Manticore

In general it's best to use a separate folder when the building is done and not build inside the manticore code folder. We will use a folder 'build' :

'mkdir build'

Let's step into it:

cd build

The simplest way to build Manticore is to run 'cmake' and point to the source code folder

'cmake3 ../manticoresearch'

Please note that in other OSs cmake3 packages replace existing cmake2 in which case the executable used should be 'cmake'.

If no errors appear we can run the compiling:


The 2 commands above are already executed in the course instance, as they take long since the instance is in a limited power pod. On normal servers you should run 'make -jX' where is a number of compiling threads (adjust it depending on your server CPU).

The binaries can be found in the 'src' folder. We can also install them in the system by running:

make install

Now we can start Manticore:

/usr/local/bin/searchd -c /usr/local/etc/manticoresearch/manticore.conf

Step 3

Create RPM package

The Manticore compiling scripts can output RPM packages for easier distribution of the binaries. In the build folder we just need to instruct the platform for which we want to generate a package

cmake3 -D DISTR_BUILD=centos7 ../manticoresearch

And them instruct make to generate the package:

make package

The generated rpm package is wrote in the 'build' folder and can be immediately used to install Manticore.