Loading... # PT工具安装脚本 > 2020.7.16更新,这个`Github`项目包含了几乎所有的PT工具脚本,其中`qBittorrent`可以使用`deb包`安装最新版,或静态编译好的来进行安装。脚本目前支持 `Debian 9/10`, `Ubuntu 16.04/18.04`. 推荐使用 `Debian 10` 或 `Ubuntu 18.04`。 https://github.com/Aniverse/inexistence ``` bash <(wget --no-check-certificate -qO- https://github.com/Aniverse/inexistence/raw/master/inexistence.sh) ``` # Centos安装脚本 今天的这个一键安装脚本是安装的`4.1.1`版本,现在有更新版本的了,但我的vps配置较低,这又有现成脚本,所以就用这个脚本部署了 > 脚本仅支持CentOS7,64位系统!!!请使用纯净的系统安装!!!请使用ROOT用户执行脚本!!! 使用方法: ``` wget https://lala.im/static/script/qBittorrentCentOS7install.sh && chmod +x qBittorrentCentOS7install.sh ./qBittorrentCentOS7install.sh ``` 因为编译`libtorrent`的时候需要用到大量的内存,小于`2GB`的机器可能会因为内存不足导致进程被杀掉,所以在脚本内加了一个创建`swap`的功能。创建的swap文件保存在`/var`目录下,安装完成之后可以自己手动删除掉。 另外因为`libtorrent`编译需要比较长的时间,我加了一个设置编译时使用多个`CPU`线程的功能,根据你自己机器的`CPU`核心数来设置就行了,比如你是一个4核心的机器,在脚本内输入4,那么编译的速度会变快很多! 脚本会帮你安装如下软件: - qBittorrent4.1.1 - libtorrent1.1.9(https://github.com/arvidn/libtorrent/releases/) 回显内容: - qBittorrentWEB地址:你的机器公网IP+端口8080 - WEB账号:admin - WEB密码:adminadmin 管理命令: ``` systemctl start qbittorrent systemctl stop qbittorrent systemctl restart qbittorrent ``` # Ubuntu安装教程 - 安装必要依赖 ``` apt-get install software-properties-common ``` - 添加qBittorrent的源 ``` add-apt-repository ppa:qbittorrent-team/qbittorrent-stable ``` - 安装qBittorrent ``` apt-get install qbittorrent-nox ``` - 启动qBittorrent ``` qbittorrent-nox ``` 然后输入“y”同意条款,即可启动 但是有一个问题,如果断开了ssh连接,或者按了ctrl+c的话服务就会停止,所以要创建一个系统服务。 - 创建服务文件 ``` vim /etc/systemd/system/qbittorrent-nox.service ``` 在里面写入 ``` [Unit] Description=qBittorrent Daemon Service After=network.target [Service] Type=forking LimitNOFILE=infinity ExecStart=/usr/bin/qbittorrent-nox -d –webui-port=8080 ExecStop=/usr/bin/killall -s 9 /usr/bin/qbittorrent-nox Restart=on-failure User=root [Install] WantedBy=multi-user.target ``` - 依次运行以下命令 启动服务 ``` systemctl start qbittorrent-nox ``` 保存修改 ``` systemctl daemon-reload ``` 开机自启: ``` systemctl enable qbittorrent-nox ``` 检验一下: ``` systemctl status qbittorrent-nox ``` 如果亮绿灯证明服务已正常运行。 如果你之前使用过 qbittorrent-nox 这个命令运行并设置了一些东西,设置将不再生效。 访问服务器IP:8080即可进入web界面。 qbittorrent网页登录密码: 账号:admin 密码:adminadmin 最后来设置一下qBittorrent: 进入设置, 在Web设置里更改语言和密码。 把BitTorrent-Torrent排队的勾给点掉。 # Docker安装 进入webui修改监听端口为59445 ``` docker run -d \ --name=qbittorrent \ -e PUID=0 \ -e PGID=0 \ -e UMASK=022\ -e TZ=Asia/Shanghai \ -e WEBUI_PORT=8080 \ -p 8080:8080 \ -p 59445:59445 \ -p 59445:59445/udp \ -v /app/qbittorrent/config:/config \ -v /app/qbittorrent/downloads:/downloads \ --restart always \ lscr.io/linuxserver/qbittorrent:latest ``` 最后修改:2023 年 01 月 31 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 0 如果觉得我的文章对你有用,请随意赞赏