source: BOOK/the-end/downloadclient.xml@ 313b794

clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 313b794 was bd85080, checked in by William Harrington <kb0iic@…>, 12 years ago

Change ncftp in download clients to cblfs ncftp page.

  • Property mode set to 100644
File size: 3.3 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-finish-downloadclient">
9 <?dbhtml filename="downloadclient.html"?>
10
11 <title>Download Client</title>
12
13 <para>The final system build does not install an FTP or HTTP client for downloading files.</para>
14
15 <itemizedlist>
16 <para>Some suggested clients include:</para>
17 <listitem>
18 <para>Curl <ulink url="&cblfs-root;index.php/Curl"/></para>
19 </listitem>
20 <listitem>
21 <para>Inetutils <ulink url="&cblfs-root;index.php/Inetutils"/></para>
22 </listitem>
23 <listitem>
24 <para>LFTP <ulink url="http://lftp.yar.ru/"/></para>
25 </listitem>
26 <listitem>
27 <para>Links <ulink url="&cblfs-root;index.php/Links"/></para>
28 </listitem>
29 <listitem>
30 <para>Lynx <ulink url="&cblfs-root;index.php/Lynx"/></para>
31 </listitem>
32 <listitem>
33 <para>NcFTP Client <ulink url="&cblfs-root;index.php/Ncftp"/></para>
34 </listitem>
35 <listitem>
36 <para>Wget <ulink url="&cblfs-root;index.php/Wget"/></para>
37 </listitem>
38 <listitem>
39 <para>BASH - A user can use net redirections (if not disabled when building bash in the final system) to download wget or another program.</para>
40<screen><userinput>cat &gt; download.sh &lt;&lt; "EOF"
41#!/bin/bash
42
43WGET_VERSION='1.14'
44WGET_HOSTNAME='ftp.gnu.org'
45exec {HTTP_FD}&lt;&gt;/dev/tcp/${WGET_HOSTNAME}/80
46echo -ne "GET /gnu/wget/wget-${WGET_VERSION}.tar.xz HTTP/1.1\r\nHost: "\
47 ${WGET_HOSTNAME}'\r\nUser-Agent: '\
48 'bash/'${BASH_VERSION}'\r\n\r\n' &gt;&amp;${HTTP_FD}
49sed -e '1,/^.$/d' &lt;&amp;${HTTP_FD} &gt;wget-${WGET_VERSION}.tar.xz
50EOF</userinput></screen>
51 </listitem>
52 <listitem>
53 <para>GAWK</para>
54<screen><userinput>cat &gt; gawkdl.sh &lt;&lt; "EOF"
55#!/bin/bash
56
57gawk 'BEGIN {
58 NetService = "/inet/tcp/0/mirror.anl.gov/80"
59 print "GET /pub/gnu/wget/wget-1.14.tar.xz" |&amp; NetService
60 while ((NetService |&amp; getline) > 0)
61 print $0
62 close(NetService)
63}' > binary
64
65gawk '{q=p;p=$0}NR&gt;1{print q}END{ORS = ""; print p}' binary &gt; wget-1.14.tar.xz
66
67rm binary
68EOF</userinput></screen>
69 </listitem>
70 <listitem>
71 <para>PERL with HTTP::Tiny (Included with final system PERL install).</para>
72<screen><userinput>cat &gt; download.pl &lt;&lt; "EOF"
73#!/usr/bin/perl
74
75use HTTP::Tiny;
76my $http = HTTP::Tiny->new;
77my $response;
78
79$response = $http->mirror('http://ftp.gnu.org/gnu/wget/wget-1.14.tar.xz', 'wget-1.14.tar.xz');
80die "Failed!\n" unless $response->{success};
81print "Unchanged!\n" if $response->{status} eq '304';
82EOF</userinput></screen>
83 <para>Or use this:</para>
84<screen><userinput>perl -MHTTP::Tiny -E 'say HTTP::Tiny-&gt;new-&gt;get(shift)-&gt;{content}' "http://ftp.gnu.org/gnu/wget/wget-1.14.tar.xz" &gt; binary
85perl -e 'local $/; $_ = &lt;&gt;; s/\n$//; print' binary &gt; wget-1.14.tar.xz
86rm binary</userinput></screen>
87 </listitem>
88 <listitem>
89 <para>PERL with LWP: Run <command>cpan</command> and manually configure the client. Run <command>install LWP</command> while in the CPAN shell.</para>
90 <para>Refer to <ulink url="http://www.bioinfo-user.org.uk/dokuwiki/doku.php/projects/wgetpl"/> for wgetpl.</para>
91 </listitem>
92 </itemizedlist>
93
94</sect1>
Note: See TracBrowser for help on using the repository browser.