1.页面展示

演示站点

2.程序架构

名称 用途
server 收集torrent数据
worker 收集Hash信息
web 数据展示
Tool 工具

3.安装

  1. 在安装环境前您需要配置golang环境 Go 下载地址
  2. 安装python和mongodb
sudo apt install mongodb
sudo apt install python3 python3-pip
pip3 install elastic-doc-manager[elastic5]
  1. 服务端安装
go get github.com/Bmixo/btSearch/server

  1. worker安装
go get github.com/Bmixo/btSearch/worker
  1. Elasticsearch dockerp配置
docker run --restart=always -p 9200:9200 -p 9300:9300 --name=tmp docker.elastic.co/elasticsearch/elasticsearch:5.6.0

安装analysis-ik分词器

docker ps
docker exec -it $dockid /bin/bash
./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v5.6.0/elasticsearch-analysis-ik-5.6.0.zip

配置elasticsearch的数据存放目录

mkdir -p /data/docker
docker cp $dockid:/usr/share/elasticsearch/ /data/docker
chmod 777 -R /data/

运行Elasticsearch docker服务

docker run --restart=always -p 9200:9200 -p 9300:9300 --name=es \
-e ES_JAVA_OPTS="-Xms1024m -Xmx1024m" \
-v /data/docker/elasticsearch/data:/usr/share/elasticsearch/data \
-v /data/docker/elasticsearch/logs:/usr/share/elasticsearch/logs \
-v /data/docker/elasticsearch/config:/usr/share/elasticsearch/config \
-v /data/docker/elasticsearch/plugins:/usr/share/elasticsearch/plugins \
-v /etc/localtime:/etc/localtime \
-v /etc/timezone:/etc/timezone \
docker.elastic.co/elasticsearch/elasticsearch:5.6.0

配置正确的话执行下面命令可以看到当前Elasticsearch的运行状态

curl --user elastic:changeme -XGET 'http://127.0.0.1:9200/_cat/health'

配置Elasticsearch默认分词器

curl --user elastic:changeme -XPUT http://localhost:9200/bavbt -H 'Content-Type: application/json'
curl --user elastic:changeme -XPOST 'localhost:9200/bavbt/_close'
curl --user elastic:changeme -XPUT localhost:9200/bavbt/_settings?pretty -d '{
"index":{
"analysis" : {
            "analyzer" : {
                "default" : {
                    "type" : "ik_max_word"
                }
            },
			"search_analyzer" : {
                "default" : {
                    "type" : "ik_max_word"
                }
            }
        }
    }
}'
curl --user elastic:changeme -XPOST 'localhost:9200/bavbt/_open'
  1. Mongodb配置副本集
service mongod stop
vim /etc/mongodb.conf
添加replSet=rs1
service mongod start

可以通过mongoshelly运行rs.initiate()查看副本集配置是否正确

4.运行

首先需要配置您的conf文件

[mongodb]
musername=
mpassword=
database=bavbt
collection=torrent
addr=127.0.0.1:27017
[elasticsearch]
url=http://127.0.0.1:9200/bavbt/torrent/
eusername=elastic
epassword=changeme
[webServer]
webServerAddr=127.0.0.1:7878

开启数据库同步Elasticsearch服务

mongo-connector -m mongodb://localhost:27017/?unicode_decode_error_handler=ignore -t http://elastic:changeme@localhost:9200/torrent -d elastic2_doc_manager -n bavbt.torrent -i name,length,hot,create_time,category,infohash

服务端运行

go run github.com/Bmixo/btSearch/server

worker运行

go run github.com/Bmixo/btSearch/worker

5.TODO

加入redis选择 加入d2-admin后台数据展示

