Centos下安装php扩展sphinx
官方地址:http://pecl.php.net/package/sphinx
wget http://pecl.php.net/get/sphinx-1.3.3.tgz
tar -zxvf sphinx-1.3..tgz
安装php扩展必须有php-devel,没有php-devel就缺少phpize,就不会产生源代码文件,yum安装测试一下
yum install php-devel
cd /usr/local/src/coreseek-4.1-beta/testpack/api/libsphinxclient/
./configure
checking for strings.h... (cached) yes
checking for unistd.h... (cached) yes
checking for stdint.h... (cached) yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sphinxclient_config.h
config.status: executing depfiles commands
make && make install
more information, such as the ld() and ld.so() manual pages.
----------------------------------------------------------------------
test -z "/usr/local/include" || mkdir -p -- "/usr/local/include"
/usr/bin/install -c -m 'sphinxclient.h' '/usr/local/include/sphinxclient.h'
make[]: Leaving directory `/usr/local/src/coreseek-4.1-beta/testpack/api/libsphinxclient'
cd /usr/local/src/sphinx-1.3.
phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
./configure --with-php-config=/usr/bin/php-config --with-sphinx
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
make && make install
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /usr/lib64/php/modules/
cd /etc/php.d/ //还需要修改配置文件
vim sphinx.ini //下面两行写入该文件
; Enable gd extension module
extension=sphinx.so
<?php // echo phpinfo();
header("Content-type:text/html;charset=utf-8");
echo '<pre>';
$sphinx_obj = new SphinxClient();
$sphinx_obj->setServer('127.0.0.1',);
$sphinx_obj->setMatchMode(SPH_MATCH_ANY);
$res = $sphinx_obj->query('php','*');
var_dump($sphinx_obj);
exit();
百度、必应、google、搜狗、360都搜过了,遇到同样的求助问题,但一直没有解决方案~~不知道哪里错了~前辈们看到请留下您的脚步~谢谢哈~
Centos下安装php扩展sphinx的更多相关文章
- centos下安装php扩展php-memcached
说来坎坷,为了安装这个php的扩展php-memcached,连操作系统都换了,从centos5.5升级到了centos6.8!! centos5.5中在安装php扩展php-memcached的依赖 ...
- CentOs下安装PHP扩展curl
服务器运行一段时间后,可能突然会需求添加某个扩展,如curl.pdo.xmlrpc等,这就需要在不重新编译Linux PHP的情况下独立添加扩展. 1.安装crul wget http://curl. ...
- Centos下安装PHP ldap扩展
Centos下安装PHP ldap扩展,有两种方法,仅供参考. 一.在线安装 执行下面命令: 1 yum install PHP-ldap 可能出现的问题: Error: php70w-common- ...
- centos下安装php环境
centos下安装php环境 安装apache yum install httpd-devel 启动apache /etc/init.d/httpd start 安装mysql yum install ...
- Centos下安装配置LAMP(Linux+Apache+MySQL+PHP)
Centos下安装配置LAMP(Linux+Apache+MySQL+PHP) 关于LAMP的各种知识,还请大家自行百度谷歌,在这里就不详细的介绍了,今天主要是介绍一下在Centos下安装,搭建一 ...
- CentOS下安装pip
CentOS下安装pip 通常情况下使用命令: yum -y install pip 也有可能报错,无法安装.这是应该使用第二种方法. 1.首先需要先安装扩展源EPEL: yum -y install ...
- CentOS下安装hadoop
CentOS下安装hadoop 用户配置 添加用户 adduser hadoop passwd hadoop 权限配置 chmod u+w /etc/sudoers vi /etc/sudoers 在 ...
- CentOS下安装使用start-stop-daemon
CentOS下安装使用start-stop-daemon 在centos下下了个自启动的服务器脚本 执行的时候发现找不到start-stop-daemon命令 好吧 执行手动编译一下 加上这个命令 w ...
- 从零开始学 Java - CentOS 下安装 Tomcat
生活以痛吻我,我仍报之以歌 昨天晚上看到那个冯大辉老师的微信公众号,「小道消息」上的一篇文章,<生活以痛吻我,我仍报之以歌>.知乎一篇匿名回答,主题为<冯大辉到底是不是技术大牛,一个 ...
随机推荐
- (2-1)SpringCloue-Eureka实现高可用注册中心
高可用注册中心 在微服务架构这样的分布式环境中,我们需要充分考虑发生故障的情况,所以在生产环境中必须对各个组件进行高可用部署.在eureka-server中的application.yml中我们还记得 ...
- mybatis-自定义缓存-redis二级缓存
在mybatis一级缓存二级缓存中已经介绍过了二级缓存的大致原理.下面我们用redis来实现一下二级缓存.环境是springmvc+mybatis+redis 步骤一.引入redis相关的maven依 ...
- linux_思想
linux有哪些重要的思想? 1. 做的越多错的越多 2. 纸包不住火 3. 操作重要文件前备份,操作后查看结果 4. 看到命令输出结果,可能命令有个选择直接获得对应值 5. 先定行,再定列
- VMware PowerCLi 使用示例
这几天研究PowerCLI,积累了几个例子,记下来,以便以后或者大家使用.部分例子来着网络,具体出处参考附录 1 获取vm 磁盘 和磁盘对应的datastore的信息 这个例子可以针对一台虚机有多个磁 ...
- Servlet--ServletConfig接口,GenericServlet类
ServletConfig接口 定义:public interface ServletConfig 这个接口定义了一个对象, 通过这个对象, Servlet 引擎配置一个 Servlet 并且允许 S ...
- Jmeter_接口自动化基础流程概述
这里补一篇基础的操作吧,不然总觉得没底! 1:创建一个线程组 2:添加一个cookie管理器 33333 3:设置你的信息头管理器:application/json;text/plain;ch ...
- python 字符串操作方法详解
字符串序列用于表示和存储文本,python中字符串是不可变对象.字符串是一个有序的字符的集合,用于存储和表示基本的文本信息,一对单,双或三引号中间包含的内容称之为字符串.其中三引号可以由多行组成,编写 ...
- sparse_softmax_cross_entropy_with_logits
sparse_softmax_cross_entropy_with_logits 原创文章,请勿转载!!! 定义 sparse_softmax_cross_entropy_with_logits(_s ...
- 官方新出的 Kotlin 扩赞库 KTX,到底帮你干了什么?
Kotlin KTX 2月5号的时候,Google 发布了一款 Kotlin 的扩展库,叫 Android KTX,不过现在还处于预览版的状态.它能使 Android 上的 Kotlin 代码更简洁, ...
- struts2--实现自定义拦截器
前言: 本篇文章,我想说清实现拦截器的办法,还有为什么要这样做: 目录: 1.需求目的 2.实现步骤及原理(文字怕描述不清,画图描述) 3.代码 4.总结 一.需求目的 规范或限制越级访问(例如:一个 ...