Set up Sphinx in Linux

Source: Internet
Author: User
Set up Sphinx in Linux

First download the mysql and sphinx source code packages

Decompress sphinx:
> Tar zxvf sphinx-2.0.6-release.tar.gz

Decompress Mysql
> Tar zxvf mysql-5.1.42.tar.gz

Go to the mysql source code directory, in the mysql-5.1.42/storage directory to create a new sphinx Directory,

Go to the sphinx source code directory and copy all the files under the sphinx-2.0.6-release/mysqlse/directory to mysql-5.1.42/storage/sphinx.

Go to the mysql source code directory and execute the following command

123456789 > Sh BUILD/autorun. sh # it will execute the automake and autoconf commands to generate Makefile>. /configure -- prefix =/home/admin/mysql-5.1.42 -- with-charset = utf8 -- with-extra-charsets = all -- enable-thread-safe-client -- enable-character er --- readline -- with-big-tables -- with-plugins = sphins> make & make install> cp support-files/my-medium.cnf/etc/my. cnf # Copy the configuration file> cp. /support-files/mysql. server/etc/init. d/mysqld # register server Service> chmod + x/etc/init. d/mysqld> chkconfig mysqld on> service mysql start>/home/admin/mysql-5.1.42/bin/mysql_install_db # install database

After the execution is complete, no error occurs, indicating that mysql is successfully installed,

Log on to mysql

Run the show engines command to check whether the sphinx engine is successfully installed.

If there is a description, it will be successful!

The next step is to compile and install sphinx.

12345 # Set the directory for dynamically loading database search.> Ldconfig/home/admin/mysql-5.1.42/lib/mysql> ldconfig/home/admin/mysql-5.1.42/include/mysql>. /configure -- prefix =/home/admin/sphenders-2.0.6 -- with-mysql =/home/admin/mysql-5.1.42> make & make install

The installation is successful.

In the next chapter, let's take a look at how to use PHP to call the Sphinx service.

Related Article

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.