• Aria2 Centos8 安装配置


    使用chkconfig 或者 chkconfig –list就可以看出当前系统已经设置的各个服务在各个运行级别下的开闭状态。如果我们想设置某个服务自启动或者关闭的话,那么只需要按照下面的格式使用即可

    chkconfig servicename on/off

    ==================================================================================

    运行

    aria2c  --conf-path="/home/gxc/aria22/aria2.conf" -D

    停止

    kill -9 $(ps -ef |grep "aria2c" |grep -v "grep" |awk '{print $2}')

    添加可执行权限

    $ chmod +x /etc/init.d/aria2

    安装

    $ tar xzvf aria2-1.22.0.tar.gz

    $ cd aria2-1.22.0

    $ ./configure

    $ make

    $ make install

    $ man aria2c //查看aria2c manual

    验证Aria2版本

    $ aria2c --version

    设置开机自动启动

    vim /etc/rc.d/rc.local
    

    最后一行添加

    /usr/bin/aria2c --conf-path="/home/gxc/aria22/aria2.conf" -D
    ===============================================================
    #安装目录自己定义
    ./configure --prefix=/home/program/aria2
    make && make install
    #设置软链接
    ln -s /home/program/aria2/bin/aria2c /usr/bin/aria2c
     ########################################################################
    pkg-config-0.29.2安装
    ./configure  --with-internal-glib
    make
    make install
    ********************************************
    openssl-1.1.1d安装
    ./config
    make
    make install

    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    1.关闭防火墙和selinux
    2.安装wget(如有请跳过)

    yum install -y wget

    3.安装EPEL源

    wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    rpm -ivh epel-release-latest-7.noarch.rpm

    4.安装Aria2

    yum install aria2

    5.生成配置文件并编辑

    mkdir /etc/aria2/   #创建目录
    vi /etc/aria2/aria2.conf   #创建配置文件

    6.配置文件内容

    用户名
    #rpc-user=user
    #密码
    #rpc-passwd=passwd
    #上面的认证方式不建议使用,建议使用下面的token方式
    #设置加密的密钥
    #rpc-secret=token
    #允许rpc
    enable-rpc=true
    #允许所有来源, web界面跨域权限需要
    rpc-allow-origin-all=true
    #允许外部访问,false的话只监听本地端口
    rpc-listen-all=true
    #RPC端口, 仅当默认端口被占用时修改
    rpc-listen-port=6800
    #最大同时下载数(任务数), 路由建议值: 3
    max-concurrent-downloads=5
    #断点续传
    continue=true
    #同服务器连接数
    max-connection-per-server=5
    #最小文件分片大小, 下载线程数上限取决于能分出多少片, 对于小文件重要
    min-split-size=10M
    #单文件最大线程数, 路由建议值: 5
    split=10
    #下载速度限制
    max-overall-download-limit=0
    #单文件速度限制
    max-download-limit=0
    #上传速度限制
    max-overall-upload-limit=0
    #单文件速度限制
    max-upload-limit=0
    #断开速度过慢的连接
    #lowest-speed-limit=0
    #验证用,需要1.16.1之后的release版本
    #referer=*
    #文件保存路径, 默认为当前启动位置
    dir=/root/downloads
    #文件缓存, 使用内置的文件缓存, 如果你不相信Linux内核文件缓存和磁盘内置缓存时使用
    #disk-cache=0
    #另一种Linux文件缓存方式
    #enable-mmap=true
    #文件预分配, 能有效降低文件碎片, 提高磁盘性能. 缺点是预分配时间较长
    file-allocation=prealloc

    8.安装httpd

    yum  -y  install  httpd

    11.确认无误后重启机器,使用以下命令让Aria2c在后台运行

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

    12.最后说两句

    如果需要其他用户(例如httpd的用户www)有权限修改删除请使用以下启动服务

    sudo -u www aria2c --conf-path=/etc/aria2/aria2.conf -D

    如需开机自启动请把启动服务的代码加到/etc/rc.d/rc.local并设置文件权限为777

  • 相关阅读:
    fedora上部署ASP.NET——(卡带式电脑跑.NET WEB服务器)
    SQL Server 请求失败或服务未及时响应。有关详细信息,请参见事件日志或其它适合的错误日志
    8086CPU的出栈(pop)和入栈(push) 都是以字为单位进行的
    FTP 服务搭建后不能访问问题解决
    指定的 DSN 中,驱动程序和应用程序之间的体系结构不匹配
    Linux 安装MongoDB 并设置防火墙,使用远程客户端访问
    svn Please execute the 'Cleanup' command. 问题解决
    .net 操作MongoDB 基础
    oracle 使用绑定变量极大的提升性能
    尝试加载 Oracle 客户端库时引发 BadImageFormatException。如果在安装 32 位 Oracle 客户端组件的情况下以 64 位模式运行,将出现此问题。
  • 原文地址:https://www.cnblogs.com/stvadv/p/11928090.html
Copyright © 2020-2023  润新知