VPSMATE

  • HOME
  • NEWS
  • VPS
  • DEDICATED
  • ARCHIVES
  • GoDaddy
  • SCRIPT
  • TOOLS
    • Traceroute
    • Benchmark
    • Useful Sites
  • Themes
  • GFW
VPSMATE
VPS COUPON & PROMOS | VPS & DEDICATED SERVERS OFFERS | VPS REVIEWS
  1. Main page
  2. Tutorials
  3. Main content

How to install Aria2 + AriaNg on CentOS 7

07/09/2020 3755hotness 2likes 0comments

Table of Contents

  • Aria2 (https://github.com/aria2/aria2)
    • Install Aria2
    • Configure Aria2
    • Run Aria2
      • Run Method 1
      • Run Method 2
    • Run Aria2 when server boot
  • AriaNG (https://github.com/mayswind/AriaNg)
    • Install AriaNG
    • Setting up AriaNg

Aria2 (https://github.com/aria2/aria2)

aria2 is a lightweight multi-protocol & multi-source command-line download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink. aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.

  1. Install Aria2

    Install directly through yum, you might need to install an EPEL source first

    yum install epel-release
    yum install aria2 -y

    Tip:

    Extra Packages for Enterprise Linux (or EPEL) is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL), Oracle Linux (OL).

  2. Configure Aria2

    Taking an example, in this case we create necessary files under /root directory

    mkdir .aria2 cd .aria2
    touch aria2.session
    touch aria2
    .log

    Save and modify the following code to create an aria2.conf file. Note that you need to modify the file save path and RPC authorization token for later use.


    #downloaded file location
    dir=/home/datadisk-cache=32M
    file-allocation=none
    continue=true
    max-concurrent-downloads=10
    max-connection-per-server=5
    min-split-size=10M
    split=20
    disable-ipv6=true
    input-file=/root/.aria2/aria2.session
    save-session=/root/.aria2/aria2.session

    ## RPC related settings##
    # enable RPC, default:false
    enable-rpc=true
    # allow all origin, default:false
    rpc-allow-origin-all=true
    # allow access from external, default:false
    rpc-listen-all=true
    # event polling type, options:[epoll, kqueue, port, poll, select], different has different default settings
    #event-poll=select
    # RPC listening port, can be modified if the port is occupied by others, default:6800
    rpc-listen-port=6800
    # RPC token secret,it's needed when using AriaNG to connect,please modify.
    rpc-secret=<TOKEN>

    follow-torrent=true
    listen-port=6881-6999
    enable-dht=true
    enable-peer-exchange=true
    peer-id-prefix=-TR2770-
    user-agent=Transmission/2.77
    seed-ratio=0.1
    bt-seed-unverified=true
    bt-save-metadata=false

  3. Run Aria2

    Run Method 1

    This way to run Aria2 will not allow you to save settings modifed during this connected session

    aria2c --enable-rpc --rpc-listen-all=true --rpc-allow-origin-all -c -D
    Run Method 2

    This will save all the changes during the connected session

    aria2c --conf-path=/root/.aria2/aria2.conf -D

    Tip:

    -D is used for background execution, daemon mode, so that the program will not exit after ssh is disconnected, the same effect as screen

  4. Run Aria2 when server boot

    add "aria2c --conf-path=/root/.aria2/aria2.conf -D &" to /etc/rc.d/rc.local

AriaNG (https://github.com/mayswind/AriaNg)

AriaNg is a modern web frontend making aria2 easier to use. AriaNg is written in pure html & javascript, thus it does not need any compilers or runtime environment. You can just put AriaNg in your web server and open it in your browser. AriaNg uses responsive layout, and supports any desktop or mobile devices.

  1. Install AriaNG

    check the latest release at: https://github.com/mayswind/AriaNg/releases unzip the release zip file into your webserver http folder.

    eg.

    wget https://github.com/mayswind/AriaNg/releases/download/1.1.7/AriaNg-1.1.7-AllInOne.zip
    unzip AriaNg-1.1.7-AllInOne.zip
  2. Setting up AriaNg

    Open browser visit domain where the unzipped index.html is, you will see the web interface of AriaNg.
    Navigate to AriaNg Settings fill up the token we typed in conf file previously and you will see on bottom left bar showing connected. Everthing is sweet now.

Related

Tag: Nothing
Last updated:07/09/2020

kyaky

This person is a lazy dog and has left nothing

Like
< Last article
Next article >

Comments

Cancel

This site uses Akismet to reduce spam. Learn how your comment data is processed.

COPYRIGHT © 2021 vpsmate.net. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang