{"id":31,"date":"2021-04-23T15:30:19","date_gmt":"2021-04-23T07:30:19","guid":{"rendered":"http:\/\/0004.xyz\/?p=31"},"modified":"2021-04-23T15:33:57","modified_gmt":"2021-04-23T07:33:57","slug":"centos7%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85qbittorrent-4-1-5","status":"publish","type":"post","link":"http:\/\/0004.xyz\/?p=31","title":{"rendered":"centos7\u7f16\u8bd1\u5b89\u88c5qBittorrent 4.1.5"},"content":{"rendered":"<h2>1\u3001\u5b89\u88c5libtorrent<\/h2>\n<p>qBittorrent\u57fa\u4e8elibtorrent\uff0c\u6240\u4ee5\u5fc5\u987b\u5148\u5b89\u88c5libtorrent\u3002\u4f46\u662f\u9700\u8981\u8bf4\u660e\u7684\u662f\uff0clibtorrent\u6700\u65b0\u7684\u7248\u672c\u4e3a1.2.0 ,\u4f46\u662f\u6b64\u7248\u672cqb\u6682\u672a\u652f\u6301\u3002<br \/>\n\u6211\u4eec\u9009\u62e9\u5b89\u88c51.0.11\u6216\u80051.1.12\uff0c\u76f8\u5bf9\u800c\u8a001.0.11\u66f4\u52a0\u7a33\u5b9a\uff0c\u4f461.1.12\u6027\u80fd\u66f4\u4e3a\u5f3a\u52b2\uff0c\u56e0\u4e3a\u5176\u652f\u6301\u4e86\u5f02\u6b65i\/o.\u672c\u6587\u5c31\u4ee51.1.12\u4e3a\u4f8b\uff0c\u8bb0\u5f55\u5b89\u88c5\u8fc7\u7a0b\u3002<\/p>\n<p><!--more--><\/p>\n<h3>\uff081\uff09\u5b89\u88c5\u76f8\u5173\u4f9d\u8d56<\/h3>\n<p><code>yum groupinstall &quot;Development Tools&quot;<\/code><br \/>\n<code>yum install qt-devel boost-devel openssl-devel qt5-qtbase-devel qt5-linguist<\/code><\/p>\n<p>\u7531\u4e8eqBittorrent4.1.4+ \u9700\u8981C++14\u8fdb\u884c\u7f16\u8bd1\uff0c\u800ccentos7.x \u9ed8\u8ba4\u81ea\u5e26\u7684gcc\u7248\u672c\u4e3a4.8.5\u53ea\u652f\u6301c++11\uff0c\u56e0\u6b64\u6211\u4eec\u9700\u8981\u66f4\u65b0gcc\u7248\u672c\uff0c\u4e3a\u4e86\u5c3d\u91cf\u4fdd\u62a4\u7cfb\u7edf\u73af\u5883\u4e0d\u88ab\u7834\u574f\uff0c\u6211\u4eec\u9009\u62e9\u9002\u7528scl\u5b89\u88c5\u9ad8\u7248\u672cgcc\u3002<\/p>\n<h3>\uff082\uff09\u5b89\u88c5gcc<\/h3>\n<pre><code class=\"language-shell\">yum install centos-release-scl\nyum install devtoolset-8-gcc*\nscl enable devtoolset-8 bash\ngcc --version<\/code><\/pre>\n<h3>\uff083\uff09\u5b89\u88c5libtorrent<\/h3>\n<pre><code class=\"language-shell\">wget https:\/\/github.com\/arvidn\/libtorrent\/releases\/download\/libtorrent_1_1_12\/libtorrent-rasterbar-1.1.12.tar.gz\ntar xf libtorrent-rasterbar-1.1.12.tar.gz\ncd libtorrent-rasterbar-1.1.12\n.\/configure --disable-debug --prefix=\/usr CXXFLAGS=-std=c++11\nmake -j$(nproc)\nmake install\nln -s \/usr\/lib\/pkgconfig\/libtorrent-rasterbar.pc \/usr\/lib64\/pkgconfig\/libtorrent-rasterbar.pc\nln -s \/usr\/lib\/libtorrent-rasterbar.so.9 \/usr\/lib64\/libtorrent-rasterbar.so.9<\/code><\/pre>\n<h3>\uff084\uff09\u5b89\u88c5qBittorrent<\/h3>\n<pre><code class=\"language-shell\">wget https:\/\/github.com\/qbittorrent\/qBittorrent\/archive\/release-4.1.5.tar.gz\ntar xf release-4.1.5.tar.gz\ncd qBittorrent-release-4.1.5\n.\/configure --prefix=\/usr --disable-gui CPPFLAGS=-I\/usr\/include\/qt5\nmake -j$(nproc)\nmake install<\/code><\/pre>\n<h3>\uff085\uff09\u9000\u51fascl<\/h3>\n<p><code>exit<\/code><\/p>\n<h3>\uff086\uff09\u5148\u6267\u884c\u4e00\u904d\u7a0b\u5e8f<\/h3>\n<p><code>qbittorrent-nox<\/code><br \/>\nPress \u2018y\u2019 key to accept and continue\u2026<br \/>\n\u8f93\u5165y\u56de\u8f66\u540c\u610f\u534f\u8bae<br \/>\n\u4f7f\u7528ctrl+c\u9000\u51fa<\/p>\n<h2>2\u3001\u914d\u7f6e\u5f00\u673a\u81ea\u542f<\/h2>\n<pre><code class=\"language-shell\">cat &lt;&lt;EOF | sudo tee \/usr\/lib\/systemd\/system\/qbittorrent.service\n[Unit]\nDescription=qbittorrent torrent server\n\n[Service]\nUser=root\nExecStart=\/usr\/bin\/qbittorrent-nox\nRestart=on-abort\n\n[Install]\nWantedBy=multi-user.targe\nEOF<\/code><\/pre>\n<p>\u4fdd\u5b58\u540e\u9000\u51fa\u7f16\u8f91<br \/>\n\u8f7d\u5165\u914d\u7f6e\u5f00\u542f\u5f00\u542f\u81ea\u542f<br \/>\n<code>systemctl enable qbittorrent.service<\/code><br \/>\n\u4f7f\u7528systemctl \u8ba9\u5176\u540e\u53f0\u8fd0\u884c<br \/>\n<code>systemctl start qbittorrent.service<\/code><\/p>\n<h2>3\u3001\u5f00\u59cb\u4f7f\u7528<\/h2>\n<p>\u8bbf\u95eeip:8080\u8fdb\u5165webui\uff0c\u5982\u679c\u65e0\u6cd5\u8bbf\u95ee\u53ef\u80fd\u662f\u9632\u706b\u5899\u95ee\u9898\uff0c\u8bf7\u628a8080\u7aef\u53e3\u52a0\u5165\u9632\u706b\u5899\u5f00\u542f\u7aef\u53e3\u3002<br \/>\n<code>\u9ed8\u8ba4\u7528\u6237\u540d\uff1aadmin \u9ed8\u8ba4\u5bc6\u7801\uff1aadminadmin<\/code><\/p>\n<h2>4\u3001\u547d\u4ee4<\/h2>\n<pre><code class=\"language-shell\">\u5f00\u542f: systemctl start qbittorrent.service\n\u5173\u95ed: systemctl stop qbittorrent.service\n\u91cd\u542f: systemctl restart qbittorrent.service<\/code><\/pre>\n<h2>5\u3001\u9632\u706b\u5899\u547d\u4ee4<\/h2>\n<pre><code class=\"language-shell\">#firewall\n#\u5e94\u7528\u9632\u706b\u5899\u89c4\u5219\nfirewall-cmd --reload\n#\u6dfb\u52a0TCP\u7aef\u53e3\nfirewall-cmd --add-port=8080\/tcp --permanent\nfirewall-cmd --add-port=8999\/tcp --permanent\n#\u6dfb\u52a0UDP\u7aef\u53e3\nfirewall-cmd --add-port=8999\/udp --permanent\n#\u91cd\u542f\u9632\u706b\u5899\nsystemctl restart firewalld.service\n#\u5173\u95ed\u9632\u706b\u5899\nsystemctl stop firewalld.service\n#\u542f\u52a8\u9632\u706b\u5899\nsystemctl start firewalld.service\n#\u67e5\u770b\u9632\u706b\u5899\u72b6\u6001\nsystemctl status firewalld.service\n#\u67e5\u770b\u5f00\u542f\u7684\u7aef\u53e3\nfirewall-cmd --list-all\n#\u67e5\u770b\u662f\u5426\u5f00\u542f\u5bf9\u5e94\u7a97\u53e3\nfirewall-cmd --zone=public --query-port=8080\/tcp<\/code><\/pre>\n<pre><code class=\"language-shell\">#\u653e\u884cwebui\u7aef\u53e3\nfirewall-cmd --permanent --add-port=8080\/tcp\n#\u653e\u884cqb\u9ed8\u8ba4\u76d1\u542c\u7aef\u53e3\uff088999\uff09\u81ea\u884c\u4fee\u6539\u540e\u8bf7\u540c\u6b65\u653e\u884c\u9632\u706b\u5899\u3002\nfirewall-cmd --permanent --add-port=8999\/tcp\n#\u542f\u7528\u914d\u7f6e\nfirewall-cmd --reload<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u5b89\u88c5libtorrent qBittorrent\u57fa\u4e8elibtorrent\uff0c\u6240\u4ee5\u5fc5\u987b\u5148\u5b89\u88c5libtorren [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"kt_blocks_editor_width":"","footnotes":""},"categories":[7],"tags":[8,9],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-record","tag-centos","tag-qbittorrent"],"_links":{"self":[{"href":"http:\/\/0004.xyz\/index.php?rest_route=\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/0004.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/0004.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/0004.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/0004.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=31"}],"version-history":[{"count":0,"href":"http:\/\/0004.xyz\/index.php?rest_route=\/wp\/v2\/posts\/31\/revisions"}],"wp:attachment":[{"href":"http:\/\/0004.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/0004.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/0004.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}