Linux下CoreSeek及PHP扩展模块的安装
本人安装CoreSeek的系统为Centos6.0 CoreSeek版本: coreseek 3.2.14:点击下载 PHP:PECL/Sphinx扩展:sphinx-1.2.0.tgz 点击下载 。这些软件是都是源码包,我们是要通编译进行安装的。
前提条件是系统己安装完成apache mysql php的WEB服务。我是以yum来安装的。如果你没有安装过请按照下面给出的链接先完成基本的LAMP环境的安装。
LAMP安装教程:http://www.jb51.net/article/31379.htm (安装之前大家可以先关闭Selinx及Iptables防火墙具体操作也可以在本博客找到。)
第一步、下载上面提到地两个源码包、并上传到Linux下的 /lamp 目录,如果目录不存在大家可以自行建立。
第二步、要完成一下CorreSeek安装操作系统基础开发库及mysql依赖库以支持mysql数据源和xml数据源,
coreseek安装需要预装的软件:yum install make gcc g++ gcc-c++ libtool autoconf automake imake mysql-devel libxml2-devel expat-devel
大家可以先用rpm -q 包名 的方式来查看你的系统是否安装过包,如果有安装过就可以不用安装,比如mysql-devel这个我们就不需要安装,因为我们在安装LAMP环境时就己安装过了。
第三步、安装mmseg
$ tar xzvf coreseek-3.2.14.tar.gz
$ cd coreseek-3.2.14
$ cd mmseg-3.2.14
$ ./bootstrap #输出的warning信息可以忽略,如果出现error则需要解决
$ ./configure --prefix=/usr/local/mmseg3
$ make && make install
$ cd ..
第四步、安装coreseek
$ cd csft-3.2.14
$ sh buildconf.sh #输出的warning信息可以忽略,如果出现error则需要解决
$ ./configure --prefix=/usr/local/coreseek --without-unixodbc --with-mmseg --with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg3/lib/ --with-mysql ##如果提示mysql问题,可以查看MySQL数据源安装说明
$ make && make install
$ cd ..
现在安装完成了,就可以到 /usr/local/ 查看是否有mmseg3及coreseek目录,如果存在说明己正确安装。
第五步、进行安装sphinx-1.2.0.tgz 的PHP 扩展
在安装扩展之前我需要先配置一下CoreSeek的配置文件并启动 searchd服务 searchd的位置在/usr/local/coreseek/bin/目录下。这个配置怎么设置我先不说了,因为我也在研究当中。我会在这里提供我的配置文件给大。便于下面安装PHP扩展,完成安装后大家可以慢慢研究CoreSeek的功能。
点击下载配置文件 并放到/usr/local/coreseek/etc/下。
现在回到 /lamp/目录下。
$ tar xzvf sphinx-1.2.0.tgz
$ cd sphinx-1.2.0
$ phpize #这里大家如果提示没有这个工具,大家可以用 yum install php-devel来安装这个软件。
$ cd ../coreseek-3.2.14/csft-3.2.14/api/libsphinxclient/
$ ./configure
$ make && make install
$ cd-
$./configurl --with-php-config=/usr/bin/php-config --with-sphinx
$ make && make install
$ vi /etc/php.ini
#查找extension加载模块的地方添加以下一行配置保存退出重启apache服务就可以用phpinfo()来查看是否己安装上。
extension=sphinx.so
$ :wq
$ service httpd restart

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











Multiple calls to session_start() will result in warning messages and possible data overwrites. 1) PHP will issue a warning, prompting that the session has been started. 2) It may cause unexpected overwriting of session data. 3) Use session_status() to check the session status to avoid repeated calls.

IIS and PHP are compatible and are implemented through FastCGI. 1.IIS forwards the .php file request to the FastCGI module through the configuration file. 2. The FastCGI module starts the PHP process to process requests to improve performance and stability. 3. In actual applications, you need to pay attention to configuration details, error debugging and performance optimization.

Docker is important on Linux because Linux is its native platform that provides rich tools and community support. 1. Install Docker: Use sudoapt-getupdate and sudoapt-getinstalldocker-cedocker-ce-clicotainerd.io. 2. Create and manage containers: Use dockerrun commands, such as dockerrun-d--namemynginx-p80:80nginx. 3. Write Dockerfile: Optimize the image size and use multi-stage construction. 4. Optimization and debugging: Use dockerlogs and dockerex

AI can help optimize the use of Composer. Specific methods include: 1. Dependency management optimization: AI analyzes dependencies, recommends the best version combination, and reduces conflicts. 2. Automated code generation: AI generates composer.json files that conform to best practices. 3. Improve code quality: AI detects potential problems, provides optimization suggestions, and improves code quality. These methods are implemented through machine learning and natural language processing technologies to help developers improve efficiency and code quality.

session_start()iscrucialinPHPformanagingusersessions.1)Itinitiatesanewsessionifnoneexists,2)resumesanexistingsession,and3)setsasessioncookieforcontinuityacrossrequests,enablingapplicationslikeuserauthenticationandpersonalizedcontent.

DMA in C refers to DirectMemoryAccess, a direct memory access technology, allowing hardware devices to directly transmit data to memory without CPU intervention. 1) DMA operation is highly dependent on hardware devices and drivers, and the implementation method varies from system to system. 2) Direct access to memory may bring security risks, and the correctness and security of the code must be ensured. 3) DMA can improve performance, but improper use may lead to degradation of system performance. Through practice and learning, we can master the skills of using DMA and maximize its effectiveness in scenarios such as high-speed data transmission and real-time signal processing.

macOSandLinuxbothofferuniquestrengths:macOSprovidesauser-friendlyexperiencewithexcellenthardwareintegration,whileLinuxexcelsinflexibilityandcommunitysupport.macOS,developedbyApple,isknownforitssleekinterfaceandecosystemintegration,whereasLinux,beingo

Handling high DPI display in C can be achieved through the following steps: 1) Understand DPI and scaling, use the operating system API to obtain DPI information and adjust the graphics output; 2) Handle cross-platform compatibility, use cross-platform graphics libraries such as SDL or Qt; 3) Perform performance optimization, improve performance through cache, hardware acceleration, and dynamic adjustment of the details level; 4) Solve common problems, such as blurred text and interface elements are too small, and solve by correctly applying DPI scaling.
