Linux 安装ElasticSearch + FSCrawler 扫描本地的文件资源
在Linux上安装ElasticSearch和FSCrawler的步骤如下:
- 安装ElasticSearch:
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get update && sudo apt-get install elasticsearch
sudo systemctl start elasticsearch.service
sudo systemctl enable elasticsearch.service
- 安装FSCrawler:
wget https://d1.awsstatic.com/release-notes/elastic-stack/Elasticsearch/7.10.0/release-notes-7.10.0.html
sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
cat << EOF | sudo tee /etc/yum.repos.d/elastic-7.x.repo
[elasticsearch-7.x]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
EOF
sudo yum install fscrawler
- 配置FSCrawler并启动:
fscrawler generate-example-config > fscrawler-fs.yml
# 修改 fscrawler-fs.yml 配置文件以适合您的环境
fscrawler crawl --config fscrawler-fs.yml
请确保在执行上述命令时拥有相应的权限,并根据您的Linux发行版和ElasticSearch版本调整命令。
评论已关闭