静看光阴荏苒
不管不顾不问不说也不念

qBittorrent for CentOS7一键安装脚本

履行昨天的诺言,今天把QB的一键脚本也做出来了,但是这里有个奇葩事情还是很有趣的。。。

1个多月前,我就说过QB还没发布的版本可能有一个webui的BUG:

当时也是亲自验证过的,发现webui监听的地址居然是0.0.0.42,而不是0.0.0.0,但是我想着这估计是作者还在开发的版本,正式发布可能就不会有这种问题了,但是让人没想到的是,最近发布的4.1.2版本竟然还真有这个BUG,这下是石锤了:

默默的等4.1.3出炉吧。。。所以咱们今天的这个一键安装脚本是安装的4.1.1版本,我只是在想如果当初我去gayhub上面提个issue是不是可以避免4.1.2的这个BUG发生。。。

脚本仅支持CentOS7,64位系统!!!请使用纯净的系统安装!!!请使用ROOT用户执行脚本!!!

使用方法:

wget https://lala.im/static/script/qBittorrentCentOS7install.sh && chmod +x qBittorrentCentOS7install.sh
./qBittorrentCentOS7install.sh

因为编译libtorrent的时候需要用到大量的内存,小于2GB的机器可能会因为内存不足导致进程被杀掉,所以我在脚本内加了一个创建swap的功能。创建的swap文件保存在/var目录下,安装完成之后可以自己手动删除掉。(话说内存小于2GB还装个锤子QB啊,挂PT内存没4G起步,你不是在玩蛇吗???)

另外因为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

预览图:

赞(8)
未经允许不得转载:荒岛 » qBittorrent for CentOS7一键安装脚本
分享到: 更多 (0)

