Raspberry Pi can do a lot of interesting things, it is equivalent to a small computer, installed on the system can be used as a small server home.
With this small server, you can implement an "offline" Download machine. But offline download here is not really offline, because the Raspberry Pi is still online-since the Raspberry Pi as a small server, it should remain online for a long time-but because the Raspberry Pi power consumption is very small, and the space is very small, so as a home server is very good.
This Raspberry Pi Offline Downloader is built using Aria, an open-source multi-threaded download tool that can perform many kinds of download tasks. With ARIA2, we can easily complete download tasks, including wget tools.
The first is to install ARIA2, we can download the installation through ARIA2 's official website: http://aria2.github.io/
Similarly, if your Raspberry Pi and I use a system--debian, you can also use the Debian command to install:
$sudoinstall aria2
Just wait a few moments for the installation to succeed.
After that, we can use ARIA2 to download the task, aria2 Download command is very simple, for example, we want to download a mp3, then only the input:
$aria 2c Xxxx/abc.mp3
For specific aria2 use, we can refer to Aria2 's official documentation: http://aria2.github.io/manual/en/html/index.html
Is that OK? Of course not, that's not enough. The ease of use of an offline download tool.
The next step is to install a graphical interface for ARIA2, ARIA2 the official recommendation has a lot of graphical interface, and, ARIA2 also provides the RPC interface for us to make the call, below we use an open source interface for the ARIA2 installation of graphical tools.
The graphical tool we use is ARIA2 WebUI, which can be found on Aria2 's official website, and we enter its github to clone the project down:
git clone https://github.com/ziahamza/webui-aria2.git
Once you get the code, just use the input
Node Node-server.js
The graphical interface is ready to run, but before you do, you need to install the NODEJS environment with the following command:
$sudoinstall Nodejs
This does not work, we need to first configure the following startup items, Aria2 WebUI under the Configconfiguration.js Open, will
Host:location.protocol.startsWith (' http ')? Location.hostname: ' localhost '
This line is changed to:
Host:location.protocol.startsWith (' http ')? Location.hostname: ' 0.0.0.0 '
Otherwise there is no way to access outside the server.
Then we can enter the Raspberry Pi intranet IP address on the other host, such as the Raspberry Pi IP bit 192.168.1.122, and the Raspberry Pi router agreed to the network segment of the host, access to 192.168.1.122:8888, we can see the Web page.
However, this is just a page, this page and aria2 are interactive via RPC, so we need to start ARIA2 RPC:
ARIA2C--enable-rpc--rpc-listen-all
This allows our graphical interface to access the ARIA2 service.
So we have access to the interface, if usually we have any big files need to download, we can go to sleep before you click to download, then turn off the computer, the next day to get up to download to the Raspberry Pi. Next we can download the Raspberry Pi data through the router intranet to the computer hard disk, this process is very fast, if you want an easy way to set up an HTTP file access, we can use the ARIA2 download directory, using the Python3 command to quickly build an HTTP access file, To download:
Python3-m Http.server
Click on the file, you can quickly download, feeling is not great?