openEuler安装qBittorrent笔记
openEuler安装qBittorrent笔记openEuler 22.03 LTS SP3docker 18docker-compose 1.2因需更新docker 20版本以上才支持ipv6openEuler 22.03 LTS SP3 手动安装docker24.07查询可用版本连接https://download.docker.com/linux/static/stable/x86_64/下载docker二进制包到/home目录文件cd/homewgethttps://download.docker.com/linux/static/stable/x86_64/docker-24.0.9.tgz解压并移动到/usr/bin/目录tarxvf docker-24.0.9.tgzcpdocker/* /usr/bin/将docker注册为servicecat/etc/systemd/system/docker.serviceEOF [Unit] DescriptionDocker Application Container Engine Documentationhttps://docs.docker.com Afternetwork-online.target firewalld.service Wantsnetwork-online.target [Service] Typenotify # the default is not to use systemd for cgroups because the delegate issues still # exists and systemd currently does not support the cgroup feature set required # for containers run by docker ExecStart/usr/bin/dockerd --selinux-enabledfalse -H unix:// ExecReload/bin/kill -s HUP$MAINPID# Having non-zero Limit*s causes performance problems due to accounting overhead # in the kernel. We recommend using cgroups to do container-local accounting. LimitNOFILEinfinity LimitNPROCinfinity LimitCOREinfinity # Uncomment TasksMax if your systemd version supports it. # Only systemd 226 and above support this version. #TasksMaxinfinity TimeoutStartSec0 # set delegate yes so that systemd does not reset the cgroups of docker containers Delegateyes # kill only the docker process, not all processes in the cgroup KillModeprocess Restarton-failure StartLimitBurst3 StartLimitInterval60s [Install] WantedBymulti-user.target EOF加载配置启动docker并设置开机启动systemctl daemon-reload systemctl startdockersystemctlenabledocker查看docker运行情况systemctl statusdocker安装docker-compose下载地址https://github.com/docker/compose/releases下载并移动到bin目录然后设置运行权限wgethttps://github.com/docker/compose/releases/download/v2.24.6/docker-compose-linux-x86_64mvdocker-compose-linux-x86_64 /usr/bin/docker-composechmodx /usr/bin/docker-composevim/etc/docker/daemon.json{registry-mirrors:[http://hub-mirror.c.163.com]ipv6:true,fixed-cidr-v6:fd00::/80,experimental:true,ip6tables:true}dockerinspect bridge[{Name:bridge,Id:aea616b48add22af2b2639d252fc49ca13d7c7687334cd8555c377717d8ea229,Created:2024-02-12T09:44:07.8042250908:00,Scope:local,Driver:bridge,EnableIPv6:false,IPAM:{Driver:default,Options:null,Config:[{Subnet:172.17.0.0/16}]},Internal:false,Attachable:false,Ingress:false,ConfigFrom:{Network:},ConfigOnly:false,Containers:{1877c14eb3dc459c97f70db4186299014a5ab1b6a15e50141445d16c3a237f90:{Name:qbittorrent,EndpointID:1b7d16b2a9d6a96db666a75f62fe9c87bcd2eb11955b241b7d909a6d2634ed8a,MacAddress:02:42:ac:11:00:02,IPv4Address:172.17.0.2/16,IPv6Address:}},Options:{com.docker.network.bridge.default_bridge:true,com.docker.network.bridge.enable_icc:true,com.docker.network.bridge.enable_ip_masquerade:true,com.docker.network.bridge.host_binding_ipv4:0.0.0.0,com.docker.network.bridge.name:docker0,com.docker.network.driver.mtu:1500},Labels:{}}]docker-compose编写docker-cmpsoe的YAML配置文件这里文件路径为/home/qbit/cd/home/qbit/vimdocker-compose.ymlversion:2services: qbittorrent: image: linuxserver/qbittorrent container_name: qbittorrent environment: -PUID1000-PGID1000-TZAsia/Shanghai# 你的时区-UMASK_SET022# 可选默认022-WEBUI_PORT8081# WEB UI 端口volumes: - /home/qbit/config:/config - /home/downloads:/downloads ports: -6881:6881# 最好更改否者某些PT站点会屏蔽6881端口为了避免被ISP屏蔽。⚠修改后要在web界面同步修改-6881:6881/udp -8081:8081# 考虑到CSRF和映射问题内外端口必须与WEBUI_PORT一致。network_mode:host# 配置容器用主机网络restart: unless-stoppedversion:“2”networks: local_bridge: enable_ipv6:truedriver: bridge ipam: config: - subnet:fe80:1001::/80version:“3”networks: dockerbridge: external: name: dockerbridge新建容器必须cd到yml目录再运行容器docker-composeup-d关闭容器docker-composedown查看docker网络dockerinspect bridge查看docker容器详细信息dockerps示例CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8cc916bb05c1 linuxserver/qbittorrent/init4minutes ago Up4minutes qbittorrent查看容器ID对应的详细信息dockerinspect 8cc916bb05c1查看qbit对应容器的日志找到qbit随机的默认密码dockerlogs 8cc916bb05c1# 8cc916bb05c1 记得换为自己的ID示例******** Information ******** To control qBittorrent, access the WebUI at: http://localhost:8081 The WebUI administrator username is: admin The WebUI administrator password was not set. A temporary password is providedforthis session: 4WmYLjTZb You shouldsetyour own passwordinprogram preferences. Connection to localhost(::1)8081port[tcp/tproxy]succeeded![ls.io-init]done.4WmYLjTZb 即为qBittorrent随机的默认密码连接不上可以尝试一下把vim/home/qbit/config/qBittorrent/qBittorrent.confenabledfalse 改为trueopenEuler-24.03-LTS-SP3直接安装qbittorrentsudodnfinstallqbittorrent
