search
Homephp教程php手册sphinx利用配置来进行分布式部署的方法和配置详解

1:主配置文件 dist.conf

source sour1{}建立源1

index index1{}建立索引1   这些配置不多说

index dist{

      type = distributed //表示为分布式

      local = index1    //本地索引

      agent = localhost:9311:index2   //分布式其它索引ip地址端口和索引名称  可以有多个

}

searchd{

 listen = 9312

pid_file = F:/www/sphinx/data/searchd_mysql.pid

}

2:第二个配置文件 dist1.conf

source source2{}

index index2{}

searchd{

 listen = 9311//这里的端口和pid_file一定不要和上面的重复,应为这要分别开始守护进程的,避免冲突

pid_file = F:/www/sphinx/data/searchd_mysqls.pid

}

然后先开dist1.conf的searchd守护,然后再开dist.conf守护,就可以用了,

注意:要确保两份源数据一致,否则会有错误。貌似在liunx下一份配置就可以做分布式,我没试过,windows下没成功,有高人知道的话可以回帖分享一下。

配置文件说,

在有多个CPU和硬盘的机器上,代理可以指向相同的机器以便并行地使用硬件,降低查询延迟。并不需要为此设置多个searchd实例,一个实例与自身通信是合法的。但是不清楚windows下可行不。



Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment