全文索引可以减轻服务器的压力,ShopNC自带全文索引 ShopNC xunsearch全文索引 linux安装全过程
1.运行下面指令下载讯搜和解压讯搜
wget http://www.xunsearch.com/download/xunsearch-full-latest.tar.bz2
tar -xjf xunsearch-full-latest.tar.bz2
2,执行安装脚本,根据提示进行操作
cd xunsearch-full-1.4.8/
sh setup.sh
3,待命令运行结束后,如果没有出错中断,则表示顺利安装完成,然后就可以启动/重新启动 xunsearch的后台服务,下面命令中的 $prefix 请务必替换为您的安装目录,而不是照抄。
bin/xs-ctl.sh restart
强烈建议您将此命令添加到开机启动脚本中,以便每次服务器重启后能自动启动搜索服务程序,在 Linux 系统中您可以将脚本指令写进 /etc/rc.local 即可。
ShopNC修改文件
1,首先打开www.96net.com.cn/data/config/config.ini.php找到以下代码
- $config['fullindexer']['open'] = true;
- $config['fullindexer']['appname'] = 'shopnc';
- project.name = shopnc
- server.index = 127.0.0.1:8383
- server.search = 127.0.0.1:8384
- user/local/bin/xs-ctl.sh -b inet start