用go语言实现磁力猫一样的磁力搜索网站的更多相关文章

  1. 磁力搜索网站 BT torrent search engine 推荐 2019/12/25日更新

    btkitty 知名的BT磁力搜索,资源很多,中文友好 btdb 知名的BT磁力搜索,资源很多,中文友好 838888 不错的 BT 磁力搜索引擎,资源很多,中文友好 idope.se 资源丰富的BT ...

  2. JAVA语言搭建白盒静态代码、黑盒网站插件式自动化安全审计平台

    近期打算做一个插件化的白盒静态代码安全审计自动化平台和黑盒网站安全审计自动化平台.现在开源或半开源做黑盒网站安全扫描的平台,大多是基于python脚本,安全人员贡献python脚本插件增强平台功能.对 ...

  3. 【Linux 操作系统】阿里云服务器 操作实战 部署C语言开发环境(vim配置,gcc) 部署J2EE网站(jdk,tomcat)

    . 作者 :万境绝尘  转载请注明出处 : http://blog.csdn.net/shulianghan/article/details/18964835 . 博客总结 : 设置SecureCRT ...

  4. 阿里云服务器 操作实战 部署C语言开发环境(vim配置,gcc) 部署J2EE网站(jdk,tomcat)

    . 作者 :万境绝尘  转载请注明出处 : http://blog.csdn.net/shulianghan/article/details/18964835 . 博客总结 : 设置SecureCRT ...

  5. c语言学习、工作相关必备的常用网站

    1.https://zh.cppreference.com/,c.c++参考手册, 2.http://www.cplusplus.com/,在线查看c.c++函数的定义及用法 3.http://c-f ...

  6. c语言数据结构和算法库--cstl---王博--相关网站和博客

    1.官网 http://libcstl.org/download.html 2.下载地址 http://www.pudn.com/downloads171/sourcecode/os/detail79 ...

  7. P2750 贰五语言Two Five USACO5.5 记忆化搜索

    正解:记搜+逼近 解题报告: 神仙题预警,,, 我真滴觉得还是挺难的了,,, 大概说下思路趴QAQ 首先我们要知道逼近法是什么! 逼近法,有点像二分的思路,以这题为例举个eg 假如它给了个数字k.我们 ...

  8. Atitit 图像处理的心得与疑惑 attilax总结

    Atitit 图像处理的心得与疑惑 attilax总结 1.1. 使用类库好不好??还是自己实现算法1 1.2. 但是,如果遇到类库体积太大,后者没有合适的算法,那就只能自己开发算法了1 1.3. 如 ...

  9. PHP语言编写的磁力搜索工具下载BT种子 支持transmission、qBittorrent

    磁力搜索网站2020/01/12更新 https://www.cnblogs.com/cilisousuo/p/12099547.html PT种子.BT种子搜索功能 IYUU自动辅种工具,目前能对国 ...

随机推荐

  1. ubuntu资料

    1.VNC实现Windows远程访问Ubuntu 16.04(无需安装第三方桌面,直接使用自带远程工具) https://www.cnblogs.com/xuliangxing/p/7642650.h ...

  2. 路由器安全-NetFlow

    1.NetFlow介绍 提供高层次的诊断,分类和识别网络异常. 使用NetFlow来检查哪些行为改变明显的攻击是非常有效的. 就像Wiretap一样捕获数据包. NetFlow像电话账单.(谁和谁在通 ...

  3. JSP页面输入框赋值换行显示问题

    <input type="hidden" id="${command.yhzlId}" value="${command.yhzx },${co ...

  4. kafka 分区

    1. 默认存储 /tmp/kafka-logs test-0 0:分区数

  5. flask exception

    flask exception 1.1.    abort 概念:flask中的异常处理语句,功能类似于python中raise语句,只要触发abort,后面的代码不会执行,abort只能抛出符合ht ...

  6. teraterm中状态框statusbox

    ;Author : Bing ;Date : 1/17/2019;Usage: modify log drictory according to actual drictorylogfile=&quo ...

  7. LeetCode 680. Valid Palindrome II(双指针)

    题意:给定一个字符串,可以最多去掉一个字符,判断是否可以使该字符串成为一个回文串. 分析:head和tail双指针分别指向字符串首尾,如果s[head] != s[tail],则要么去掉s[head] ...

  8. Linu计划任务/crontab命令

    周期性任务计划 相关程序包: cronie:主程序包,提供了crond守护进程及相关辅助工具 cronie-anacron:cronie的补充程序:用于监控cronie任务执行状况:如cronie中的 ...

  9. R语言 sample抽样函数

    Sample 函数用法: sample(x, size, replace = FALSE, prob = NULL) Arguments x - 可以是含有一个或多个元素的向量或只是一个正整数.x的长 ...

  10. 线程安全Collections.synchronizedList

    ollections.synchronizedList引发的线程安全问题 有些容器是线程安全的(Vector,ConcurrentLinkedQueue等),有些则不是(list等),利用类 似 pr ...