PHP installation Xunserch

Source: Internet
Author: User

Installation steps for Xunserch

Note: Xunserch can only be used under Linux

1. Install Dependent tools

Yum install make gcc g++ gcc-c++ libtool autoconf automake imake mysql-devel libxml2-devel expat-devel

2. Enter the installation directory

Cd/usr/local

3. Download the installation package

wget http://www.xunsearch.com/download/xunsearch-full-latest.tar.bz2
TAR-XJF xunsearch-full-latest.tar.bz2

4, the implementation of the installation script is mainly xunsearch to enter the software package installation directory.

CD xunsearch-full-1.4.10/
SH setup.sh

5. After installation, you can start/close the Xunsearch service with your own script ($prefix/bin/xs-ctl.sh). Examples of usage:

$prefix/bin/xs-ctl.sh Start # Default boot, bind local 8383/8384 port
$prefix/bin/xs-ctl.sh-b inet Start # binds all IPs, suitable for sdk/different servers on the service side
$prefix/bin/xs-ctl.sh Stop # Stops the server and, if you specify-B inet on startup, you must specify

6. Special Tips

All index data for the search will be saved to the $prefix/data directory, so if you want the data directory to be arranged separately, use the soft connection form to ensure that $prefix/data chain to the real data directory. In addition, if the server starts with the-b inet parameter, protect it with iptables or other firewall tools, and Xunsearch itself does not perform other validation processing for performance reasons.

Other precautions:

1. If your SDK calls and Xunsearch servers are not on the same server, use the-B inet mode to start the script and be aware of the iptables-like firewall to control access to the 8383/8384 two ports of Xunsearch. The startup script uses the following examples:

Bin/xs-ctl.sh-b Local start//listener on 127.0.0.1 loopback address
Bin/xs-ctl.sh-b inet start//monitor on all local IP addresses
Bin/xs-ctl.sh-b a.b.c.d Start//Listen on the specified IP I am not on the same server, so I choose this one (bin/xs-ctl.sh-b 195.241.23.32 start)
Bin/xs-ctl.sh-b UNIX start//monitor separately in Tmp/indexd.sock and Tmp/searchd.sock

2, configure the firewall, open 8383 ports, 8384 ports

Vi/etc/sysconfig/iptables
-A input-m state--state new-m tcp-p TCP--dport 8383-j ACCEPT #允许8383端口通过防火墙
-A input-m state--state new-m tcp-p TCP--dport 8484-j ACCEPT #允许8384端口通过防火墙

/etc/init.d/iptables Restart #重启防火墙使配置生效

3. Use Netstat-anlpt to view the port (kill the process kill-9 process ID of the consuming port)

4, detection of PHP-SDK operating conditions

$prefix/sdk/php/util/requiredcheck.php $prefix #替换成你的安装目录

5. Now that the installation and preparation has been completed, you can start using Xunsearch php-sdk to develop your own search application.

PHP installation Xunserch

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.