GitHub官网汉化插件。如图所示,除了汉化GitHub菜单栏,标题,按钮等公共组件,还支持对“项目描述”进行人机翻译。
欢迎大家关注贡献、GitHub地址:https://github.com/k1995/github-i18n-plugin
GitHub官网汉化插件。如图所示,除了汉化GitHub菜单栏,标题,按钮等公共组件,还支持对“项目描述”进行人机翻译。
欢迎大家关注贡献、GitHub地址:https://github.com/k1995/github-i18n-plugin
安装搜索引擎 - SphinxSearch
apt install sphinxsearch
创建目录
mkdir -p /data/bt/index/db /data/bt/index/binlog
初始化索引
cd spider && indexer -c sphinx.conf hash searchd -c sphinx.conf
现在可以搜索了
爬虫已经运行有5分钟了,下面我们进入mongo数据库里面,看下是否已经爬到了数据?
执行下面命令
mongo
use torrent;
db.filelist.find()
OK,有数据,表明爬虫正常工作。
下面进入最后一步,配置搜索引擎。
本文将介绍种子搜索网站——手撕包菜的安装教程,整个项目包含爬虫,网站,搜索3个功能模块,使用Nodejs编写(老版本为Python)。
本次教程使用的服务器(vps),是在vultr上购买,操作系统选择ubuntu 20.10 64位。
你也可以在本地使用自己电脑安装,但保证有公网IP,否则爬虫爬不了数据。
依次执行下面4行命令
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4
multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt-get install -y mongodb-org
启动Mongo
sudo systemctl start mongod
先安装nvm
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
source ~/.bashrc
通过nvm方式安装最新版本nodejs
nvm install node
安装pm2 (nodejs进程管理器)
npm install -g pm2
apt instal -y nginx
apt install -y make g++
下载源代码
git clone https://github.com/78/ssbc.git
进入程序根目录
cd ssbc
安装nodejs依赖,并编译程序
cd spider && npm install && cd ..
cd web && npm install && npm run build && cd ..
启动爬虫
cd spider/ && pm2 start ecosystem.config.js && cd ..
启动web
cd web && pm2 start ecosystem.config.js && cd ..
配置nginx,编辑配置文件
vi /etc/nginx/conf.d/ssbc.conf
加入下面配置,www.xxx.com改成你真实的域名,如果测试可以设为ip地址
server {
listen 80;
server_name www.xxx.com;
location / {
proxy_pass http://localhost:3001;
}
}
重启nginx
nginx -s reload
现在可以访问http://www.xxx.com了,下面是截图
未完待续~
clone
,pull
慢的话,可以考虑用cnpmjs提供的镜像节点。
例如 git clone https://github.com.cnpmjs.org/pingcap/tidb.git
可以看看这个教程,应该满足你的要求
https://blog.csdn.net/F0ED9cZN4Ly992G/article/details/80429177
也可以看看官方的API
https://www.zetetic.net/sqlcipher/sqlcipher-api/#sqlcipher_export
sqlcipher_export()
将明文数据库,进行加密。
sqlite3_key()
这个应该是设置密码?
最简单的方法当然是上代理。
另外一种方法就是修改hosts
文件。之所以图片裂了,是因为GitHub使用的域名,avatars.githubusercontent.com
,raw.githubusercontent.com
...,经常被DNS污染导致。也就是说你解析到的IP压根就是错误的IP,能访问才怪。
解决办法是用ipaddress.com解析域名,得到正确的IP,然后将其添加到hosts
文件就可以。这样跳过DNS域名解析,避免了DNS污染。
由于GitHub IP经常变动,而且需要解析的域名较多,不建议人工的方式去一个个修改。
推荐用GitHub520 这个开源项目,自动检测更新IP列表。
我现在目前用的Rufus,绿色软件无需安装。UltraISO之前用过,一个是收费,另外在制作Linux系统的时候很容易出现启动不了情况,Rufus就没这个问题。