NAS中使用qbittorrent来离线下载种子文件

  1. 在套件中心安装 docker 组件
  2. 打开刚刚安装好的 docker 组件,在注册表中搜索”linuxserver/qbittorrent”,并安装
  3. 创建两个文件夹”/docker/download/qbittorrent/config” 和 “/docker/download/qbittorrent/downloads”,并赋予everyone的权限
  4. 在“映像”列表里选择刚刚下载好的镜像点击“启动”,并把第三步创建的两个文件夹挂载到”/config”和”/downloads”下面
  5. 在端口设置这儿将8080改为8999,本地端口也改为8999
  6. 在配置环境变量这儿填入以下三个变量:
WEBUI_PORT          8999
SavePath            /downloads
TempPath            /downloads
  1. 最后”http://172.16.50.2:8999/” 使用该地址访问qb,用户名是:admin 密码是:adminadmin

YAPI的安装

  • YAPI是一个高效、易用、功能强大的API管理平台旨在为开发、产品、测试人员提供更优雅的接口管理服务,这是官网上面说的
  • 安装Node,参考 Centos下安装node
  • 安装mongodb, 参考 mongodb的安装和常用配置项的含义
  • 安装 yapi “npm install -g yapi-cli –registry https://registry.npm.taobao.org”
  • “yapi server” 启动yapi配置向导,包括yapi的安装位置,mongodb数据库等信息
  • “npm install pm2 -g”安装pm2来管理yapi,可以方便的停止 启动等操作
  • 启动yapi “pm2 start /your_install_path/vendors/server/app.js –name yapi”,默认的启动端口是3000;登录的默认用户名是:admin@admin.com ; 默认密码:ymfe.org

Centos下安装node

安装node很简单,运行下面的脚本就可以了

#!/bin/bash
cd /opt && wget https://nodejs.org/dist/v12.19.0/node-v12.19.0-linux-x64.tar.xz
xz -d node-v12.19.0-linux-x64.tar.xz && tar xvf node-v12.19.0-linux-x64.tar
mv node-v10.16.0-linux-x64 node
chown -R root:root /opt/node
ln -s /opt/node/bin/node /usr/bin/node
ln -s /opt/node/bin/npm /usr/bin/npm
[ -f /opt/node-v12.19.0-linux-x64.tar.xz ] && rm /opt/node-v12.19.0-linux-x64.tar.xz -rf

git常用命令整理

## 忽略https错误
git -c http.sslverify=false clone https://gitlab.aiqinqin.info/root/jiang.git

## 永久保存用户名和密码
git config --global credential.helper store

##配置全局用户信息
git config --global user.email "qq@qq.com"
git config --global user.name "root"

##git清除用户名密码
git config --system --unset credential.helper

##全局关闭git的ssl认证
git config --system http.sslverify false

##创建一个分支 release-1.0是你自己的版本号
git checkout -b release-1.0

##本地提交修改过的代码
git add .

##版本注释
git commit -m"First commit"

##提交分支
git push origin release-1.0

## 查看本地分支
git branch

## 查看所有分支情况
git branch -a

## 切换到新分支
git checkout branchName

centos下安装etcd集群

环境准备
172.16.50.30(centos7.x)
172.16.50.31(centos7.x)

  • 在172.16.50.30这台机器上面运行
#!/bin/bash
yum install wget -y
cd /opt && wget https://github.com/etcd-io/etcd/releases/download/v3.3.10/etcd-v3.3.10-linux-amd64.tar.gz
tar zxvf etcd-v3.3.10-linux-amd64.tar.gz && cd etcd-v3.3.10-linux-amd64
nohup ./etcd --name docker-node1 \
--initial-advertise-peer-urls http://172.16.50.30:2380 \
--listen-peer-urls http://172.16.50.30:2380 \
--listen-client-urls http://172.16.50.30:2379,http://127.0.0.1:2379 \
--advertise-client-urls http://172.16.50.30:2379 \
--initial-cluster-token etcd-cluster \
--initial-cluster docker-node1=http://172.16.50.30:2380,docker-node2=http://172.16.50.31:2380 \
--initial-cluster-state new&
  • 在172.16.50.31这台机器上面运行
#!/bin/bash
yum install wget -y
cd /opt && wget https://github.com/etcd-io/etcd/releases/download/v3.3.10/etcd-v3.3.10-linux-amd64.tar.gz
tar zxvf etcd-v3.3.10-linux-amd64.tar.gz && cd etcd-v3.3.10-linux-amd64
nohup ./etcd --name docker-node2 \
--initial-advertise-peer-urls http://172.16.50.31:2380 \
--listen-peer-urls http://172.16.50.31:2380 \
--listen-client-urls http://172.16.50.31:2379,http://127.0.0.1:2379 \
--advertise-client-urls http://172.16.50.31:2379 \
--initial-cluster-token etcd-cluster \
--initial-cluster docker-node1=http://172.16.50.30:2380,docker-node2=http://172.16.50.31:2380 \
--initial-cluster-state new&
  • 查看集群状态
./etcdctl cluster-health