安装xunsearch,按命令来就行
第一步选择安装目录一般如下
cd /usr/local
第二步wget安装包,最新版
wget http://www.xunsearch.com/download/xunsearch-full-latest.tar .bz2
第三步 解压
tar -xjf xunsearch-full-latest.tar.bz2
第四部执行脚本
cd cd xunsearch-full-1.4.10
sh setup.sh
y //选择荐我使用默认,自己也可以改
安装成功会显示:

| Installation completed successfully, Thanks you |

| 安装成功,感谢选择和使用 xunsearch |

+------------此处省略N字....----------------------+

接下来就执行下面命令:

cd /usr/local/xunsearch/sdk/php/app
cp demo.ini tipask.ini
vim tipask.ini
加入如下代码:(按i编辑)

project.name = tipask
project.default_charset = utf-8
server.index = 8383
server.search = 8384

[id]
type = id

[cid]
type = numeric

[cid1]
type = numeric

[cid2]
type = numeric

[cid3]
type = numeric

[author]

[authorid]
type = numeric

[answers]
type = numeric

[status]
type = numeric

[time]
type = numeric

[title]
type = title

[description]
type = body

最后按:wq保存,重启xunsearch;

/usr/local/xunsearch/bin/xs-ctl.sh start

然后配置开机启动

vi /etc/rc.d/rc.local

/usr/local/search/bin/xs-ctl.sh start

chmod +x /etc/rc.d/rc.local

到此为止,后台就可以启用xunsearch了,到tipask后台开启xunsearch使用

如果出现:

configure: error: no acceptable C compiler found in $PATH

See `config.log' for more details

ERROR: failed to configure scws, see 'setup.log' for more detail

解决方案,安装g++

yum install gcc-c++

y //确认选择Y就可以

看到:Complete!就说明安装成功

然后再重新执行

sh setup.sh

如果出现

configure: error: zlib.h not found - required for brass, chert and flint (you may need to install the zlib1g-dev or zlib-devel package)

ERROR: failed to configure xapian-core-scws, see 'setup.log' for more detail

解决方法,安装 zled-devl

yum install zlib-devel

Y // 选项默认Y就行

Last modification:December 4, 2017
If you think my article is useful to you, please feel free to appreciate