评论 25

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    哈哈.因为qbittorrent界面不错啊,下的不是PT站的.下好了用IDM拉下来.分享率达10我就删了. :smile:

    菜鸟6年前 (2018-09-14) Google Chrome 69.0.3497.92 Google Chrome 69.0.3497.92 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 你是不是回复错了。。。

      LALA6年前 (2018-09-15) Google Chrome 67.0.3396.99 Google Chrome 67.0.3396.99 Windows 10 x64 Edition Windows 10 x64 Edition回复
  2. #2

    装了这个以后,我闲着蛋疼把宝塔装上了。端口用不了。我擦啊

    saw6年前 (2018-09-16) Firefox 62.0 Firefox 62.0 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 宝塔会开启防火墙,把防火墙关了就行了。

      LALA6年前 (2018-09-17) Google Chrome 67.0.3396.99 Google Chrome 67.0.3396.99 Windows 10 x64 Edition Windows 10 x64 Edition回复
  3. #3

    WebUI\Address=*
    WebUI\ServerDomains=*

    设置文件了加这两行就行

    ben6年前 (2018-09-18) Google Chrome 68.0.3440.106 Google Chrome 68.0.3440.106 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • qb的配置文件在哪里来着,我竟然没找到。。。

      LALA6年前 (2018-09-18) Google Chrome 67.0.3396.99 Google Chrome 67.0.3396.99 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 好像是在root目录下的.config里面

        loeveo6年前 (2019-06-16) UC Browser 12.4.9.1029 UC Browser 12.4.9.1029 Android 7.1.1 Android 7.1.1回复
        • 嗯,应该是按启动用户来自动生成配置文件的,一般用root用户运行就是在root的根目录下面。

          LALA6年前 (2019-06-16) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
  4. #4

    :cool: 咋升级啊

    mel6年前 (2018-12-02) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • PT服务器一般不考虑升级,挂PT挂久了种子数据量太多,升级太麻烦。万一出错了,保的种子都还要重新搞,那就蛋疼了。

      LALA6年前 (2018-12-04) Google Chrome 70.0.3538.110 Google Chrome 70.0.3538.110 Windows 10 x64 Edition Windows 10 x64 Edition回复
  5. #5

    你好,我把脚本里的qb4.1.1 下载地址和路径都改成4.1.5后,为啥到make步奏后报错呢。。4.1.1就可以make成功。。好奇怪 :cry:

    milon6年前 (2019-04-15) Google Chrome 73.0.3683.103 Google Chrome 73.0.3683.103 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 4.1.5的编译环境和4.1.1不一样。

      LALA6年前 (2019-04-15) Google Chrome 72.0.3626.121 Google Chrome 72.0.3626.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • base/bittorrent/session.cpp: In member function ‘void BitTorrent::Session::setTempPathEnabled(bool)’:
      base/bittorrent/session.cpp:615:63: error: call of overloaded ‘asConst(QHash&)’ is ambiguous
      for (TorrentHandle *const torrent : asConst(m_torrents))
      这种提示

      milon6年前 (2019-04-15) Google Chrome 73.0.3683.103 Google Chrome 73.0.3683.103 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 秒回厉害了。。应该是gcc版本低了不支持,试试安装一个高版本gcc再编译:
        yum -y install centos-release-scl
        yum -y install devtoolset-7-gcc*
        scl enable devtoolset-7 bash

        LALA6年前 (2019-04-15) Google Chrome 72.0.3626.121 Google Chrome 72.0.3626.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
  6. #6

    大佬.我已经使用了一键.并且开始刷pt了.但是我一个pt站只支持4.1.4以上的.所以我如果要更新的话是不是下载最新源码编译安装即可.不用卸载一键安装的4.1.1?
    这样会导致数据丢失吗?

    loeveo6年前 (2019-05-14) UC Browser 12.3.8.1018 UC Browser 12.3.8.1018 Android 7.1.1 Android 7.1.1回复
    • 直接重新编译一遍应该就可以了,但这个无法100%保证数据不出问题。。

      LALA6年前 (2019-05-14) Google Chrome 72.0.3626.121 Google Chrome 72.0.3626.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 好吧,看来我得把大佬的脚本改一下 :razz:

        loeveo6年前 (2019-05-15) UC Browser 12.3.8.1018 UC Browser 12.3.8.1018 Android 7.1.1 Android 7.1.1回复
  7. #7

    启动停止重启的命令,打错了,b写成大写了

    loeveo5年前 (2019-08-14) UC Browser 12.5.5.1035 UC Browser 12.5.5.1035 Android 7.1.1 Android 7.1.1回复
    • 真仔细,我改过来了,感谢。。

      LALA5年前 (2019-08-16) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
  8. #8

    到了我编译安装最新版本的lib torrent,报错是什么情况?,GCC,我已经升级到四配的版本了gcc8
    root@loeveo libtorrent-rasterbar-1.2.1]# make install
    Making install in include/libtorrent
    make[1]: Entering directory `/root/boost_1_67_0/libtorrent-rasterbar-1.2.1/include/libtorrent’
    make[2]: Entering directory `/root/boost_1_67_0/libtorrent-rasterbar-1.2.1/include/libtorrent’
    make[2]: Nothing to be done for `install-exec-am’.
    /usr/bin/mkdir -p ‘/usr/include/libtorrent’
    /usr/bin/install -c -m 644 address.hpp add_torrent_params.hpp alert.hpp alert_manager.hpp alert_types.hpp announce_entry.hpp assert.hpp bandwidth_limit.hpp bandwidth_manager.hpp bandwidth_socket.hpp bandwidth_queue_entry.hpp bencode.hpp bdecode.hpp bitfield.hpp block_cache.hpp bloom_filter.hpp broadcast_socket.hpp bt_peer_connection.hpp buffer.hpp chained_buffer.hpp choker.hpp close_reason.hpp config.hpp ConvertUTF.h copy_ptr.hpp crc32c.hpp create_torrent.hpp deadline_timer.hpp debug.hpp disk_buffer_holder.hpp disk_buffer_pool.hpp disk_interface.hpp disk_io_job.hpp disk_io_thread.hpp disk_io_thread_pool.hpp disk_observer.hpp disk_job_pool.hpp ed25519.hpp entry.hpp enum_net.hpp ‘/usr/include/libtorrent/.’
    /usr/bin/install -c -m 644 error.hpp error_code.hpp extensions.hpp file.hpp file_pool.hpp file_storage.hpp fingerprint.hpp flags.hpp fwd.hpp gzip.hpp hasher.hpp hasher512.hpp hex.hpp heterogeneous_queue.hpp http_connection.hpp http_parser.hpp http_seed_connection.hpp http_stream.hpp http_tracker_connection.hpp i2p_stream.hpp identify_client.hpp invariant_check.hpp io.hpp io_service.hpp io_service_fwd.hpp ip_filter.hpp ip_voter.hpp lazy_entry.hpp link.hpp linked_list.hpp lsd.hpp magnet_uri.hpp natpmp.hpp netlink.hpp operations.hpp optional.hpp packet_buffer.hpp packet_pool.hpp parse_url.hpp part_file.hpp ‘/usr/include/libtorrent/.’
    /usr/bin/install -c -m 644 pe_crypto.hpp performance_counters.hpp peer_connection.hpp peer_connection_handle.hpp peer_connection_interface.hpp peer.hpp peer_class.hpp peer_class_set.hpp peer_class_type_filter.hpp peer_id.hpp peer_info.hpp peer_request.hpp pex_flags.hpp piece_block.hpp piece_block_progress.hpp piece_picker.hpp platform_util.hpp peer_list.hpp portmap.hpp proxy_base.hpp puff.hpp random.hpp read_resume_data.hpp write_resume_data.hpp receive_buffer.hpp resolve_links.hpp resolver.hpp resolver_interface.hpp request_blocks.hpp session.hpp session_handle.hpp session_settings.hpp session_stats.hpp session_status.hpp session_types.hpp settings_pack.hpp sha1.hpp sha512.hpp sha1_hash.hpp sliding_average.hpp ‘/usr/include/libtorrent/.’
    /usr/bin/mkdir -p ‘/usr/include/libtorrent/aux_’
    /usr/bin/install -c -m 644 aux_/allocating_handler.hpp aux_/aligned_storage.hpp aux_/aligned_union.hpp aux_/bind_to_device.hpp aux_/block_cache_reference.hpp aux_/container_wrapper.hpp aux_/cpuid.hpp aux_/disable_warnings_push.hpp aux_/disable_warnings_pop.hpp aux_/disk_job_fence.hpp aux_/deferred_handler.hpp aux_/dev_random.hpp aux_/deque.hpp aux_/escape_string.hpp aux_/export.hpp aux_/generate_peer_id.hpp aux_/io.hpp aux_/listen_socket_handle.hpp aux_/path.hpp aux_/merkle.hpp aux_/session_call.hpp aux_/session_impl.hpp aux_/session_settings.hpp aux_/session_udp_sockets.hpp aux_/set_socket_buffer.hpp aux_/proxy_settings.hpp aux_/session_interface.hpp aux_/suggest_piece.hpp aux_/socket_type.hpp aux_/storage_piece_set.hpp aux_/string_ptr.hpp aux_/time.hpp aux_/file_progress.hpp aux_/openssl.hpp aux_/byteswap.hpp aux_/route.h aux_/cppint_import_export.hpp aux_/ffs.hpp aux_/portmap.hpp aux_/lsd.hpp ‘/usr/include/libtorrent/aux_’
    /usr/bin/mkdir -p ‘/usr/include/libtorrent/kademlia’
    /usr/bin/install -c -m 644 kademlia/announce_flags.hpp kademlia/dht_settings.hpp kademlia/dht_state.hpp kademlia/dht_storage.hpp kademlia/dht_tracker.hpp kademlia/dht_observer.hpp kademlia/direct_request.hpp kademlia/dos_blocker.hpp kademlia/find_data.hpp kademlia/io.hpp kademlia/put_data.hpp kademlia/msg.hpp kademlia/node.hpp kademlia/node_entry.hpp kademlia/node_id.hpp kademlia/observer.hpp kademlia/refresh.hpp kademlia/routing_table.hpp kademlia/rpc_manager.hpp kademlia/traversal_algorithm.hpp kademlia/types.hpp kademlia/ed25519.hpp kademlia/item.hpp kademlia/get_item.hpp kademlia/sample_infohashes.hpp kademlia/get_peers.hpp ‘/usr/include/libtorrent/kademlia’
    /usr/bin/install -c -m 644 socket.hpp socket_io.hpp socks5_stream.hpp ssl_stream.hpp stack_allocator.hpp stat.hpp stat_cache.hpp storage.hpp storage_defs.hpp tailqueue.hpp string_view.hpp string_util.hpp time.hpp timestamp_history.hpp torrent_flags.hpp torrent_handle.hpp torrent.hpp torrent_info.hpp torrent_peer.hpp torrent_peer_allocator.hpp tracker_manager.hpp torrent_status.hpp udp_socket.hpp udp_tracker_connection.hpp union_endpoint.hpp units.hpp upnp.hpp utp_socket_manager.hpp utp_stream.hpp utf8.hpp vector_utils.hpp version.hpp web_connection_base.hpp web_peer_connection.hpp xml_parse.hpp span.hpp download_priority.hpp index_range.hpp ‘/usr/include/libtorrent/.’
    /usr/bin/mkdir -p ‘/usr/include/libtorrent/aux_’
    /usr/bin/install -c -m 644 aux_/has_block.hpp aux_/scope_end.hpp aux_/vector.hpp aux_/win_crypto_provider.hpp aux_/win_util.hpp aux_/storage_utils.hpp aux_/numeric_cast.hpp aux_/unique_ptr.hpp aux_/alloca.hpp aux_/throw.hpp aux_/array.hpp aux_/ip_notifier.hpp aux_/noexcept_movable.hpp aux_/torrent_impl.hpp aux_/instantiate_connection.hpp aux_/range.hpp aux_/windows.hpp ‘/usr/include/libtorrent/aux_’
    /usr/bin/mkdir -p ‘/usr/include/libtorrent/extensions’
    /usr/bin/install -c -m 644 extensions/smart_ban.hpp extensions/ut_metadata.hpp extensions/ut_pex.hpp ‘/usr/include/libtorrent/extensions’
    make[2]: Leaving directory `/root/boost_1_67_0/libtorrent-rasterbar-1.2.1/include/libtorrent’
    make[1]: Leaving directory `/root/boost_1_67_0/libtorrent-rasterbar-1.2.1/include/libtorrent’
    Making install in src
    make[1]: Entering directory `/root/boost_1_67_0/libtorrent-rasterbar-1.2.1/src’
    CXX libtorrent_rasterbar_la-web_connection_base.lo
    In file included from ../include/libtorrent/entry.hpp:76:0,
    from ../include/libtorrent/settings_pack.hpp:36,
    from ../include/libtorrent/aux_/session_settings.hpp:37,
    from ../include/libtorrent/peer_connection.hpp:53,
    from ../include/libtorrent/web_connection_base.hpp:42,
    from web_connection_base.cpp:38:
    ../include/libtorrent/string_view.hpp:60:24: error: missing space between ‘””’ and suffix identifier
    constexpr string_view operator””_sv(char const* str, std::size_t len)
    ^
    In file included from ../include/libtorrent/aux_/session_settings.hpp:37:0,
    from ../include/libtorrent/peer_connection.hpp:53,
    from ../include/libtorrent/web_connection_base.hpp:42,
    from web_connection_base.cpp:38:
    ../include/libtorrent/settings_pack.hpp:93:18: error: function ‘libtorrent::settings_pack& libtorrent::settings_pack::operator=(libtorrent::settings_pack&&)’ defaulted on its first declaration with an exception-specification that differs from the implicit declaration ‘libtorrent::settings_pack& libtorrent::settings_pack::operator=(libtorrent::settings_pack&&)’
    settings_pack& operator=(settings_pack&&) noexcept = default;
    ^
    In file included from ../include/libtorrent/torrent_info.hpp:52:0,
    from ../include/libtorrent/torrent.hpp:48,
    from ../include/libtorrent/web_connection_base.hpp:43,
    from web_connection_base.cpp:38:
    ../include/libtorrent/file_storage.hpp:65:15: error: function ‘libtorrent::file_entry& libtorrent::file_entry::operator=(libtorrent::file_entry&&) &’ defaulted on its first declaration with an exception-specification that differs from the implicit declaration ‘libtorrent::file_entry& libtorrent::file_entry::operator=(libtorrent::file_entry&&)’
    file_entry& operator=(file_entry&&) & noexcept = default;
    ^
    make[1]: *** [libtorrent_rasterbar_la-web_connection_base.lo] Error 1
    make[1]: Leaving directory `/root/boost_1_67_0/libtorrent-rasterbar-1.2.1/src’
    make: *** [install-recursive] Error 1 :cry:

    loeveo5年前 (2019-09-03) UC Browser 12.6.1.1041 UC Browser 12.6.1.1041 Android 7.1.1 Android 7.1.1回复
    • 参考下这篇文章,BOOST库也要自己编译最新版:https://lala.im/5865.html

      LALA5年前 (2019-09-03) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 原来boots还在改一下配置才可以编译成功. 我说怎么google查出来的资料失败了 :razz: 然后我直接放弃最新版本的lib了,因为qb新的版本不支持1.20的lib
        . 对了,荒岛我发现qb升级贼好升级. 把以前的程序改名备份,然后把新版本需要的软件安装一下,直接开始新版本编译就OK了 :!: :!:

        loeveo5年前 (2019-09-07) UC Browser 12.6.2.1042 UC Browser 12.6.2.1042 Android 7.1.1 Android 7.1.1回复
        • master分支应该是支持libtorrent1.2的(他们作者自己说的),但是我前几天编译不过。。看看后续是啥情况吧,另外他们作者说从4.2.x起会放弃libtorrent1.1的支持,全面转向libtorrent1.2。。升级方便的原因是因为就一个二进制文件在/usr/bin。。

          LALA5年前 (2019-09-07) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
  9. #9

    能付费升级一下脚本不

    小黑4年前 (2021-01-21) Google Chrome 87.0.4280.88 Google Chrome 87.0.4280.88 Windows 10 x64 Edition Windows 10 x64 Edition回复

分享创造快乐

广告合作资源投稿