用go语言实现磁力猫一样的磁力搜索网站
1.页面展示
2.程序架构
名称 | 用途 |
---|---|
server | 收集torrent数据 |
worker | 收集Hash信息 |
web | 数据展示 |
Tool | 工具 |
3.安装
- 在安装环境前您需要配置golang环境 Go 下载地址
- 安装python和mongodb
sudo apt install mongodb
sudo apt install python3 python3-pip
pip3 install elastic-doc-manager[elastic5]
- 服务端安装
go get github.com/Bmixo/btSearch/server
- worker安装
go get github.com/Bmixo/btSearch/worker
- 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'
- 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语言实现磁力猫一样的磁力搜索网站的更多相关文章
- 磁力搜索网站 BT torrent search engine 推荐 2019/12/25日更新
btkitty 知名的BT磁力搜索,资源很多,中文友好 btdb 知名的BT磁力搜索,资源很多,中文友好 838888 不错的 BT 磁力搜索引擎,资源很多,中文友好 idope.se 资源丰富的BT ...
- JAVA语言搭建白盒静态代码、黑盒网站插件式自动化安全审计平台
近期打算做一个插件化的白盒静态代码安全审计自动化平台和黑盒网站安全审计自动化平台.现在开源或半开源做黑盒网站安全扫描的平台,大多是基于python脚本,安全人员贡献python脚本插件增强平台功能.对 ...
- 【Linux 操作系统】阿里云服务器 操作实战 部署C语言开发环境(vim配置,gcc) 部署J2EE网站(jdk,tomcat)
. 作者 :万境绝尘 转载请注明出处 : http://blog.csdn.net/shulianghan/article/details/18964835 . 博客总结 : 设置SecureCRT ...
- 阿里云服务器 操作实战 部署C语言开发环境(vim配置,gcc) 部署J2EE网站(jdk,tomcat)
. 作者 :万境绝尘 转载请注明出处 : http://blog.csdn.net/shulianghan/article/details/18964835 . 博客总结 : 设置SecureCRT ...
- c语言学习、工作相关必备的常用网站
1.https://zh.cppreference.com/,c.c++参考手册, 2.http://www.cplusplus.com/,在线查看c.c++函数的定义及用法 3.http://c-f ...
- c语言数据结构和算法库--cstl---王博--相关网站和博客
1.官网 http://libcstl.org/download.html 2.下载地址 http://www.pudn.com/downloads171/sourcecode/os/detail79 ...
- P2750 贰五语言Two Five USACO5.5 记忆化搜索
正解:记搜+逼近 解题报告: 神仙题预警,,, 我真滴觉得还是挺难的了,,, 大概说下思路趴QAQ 首先我们要知道逼近法是什么! 逼近法,有点像二分的思路,以这题为例举个eg 假如它给了个数字k.我们 ...
- Atitit 图像处理的心得与疑惑 attilax总结
Atitit 图像处理的心得与疑惑 attilax总结 1.1. 使用类库好不好??还是自己实现算法1 1.2. 但是,如果遇到类库体积太大,后者没有合适的算法,那就只能自己开发算法了1 1.3. 如 ...
- PHP语言编写的磁力搜索工具下载BT种子 支持transmission、qBittorrent
磁力搜索网站2020/01/12更新 https://www.cnblogs.com/cilisousuo/p/12099547.html PT种子.BT种子搜索功能 IYUU自动辅种工具,目前能对国 ...
随机推荐
- hash路由
class HashRouter{ constructor(){ //用于存储不同hash值对应的回调函数 this.routers = {}; window.addEventListener('ha ...
- 吴裕雄--天生自然Numpy库学习笔记:NumPy 数据类型
下表列举了常用 NumPy 基本类型. 名称 描述 bool_ 布尔型数据类型(True 或者 False) int_ 默认的整数类型(类似于 C 语言中的 long,int32 或 int64) i ...
- vs2013设置不生成.sdf和ipch文件
转载:https://blog.csdn.net/sinat_23338865/article/details/53393760 使用VS2013建立解决方案时,会生成SolutionName.sdf ...
- Codeforces Global Round 6 - D. Decreasing Debts(思维)
题意:有$n$个人,$m$个债务关系,$u_{i}$,$v_{i}$,$d_{i}$表示第$u_{i}个人$欠第$v_{i}$个人$d_{i}$块钱,现在你需要简化债务关系,使得债务总额最小.比如,$ ...
- vue下canvas绘制矩形
起因:根据项目需求本人写了一个绘制矩形的组件.功能:在图片中绘制矩形,根据图片大小进行自适应展示,获取图片矩形坐标.思路:首先定义一个固定大小的DIV,DIV标签中有监测鼠标变化的四个事件moused ...
- 基础总结篇之八:创建及调用自己的ContentProvider
转自:http://blog.csdn.net/wellsoho/article/details/49494141 若不能坚持到底,即使是朽木也不能折断:只要坚持不停地用刀刻,就算是金属玉石也可以雕出 ...
- centos初始化脚本
centos初始化脚本 添加IP.主机名.挂载/dev/sdb1磁盘 #!/bin/bash # ip=$ hostname=$ if [ -z $ip ] || [ -z $hostname ]; ...
- nginx 性能优化的概述及在CPU资源方面的处理
nginx的性能优化的概述 软件层面的提升硬件的使用率 增大CPU的利用率 增大内存的利用率 增大磁盘IO利用率 增大网络带宽利用率 提升硬件规格 网卡:万兆网卡.例如10G.25G.40G等 磁盘: ...
- 吴裕雄--天生自然ORACLE数据库学习笔记:过程、函数、触发器和包
create procedure pro_insertDept is begin ,'市场拓展部','JILIN'); --插入数据记录 commit; --提交数据 dbms_output.put_ ...
- tomcat启动报错failed to start component
严重: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catali ...