ubuntu22.04 安装 xunsearch 全文搜索引擎
xunsearch官方的文档对于新手来说不够友好,安装报错无从下手,有些东西也落后发行版太多,本文可谓是新手救星!
官网文档:http://xunsearch.com/doc/php/guide/start.installation
如果出现 ERROR: failed to compile libevent 错误,参考文章:https://www.bestyii.com/topic/251
安装程序
下载安装包
wget http://www.xunsearch.com/download/xunsearch-full-latest.tar.bz2
解压安装包
tar -xjf xunsearch-full-latest.tar.bz2
安装依赖包
sudo apt install gcc g++ zlib1g zlib1g-dev
执行安装
cd xunsearch-full-latest && bash setup.sh
开机启动
创建 xunsearch.service 文件
sudo nano /etc/systemd/system/xunsearch.service
xunsearch.service 文件内容如下:
[Unit]
Description=xunsearch
After=network.target
[Service]
Type=forking
ExecStart=/home/koogua/xunsearch/bin/xs-ctl.sh restart
[Install]
WantedBy=multi-user.target
重新加载 systemd
sudo systemctl daemon-reload
开始并启用 xunsearch 服务
sudo systemctl start xunsearch
sudo systemctl enable xunsearch
查看 xunsearch 服务状态
sudo systemctl status xunsearch
我的开源项目
本文系原创,转载请注明出处
评论已关闭
