只需一步,快速开始
sudo apt-get install aria2 apache2
sudo visudo
www-data ALL=(ALL) NOPASSWD: ALL
mkdir ~/.aria2 touch ~/.aria2/aria2.session nano ~/.aria2/aria2.conf
dir=/home/xbian/Download #下载默认的目录 disable-ipv6=true enable-rpc=true rpc-allow-origin-all=true rpc-listen-all=true #rpc-listen-port=6800 continue=true input-file=/home/xbian/.aria2/aria2.session #刚才touch命令的那个文件,路径要绝对路径 save-session=/home/xbian/.aria2/aria2.session #同上,这个文件的作用是保存你的下载列表,不保存的话重启后所有下载都木有了 max-concurrent-downloads=3
sudo nano /etc/init.d/aria2c
#!/bin/sh ### BEGIN INIT INFO # Provides: aria2 # Required-Start: $remote_fs $network # Required-Stop: $remote_fs $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Aria2 Downloader ### END INIT INFO case "$1" in start) echo -n "Starting aria2c" sudo -u xbian aria2c --conf-path=/home/xbian/.aria2/aria2.conf -D #sudo -u后面的是你正在使用的用户名,因为我用的XBian,用debian的是pi(没改用户的话) ;; stop) echo -n "Shutting down aria2c " killall aria2c ;; restart) killall aria2c sudo -u xbian aria2c --conf-path=/home/xbian/.aria2/aria2.conf -D #同上面的一样,根据自己的用户名改xbian。 ;; esac exit
sudo chmod 755 /etc/init.d/aria2c
sudo service aria2c start
sudo update-rc.d aria2c defaults
cd /var/www git clone http://github.com/wzhy90/yaaw
查看全部评分
使用道具 举报
#!/bin/sh ### BEGIN INIT INFO # Provides: aria2 # Required-Start: $local_fs $remote_fs $network # Required-Stop: $local_fs $remote_fs $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Aria2 Downloader ### END INIT INFO NAME=aria2c USER=wzhy90 ARIA2C=/usr/bin/$NAME PIDFILE=/var/run/$NAME.pid CONF=/home/$USER/.aria2/aria2.conf ARGS="--conf-path=${CONF}" test -f $ARIA2C || exit 0 . /lib/lsb/init-functions case "$1" in start) log_daemon_msg "Starting aria2c." if [ -e "$PIDFILE" ]; then log_warning_msg "aria2c is already running." else start-stop-daemon -S -q -b -m -p $PIDFILE -c $USER -a $ARIA2C -- $ARGS log_end_msg $? fi ;; stop) log_daemon_msg "Stopping aria2c." if [ -e "$PIDFILE" ]; then start-stop-daemon -K -q -p $PIDFILE rm $PIDFILE log_end_msg $? else log_warning_msg "aria2c is not running." fi ;; restart|reload|force-reload) log_daemon_msg "Restarting aria2c." if [ -e "$PIDFILE" ]; then start-stop-daemon -K -R 5 -q -p $PIDFILE start-stop-daemon -S -q -b -m -p $PIDFILE -c $USER -a $ARIA2C -- $ARGS log_end_msg $? else log_warning_msg "aria2c is not running." fi ;; status) status_of_proc -p $PIDFILE $ARIA2C aria2c && exit 0 || exit $? ;; *) log_action_msg "Usage: /etc/init.d/aria2c {start|stop|restart|reload|force-reload|status}" exit 2 ;; esac exit 0
jadebug 发表于 2013-6-10 10:33 下载的电影文件名好亮!
无华0871 发表于 2013-6-13 17:50 sudo update-rc.d aria2c defaults 这步提示无法读取文件 cd /var/www
本版积分规则 发表回复 回帖后跳转到最后一页
其实这个教程很简单,但是还是有许多小白用户搞不清楚如何下手,故此也说一下。 1
四驱四轮智能玩具小车底盘安装方法。用到的四驱车,点此查看购买 视频中使用的小车
本版为大家提供全球大量的树莓派相关资料,供大家学习参考,非常有用。有的经过翻译,
官方微信
服务时间:10:00-16:00
公司地址:深圳市龙岗区南湾街道东门头路8号