以下操作均在root用户下运行
- 安装编译环境
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
在执行make命令会有些error安提示修改相关cpp文件重新make即可。
- 配置数据源
在/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
运行服务。
网友评论