Linux installation sphinx+mariadb

Source: Internet
Author: User

1. Download Sphinx Source Package

http://sphinxsearch.com/downloads/current/

Copy link address in Xshell terminal use: wget http://sphinxsearch.com/files/sphinx-2.3.1-beta.tar.gz

  

Note: It is generally downloaded to the/USR/LOCAL/SRC directory (I define the/data/soft myself)

Installation is generally installed to/usr/local/sphinx (Sphinx This directory is custom)

Unzip in this directory using the tar command: Tar zxvf sphinx-2.3.1-beta.tar.gz

2, start the compilation note: Source code installation must be installed GCC, installation Kit

Installation Kit command: Yum-y install make gcc g++ gcc-c++ libtool autoconf automake imake mysql-devel libxml2-devel expat-devel Note: (Yum -Y is not necessary to determine the installation, can not install the installation is completed without error will be able to compile

installation command:./configure--prefix=/usr/local/sphinx (--prefix= installation directory)

The installation will tell you to compile, welcome to Sphinx

3. Make build compilation file does not compile

Make install to compile//warn ignore

can also be performed together: Make && makes install//if make error is followed by make install will not execute

(Boot command: chconfig--level 345 httpd on//apache boot chconfig--level mysqld 345 on MySQL boot)

4. Test into the installation directory

Cd/usr/local/sphinx/etc

Copy a configuration item first CP sphinx.conf.dist sphinx.conf

  

To configure:

VI sphinx.conf

Link database:

    

#这里我用了utf8mc4 emoji expression for special treatment

Note: In/usr/local/sphinx/ect This directory will have a SQL file to import this SQL file into the database

Command: Mysql-uroot-proot </usr/local/sphinx/etc/example.sql

Enter MySQL after executing the command to see if the import was successful

  

Build the index below Cd/use/local/sphinx/bin

./indexer--all generating All index files

./search the value to query

/indexer--all execution will appear

Here because of my previous database directory in/DATAS/SOFT/MARIADB

Execute the following command soft link to ln-s/datas/soft/mariadb/lib/libmysqlclient.so.18/usr/lib64/libmysqlclient.so.18

Index established successfully.

Linux installation sphinx+mariadb

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.