CentOs7 installation Xapian PHP Version
Record the installation Xapian1.2 's arduous journey!!!
There are two companies on the development machine PHP version 5.3 good 5.4!!! Because they are <5.4.5, I can only choose to install Xapian1.2 here . If the installation of 1.4, but also to upgrade GCC support c++11, but the upgrade is not a half-day upgrade success, so directly first use the 1.2 version.
1. Download:wget http://oligarchy.co.uk/xapian/1.4.4/xapian-core-1.4.4.tar.xz
2. Download:wget http://oligarchy.co.uk/xapian/1.4.4/xapian-bindings-1.4.4.tar.xz
3, respectively decompression these two bags. Tar xvf ...
4. here : Https://github.com/xapian/xapian-docsprint
wget Https://github.com/xapian/xapian-docsprint/archive/master.zip
There are some exampleswhere the Xapian example is here. Include some code that you can do as a tutorial.
5, ready to install the package. After decompression TAR–ZXVF into the file, view the install file, there are detailed instructions including you should install the library and other things. The following sections describe each installation step separately.
6, install the core file step about the following three steps
(1) Run "./configure", possibly with some extra arguments (Seebelow)
(2) Run ' make ' to build Xapian
3) Run ' make install ' to Installxapian'make install remember sudo'
7, may be missing some libraries, you can use yum"Install zlib-devel" "Install libuuid-devel" These two libraries.
8, after the installation of The core can be checked:
Xapian-config--version will display the current version information if it is not a problem.
Second, install PHP bindings also can view install file.
before installing you need to confirm that you have installed the corresponding language -devel, because I am PHP so I need to install php-devel. The lack of what to install on their own good. After the preparation condition is done, the installation begins, and the same three steps are required:
(1) ./configure--prefix=/usr/local/xapianxapian_config=/usr/home/shixi_fulin1/xapian1.2/ core-xapian-1.2.24/xapian-config--with-php Php=/usr/local/sinasrv2/bin/phpphp_extension_dir=/usr/local/sinasrv2 /lib/php/extensions/no-debug-non-zts-20100525php_config=/usr/local/sinasrv2/bin/php-config
because I have two php versions here, I need to specify the desired version. Mainly php directories,php-config directories, and PHP extensions directory. The front of the xapian_config to configure their own just fine.
Ps: It is here, at first did not set these parameters and then it chose /usr/bin the following php, and then I compiled myself with another version, is simply!!!!!!
If there's no problem here, go ahead.
(2) Make
(3) make Install
(4) After successful execution go to your PHP extension directory and the opening has no xapian.so this module. Some words to php.ini"/usr/local/sinasrv2/lib/php.ini" Add extension=xapian.so; Finally, check if you have this module.
Sudo/usr/local/sinasrv2/bin/php–m | grep Xapian
10, to now install the Xapian and PHP language bindings . Here's what you can do with the example . You can refer to the following.
Reference: Ubuntu Lower Xapian installation (with Xapian not complete)
Http://www.xuebuyuan.com/1935942.html
Http://getting-started-with-xapian.readthedocs.io/en/latest/overview.html
Lack of what package Baidu installation is good. If you have any questions, please ask.
CentOS7 Xapian 1.2 Installing PHP bindings