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
生活以痛吻我,我仍报之以歌 昨天晚上看到那个冯大辉老师的微信公众号,「小道消息」上的一篇文章,<生活以痛吻我,我仍报之以歌>.知乎一篇匿名回答,主题为<冯大辉到底是不是技术大牛,一个 ...
随机推荐
- 2017-06-19 (cp mkdir rm 运行级别及修改)
mkdir 用于创建目录 mkdir -p 递归创建目录 mkdir -p /linux/linux rm 用于删除文件与目录 rm -r 删除目录 -f 强制删除 (一般情况下 rf 组 ...
- python 爬取B站视频弹幕信息
获取B站视频弹幕,相对来说很简单,需要用到的知识点有requests.re两个库.requests用来获得网页信息,re正则匹配获取你需要的信息,当然还有其他的方法,例如Xpath.进入你所观看的视频 ...
- Maven 常用配置
pom.xml基础配置: <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEn ...
- word中正文分栏重新换页问题
小论文常需要正文分栏,但是标题.摘要不分栏的编排格式. 1.在摘要后面加入分隔符来将内容分为摘要和正文两个部分.选择 插入→分隔符→分节符(连续). 2.然后进行分栏.选择 格式→分栏. 3.此时如果 ...
- PDO prepare预处理语句
预处理语句 $dsn="mysql:host=localhost;dbname=emp"; try{ $pdo=new PDO($dsn,'root','root'); }catc ...
- Git 2.0 更改 push default
近期更新了git,项目push时会提示这样的信息: warning: push.default 尚未设置,它的默认值在 Git 2.0 已从 'matching' 变更为 'simple'.若要不再显 ...
- python下用OpenCV的圆形检测
写在文章前 这些天因为工作需要要学习图像检测,笨笨的我啥都不会要盯着OpenCV重头开始学(:′⌒`),甚至查资料能力都很弱弱〒▽〒 夸一下我最好的男票(*^▽^*) 男盆友也不是做图像处理的 但是 ...
- FindBugs简单应用
FindBugs是一种java代码的静态分析工具,无需开发人员费劲就能找出代码中可能存在的缺陷.FindBugs 不注重样式或者格式,它试图只寻找缺陷或者潜在的性能问题. 第一步,http://sou ...
- 洛谷 [P1341]无序字母对
这道题第一眼以为是一道字符串的题,但细想一下是一道求欧拉路的图论题. 把每一对对应关系看成一条边,本题即求这张图上是否存在一个欧拉回路或欧拉路,并要求字典序最小的方案,那么我们在dfs的时候就要从该点 ...
- 树莓派上运行.net core 2.0程序
记录中 参考: https://www.cnblogs.com/songxingzhu/p/7399991.html https://www.cnblogs.com/goodfulcom/p/7624 ...