Manticore Search - Compiling on CentOS 7
Downloading Manticore package
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
Since installing all the dependencies can take several minutes, this course comes with them preinstalled.
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
In general it's best to use a separate folder when the building is done and not build inside the manticore code folder. Let's create a 'build' folder:
and enter in it
The simplest way to build Manticore is to run 'cmake' and point to the source code folder
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 (IT MIGHT TAKE LONG HERE, but should be much faster on your PC/server):
The binaries can be found in the 'src' folder. We can also install them in the system by running:
Now we can start Manticore:
/usr/local/bin/searchd -c /usr/local/etc/manticoresearch/manticore.conf
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:
The generated rpm package is wrote in the 'build' folder and can be immediately used to install Manticore.