在centos7 PHP环境 安装coreseek

第一步:安装编译环境
yum install epel-release
yum groupinstall “Development Tools”
wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
yum localinstall mysql57-community-release-el7-11.noarch.rpm
yum install mysql-community-devel
第二步:下载并解压coreseek
wget http://files.opstool.com/man/coreseek-4.1-beta.tar.gz
tar -xzvf coreseek-4.1-beta.tar.gz
cd coreseek-4.1-beta
第三步:安装mmseg
cd mmseg-3.2.14
./bootstrap
./configure --prefix=/opt/coreseek-4.1
make
make install
make clean
第四步:安装csft
先编辑configure.ac,修改

AM_INIT_AUTOMAKE([-Wall -Werror foreign])为

AM_INIT_AUTOMAKE([-Wall foreign])
cd csft-4.1/
./buildconf.sh
./configure --prefix=/opt/coreseek-4.1 --without-unixodbc --with-mmseg --with-mmseg-includes=/opt/coreseek-4.1/include/mmseg/ --with-mmseg-libs=/opt/coreseek-4.1/lib/ --with-mysql
make
make install
make clean
第五步:配置数据源
在 /opt/coreseek-4.1/etc/配置数据源csft.conf。
运行/opt/coreseek-4.1/bin/indxer --all生成索引
第六步:创建searchd服务
在/usr/lib/systemd/system/创建service文件searchd.service:
[Unit]
Description=Core Seek Searchd
After=syslog.target network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
PIDFile=/opt/coreseek-4.1/var/searchd.pid
ExecStart=/opt/coreseek-4.1/bin/searchd
ExecReload=/opt/coreseek-4.1/bin/searchd --stop
ExecStop=/opt/coreseek-4.1/bin/searchd --stop
PrivateTmp=true

[Install]
WantedBy=multi-user.target
执行 indexer --all创建索引
执行 systemctl enable searchd设置自动运行。
执行 systemctl start searchd运行服务。

测试分词
./mmseg -d /usr/local/coreseek-4.1/etc/ /coreseek-4.1-beta/testpack/var/test/test.xml

[Unit]
Description=Core Seek Searchd
After=syslog.target network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
PIDFile=/usr/local/coreseek-4.1/var/searchd.pid
ExecStart=/usr/local/coreseek-4.1/bin/searchd
ExecReload=/usr/local/coreseek-4.1/bin/searchd --stop
ExecStop=/usr/local/coreseek-4.1/bin/searchd --stop
PrivateTmp=true

[Install]
WantedBy=multi-user.target

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值