Ubuntu
Guide for making Lemaker Guita a remote downloading Machine
2
2805
View: 2805|Reply: 2
|
[Ubuntu]
Guide for making Lemaker Guita a remote downloading Machine
[Copy link]
|
|
Edited by jacer at Thu Oct 22, 2015 02:39
Here is a guide for making your Lemaker Guita a downloading machine. You can add, delete, stop downloadings from your cellphones, tablets, PCs using a web browser. You should connect your USB drive or portable hard drive to the Lemaker Guita first. Of course you can also to choose download it to the SD card or EMMC but it is not advised. We need to install Aria2, Nginx, and YAAW or Aria2web.First, lauch terminal with shortcut CTRL+ALT+T, then input commands below.
- sudo apt-get install aria2 nginx vim
Copy the Code then run commands belw to make sure you have the /dev/sda1
make a external folder for mounting sda1
- sudo mkdir /media/external
Copy the Code downloading the YAAW to the home folder andconfigure it
- cd ~
- wget https://github.com/binux/yaaw/archive/master.zip
- unzip master.zip
- cd yaww-master
- sudo mkdir /var/www/html/yaaw
- sudo cp -R * /var/www/html/yaaw
- sudo chmod 777 -R /var/www/html
Copy the Code You can also use Aria2Web as Aria2 front using below commands to configure
- cd ~
- wget https://codeload.github.com/ziahamza/webui-aria2/zip/master
- unzip webui-aria2-master.zip
- cd webui-aria2-master
- sudo mkdir /var/www/html/aria2
- sudo cp -R * /var/www/html/aria2
- sudo chmod 777 /var/www/html/aria2
Copy the Code Let`s configure Aria2
- sudo mkdir /etc/aria2
- sudo touch /etc/aria2/session
- sudo vi /etc/aria2/aria2.conf
Copy the Code copy and paste below to the editing fil press ESC then input :wq to save the file.
- dir=/media/external
- disable-ipv6=true
- enable-rpc=true
- rpc-allow-origin-all=true
- rpc-listen-all=true
- rpc-listen-port=6800
- input-file=/etc/aria2/aria2.session
- save-session=/etc/aria2/aria2.session
- max-concurrent-downloads=10
- continue=true
- max-connection-per-server=5
- min-split-size=10M
- split=10
- max-overall-download-limit=0
- max-download-limit=0
- max-overall-upload-limit=0
- max-upload-limit=0
- lowest-speed-limit=0
Copy the Code Testing with below command for aria2 service, if no error then press CTRL+C
- sudo aria2c --conf-path=/etc/aria2/aria2.conf
Copy the Code Make a autostart script
- sudo vi /etc/init.d/aria2c
Copy the Code- #!/bin/sh
- RETVAL=0
- case "$1" in
- start)
- echo "Starting aria2c"
- if [ -e /dev/sda1 ]
- then
- mount -t vfat -o iocharset=utf8,uid=lemaker,gid=lemaker /dev/sda1 /media/external
- fi
- aria2c --conf-path=/etc/aria2/aria2.conf -D
- echo "Start aria2c done."
- ;;
- stop)
- echo "Stoping aria2c"
- killall aria2c
- if [ -e /dev/sda1 ]
- then
- umount /media/external
- fi
- echo "Stop aria2c done"
- ;;
- esac
- exit $RETVAL
Copy the Code Make the script executable
- sudo chmod +x /etc/init.d/aria2c
Copy the Code run the script
- sudo service aria2c start
Copy the Code- sudo update-rc.d aria2c defaults
Copy the Code
Now open your web browser and input IP address as below.
- http://LemakerGuita`s Lan IP/yaaw
Copy the Code
or
- http://LemakerGuita`s Lan IP/aria2
Copy the Code You can add download link using two of the GUI as you pleased.
If you have your own Domain, you can use DDNS and rpc 6800 to use the downloading machine wherever
you goes.
|
|
|
|
|
|
|
|
I will share Samba and minidlna configuration next week. Kind busy this week. |
|
|
|
|
|
|