安装Solr

参考

# 目录 /root/solr
wget http://archive.apache.org/dist/lucene/solr/8.1.1/solr-8.1.1.tgz

tar -zxvf solr-8.1.1.tgz 


[root@hadoop2 cloud-scripts]# pwd
/root/solr/solr-8.1.1/server/scripts/cloud-scripts

上传文件中的数据

参考

[root@hadoop2 cloud-scripts]# pwd
/root/solr/solr-8.1.1/server/scripts/cloud-scripts

# 上传配置文件
./zkcli.sh -zkhost 172.31.234.62:2181,171.31.234.76:2182,172.31.234.97:2183 -cmd upconfig -confname myconf -confdir /root/solr/solr-8.1.1/server/solr/configsets/_default/conf/
./zkcli.sh -zkhost 172.31.234.62:2181,171.31.234.76:2182,172.31.234.97:2183 -cmd upconfig -confname myconf -confdir /root/solr/solr-8.1.1/server/solr/configsets/sample_techproducts_configs/conf/

上传文件

./zkcli.sh -zkhost 172.31.234.62:2181,171.31.234.76:2182,172.31.234.97:2183  -cmd putfile  /test_file.txt test.txt
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