安装过程
安装xapian-core
wget http://oligarchy.co.uk/xapian/1.0.13/xapian-core-1.0.13.tar.gz
tar zxvf xapian-core-1.0.13.tar.gz
cd xapian-core-1.0.13
./configure --prefix=/usr/local/xapian
make
make install
安装xapian-bindings
wget http://oligarchy.co.uk/xapian/1.0.13/xapian-bindings-1.0.13.tar.gz
tar zxvf xapian-bindings-1.0.13.tar.gz
cd xapian-bindings-1.0.13
#必须加上下面这行,否则在配置xapian-bindings会报错,默认在/usr/local/bin下面查找xapian-config
ln -s /usr/local/xapian/bin/xapian-config /usr/local/bin/xapian-config
./configure --with-php --prefix=/usr/local/xapian-bindings
make
make install
执行完上述的make && make install以后,xapian.so文件就自动拷贝到目录
/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20060613
下面了
xapian的安装是怎么知道php的相关路径的呢,我想应该是这样的,在环境变量$PATH下自动查找php-config,如果找到了php-config
[root@LocalWeb01 sbin]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/php-5.3.10/bin
vi /usr/local/webserver/php/etc/php.ini,加入如下的一行
extension = "xapian.so"
然后执行php -m | grep xapian,发现已经出现xapian模块了,证明xapian已经生效了
php -m | grep xapian