2023年3月24日 星期五

[研究]Wget2 v2.0.1網站下載軟體安裝、試用 (Rocky Linux 9.1)

[研究]Wget2 v2.0.1網站下載軟體安裝、試用 (Rocky Linux 9.1)

2023-03-21

本篇CentOS應該通用。

GNU Wget2:是 GNU Wget 的下一代版本,支援多執行緒下載、HTTP/2、IPv6 等功能,是一款強大的命令列工具。

Wget - 維基百科,自由的百科全書
https://zh.wikipedia.org/wiki/Wget#Wget2

GNU Wget2 2.0.0 釋出於 2021 年 9 月 26 日。比起Wget1.x支援以下協定和技術:

  • HTTP/2
  • HTTP壓縮
  • 並列連接
  • 使用HTTP頭欄位If-Modified-Since
  • TCP Fast Open

官方網站:https://www.gnu.org/software/wget/

官方網站:https://gitlab.com/gnuwget/wget2

********************************************************************************

Rocky Linux 9.1 上有提供 wget,但沒有提供 wget2

[user1@localhost ~]$ sudo yum -y install epel-release

[user1@localhost ~]$ sudo yum -y install epel-release    


[user1@localhost ~]$ sudo yum list | grep wget
wget.x86_64     1.21.1-7.el9     @AppStream
[user1@localhost ~]$

官方安裝教學
https://gitlab.com/gnuwget/wget2

安裝基本套件


[user1@localhost ~]$ sudo yum -y install autotools python  rsync tar makeinfo pkg-config  doxygen  pandoc  gettext libiconv  libz liblzma  libbz2 libbrotlidec libbrotli  libzstd  libgnutls libidn2 flex  libpsl  libnghttp2  libmicrohttpd  lzip lcov libgpgme  libpcre libhsts libwolfssl
[sudo] password for user1: 
Last metadata expiration check: 0:29:03 ago on Fri 24 Mar 2023 10:43:56 AM CST.
No match for argument: autotools
Package python-unversioned-command-3.9.14-1.el9_1.1.noarch is already installed.
Package rsync-3.2.3-18.el9.x86_64 is already installed.
Package tar-2:1.34-5.el9.x86_64 is already installed.
No match for argument: makeinfo
Package pkgconf-pkg-config-1.7.3-9.el9.x86_64 is already installed.
No match for argument: doxygen
Package gettext-0.21-7.el9.x86_64 is already installed.
No match for argument: libiconv
No match for argument: libz
No match for argument: liblzma
No match for argument: libbz2
No match for argument: libbrotlidec
Package libbrotli-1.0.9-6.el9.x86_64 is already installed.
Package libzstd-1.5.1-2.el9.x86_64 is already installed.
No match for argument: libgnutls
Package libidn2-2.3.0-7.el9.x86_64 is already installed.
Package libpsl-0.21.1-5.el9.x86_64 is already installed.
Package libnghttp2-1.43.0-5.el9.x86_64 is already installed.
No match for argument: libgpgme
No match for argument: libpcre
No match for argument: libhsts
No match for argument: libwolfssl
Error: Unable to find a match: autotools makeinfo doxygen libiconv libz liblzma libbz2 libbrotlidec libgnutls libgpgme libpcre libhsts libwolfssl
[user1@localhost ~]$ 

安裝、編譯主要套件

[user1@localhost ~]$ wget https://gnuwget.gitlab.io/wget2/wget2-latest.tar.gz
--2023-03-24 11:06:21--  https://gnuwget.gitlab.io/wget2/wget2-latest.tar.gz
Resolving gnuwget.gitlab.io (gnuwget.gitlab.io)... 35.185.44.232
Connecting to gnuwget.gitlab.io (gnuwget.gitlab.io)|35.185.44.232|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2819571 (2.7M) [application/gzip]
Saving to: ‘wget2-latest.tar.gz’

wget2-latest.tar.g 100%[=============>]   2.69M  1.41MB/s    in 1.9s    

2023-03-24 11:06:25 (1.41 MB/s) - ‘wget2-latest.tar.gz’ saved [2819571/2819571]

[user1@localhost ~]$ tar xf wget2-latest.tar.gz 
[user1@localhost ~]$ cd wget2-2.0.1/
[user1@localhost wget2-2.0.1]$ ./configure
...(略)
configure: error: in `/home/user1/wget2-2.0.1':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
[user1@localhost wget2-2.0.1]$ 

[user1@localhost wget2-2.0.1]$ sudo yum -y install gcc
[sudo] password for user1: 
Last metadata expiration check: 0:23:47 ago on Fri 24 Mar 2023 10:43:56 AM CST.
Dependencies resolved.
=========================================================================
 Package              Arch    Version                   Repository  Size
=========================================================================
Installing:
 gcc                  x86_64  11.3.1-2.1.el9            appstream   32 M
Upgrading:
 glibc                x86_64  2.34-40.el9_1.1           baseos     1.9 M
 glibc-all-langpacks  x86_64  2.34-40.el9_1.1           baseos      18 M
 glibc-common         x86_64  2.34-40.el9_1.1           baseos     300 k
 glibc-gconv-extra    x86_64  2.34-40.el9_1.1           baseos     1.5 M
 glibc-langpack-en    x86_64  2.34-40.el9_1.1           baseos     559 k
 glibc-langpack-zh    x86_64  2.34-40.el9_1.1           baseos     2.2 M
Installing dependencies:
 glibc-devel          x86_64  2.34-40.el9_1.1           appstream   41 k
 glibc-headers        x86_64  2.34-40.el9_1.1           appstream  440 k
 kernel-headers       x86_64  5.14.0-162.18.1.el9_1     appstream  3.2 M
 libxcrypt-devel      x86_64  4.4.18-3.el9              appstream   28 k
 make                 x86_64  1:4.3-7.el9               baseos     530 k

Transaction Summary
=========================================================================
Install  6 Packages
Upgrade  6 Packages

Total download size: 61 M
Downloading Packages:
(1/12): libxcrypt-devel-4.4.18-3.el9.x86 183 kB/s |  28 kB     00:00    
(2/12): make-4.3-7.el9.x86_64.rpm        2.1 MB/s | 530 kB     00:00    
(3/12): glibc-headers-2.34-40.el9_1.1.x8 1.3 MB/s | 440 kB     00:00    
(4/12): glibc-devel-2.34-40.el9_1.1.x86_ 520 kB/s |  41 kB     00:00    
(5/12): glibc-langpack-zh-2.34-40.el9_1. 4.4 MB/s | 2.2 MB     00:00    
(6/12): glibc-langpack-en-2.34-40.el9_1. 5.7 MB/s | 559 kB     00:00    
(7/12): glibc-gconv-extra-2.34-40.el9_1. 3.9 MB/s | 1.5 MB     00:00    
(8/12): glibc-common-2.34-40.el9_1.1.x86 4.3 MB/s | 300 kB     00:00    
(9/12): kernel-headers-5.14.0-162.18.1.e 907 kB/s | 3.2 MB     00:03    
(10/12): glibc-2.34-40.el9_1.1.x86_64.rp 2.2 MB/s | 1.9 MB     00:00    
(11/12): glibc-all-langpacks-2.34-40.el9 5.2 MB/s |  18 MB     00:03    
(12/12): gcc-11.3.1-2.1.el9.x86_64.rpm   2.8 MB/s |  32 MB     00:11    
-------------------------------------------------------------------------
Total                                    4.5 MB/s |  61 MB     00:13     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                 1/1 
  Upgrading        : glibc-langpack-en-2.34-40.el9_1.1.x86_64       1/18 
  Upgrading        : glibc-gconv-extra-2.34-40.el9_1.1.x86_64       2/18 
  Running scriptlet: glibc-gconv-extra-2.34-40.el9_1.1.x86_64       2/18 
  Upgrading        : glibc-common-2.34-40.el9_1.1.x86_64            3/18 
  Running scriptlet: glibc-2.34-40.el9_1.1.x86_64                   4/18 
  Upgrading        : glibc-2.34-40.el9_1.1.x86_64                   4/18 
  Running scriptlet: glibc-2.34-40.el9_1.1.x86_64                   4/18 
  Upgrading        : glibc-langpack-zh-2.34-40.el9_1.1.x86_64       5/18 
  Installing       : make-1:4.3-7.el9.x86_64                        6/18 
  Installing       : glibc-headers-2.34-40.el9_1.1.x86_64           7/18 
  Installing       : kernel-headers-5.14.0-162.18.1.el9_1.x86_64    8/18 
  Installing       : glibc-devel-2.34-40.el9_1.1.x86_64             9/18 
  Installing       : libxcrypt-devel-4.4.18-3.el9.x86_64           10/18 
  Installing       : gcc-11.3.1-2.1.el9.x86_64                     11/18 
  Upgrading        : glibc-all-langpacks-2.34-40.el9_1.1.x86_64    12/18 
  Cleanup          : glibc-all-langpacks-2.34-40.el9.x86_64        13/18 
  Cleanup          : glibc-langpack-en-2.34-40.el9.x86_64          14/18 
  Cleanup          : glibc-gconv-extra-2.34-40.el9.x86_64          15/18 
  Running scriptlet: glibc-gconv-extra-2.34-40.el9.x86_64          15/18 
  Cleanup          : glibc-2.34-40.el9.x86_64                      16/18 
  Cleanup          : glibc-langpack-zh-2.34-40.el9.x86_64          17/18 
  Cleanup          : glibc-common-2.34-40.el9.x86_64               18/18 
  Running scriptlet: glibc-all-langpacks-2.34-40.el9_1.1.x86_64    18/18 
  Running scriptlet: glibc-common-2.34-40.el9.x86_64               18/18 
  Verifying        : make-1:4.3-7.el9.x86_64                        1/18 
  Verifying        : libxcrypt-devel-4.4.18-3.el9.x86_64            2/18 
  Verifying        : kernel-headers-5.14.0-162.18.1.el9_1.x86_64    3/18 
  Verifying        : gcc-11.3.1-2.1.el9.x86_64                      4/18 
  Verifying        : glibc-headers-2.34-40.el9_1.1.x86_64           5/18 
  Verifying        : glibc-devel-2.34-40.el9_1.1.x86_64             6/18 
  Verifying        : glibc-langpack-zh-2.34-40.el9_1.1.x86_64       7/18 
  Verifying        : glibc-langpack-zh-2.34-40.el9.x86_64           8/18 
  Verifying        : glibc-langpack-en-2.34-40.el9_1.1.x86_64       9/18 
  Verifying        : glibc-langpack-en-2.34-40.el9.x86_64          10/18 
  Verifying        : glibc-gconv-extra-2.34-40.el9_1.1.x86_64      11/18 
  Verifying        : glibc-gconv-extra-2.34-40.el9.x86_64          12/18 
  Verifying        : glibc-common-2.34-40.el9_1.1.x86_64           13/18 
  Verifying        : glibc-common-2.34-40.el9.x86_64               14/18 
  Verifying        : glibc-all-langpacks-2.34-40.el9_1.1.x86_64    15/18 
  Verifying        : glibc-all-langpacks-2.34-40.el9.x86_64        16/18 
  Verifying        : glibc-2.34-40.el9_1.1.x86_64                  17/18 
  Verifying        : glibc-2.34-40.el9.x86_64                      18/18 

Upgraded:
  glibc-2.34-40.el9_1.1.x86_64                                           
  glibc-all-langpacks-2.34-40.el9_1.1.x86_64                             
  glibc-common-2.34-40.el9_1.1.x86_64                                    
  glibc-gconv-extra-2.34-40.el9_1.1.x86_64                               
  glibc-langpack-en-2.34-40.el9_1.1.x86_64                               
  glibc-langpack-zh-2.34-40.el9_1.1.x86_64                               
Installed:
  gcc-11.3.1-2.1.el9.x86_64                                              
  glibc-devel-2.34-40.el9_1.1.x86_64                                     
  glibc-headers-2.34-40.el9_1.1.x86_64                                   
  kernel-headers-5.14.0-162.18.1.el9_1.x86_64                            
  libxcrypt-devel-4.4.18-3.el9.x86_64                                    
  make-1:4.3-7.el9.x86_64                                                

Complete!
[user1@localhost wget2-2.0.1]$ 
[user1@localhost wget2-2.0.1]$ ./configure
...(略)
checking for library containing gnutls_global_init... no
configure: WARNING: *** GNUTLS was not found. Fallback to libnettle for hashing and checksumming.
checking for openssl... no
checking for library containing SSL_CTX_new... no
configure: WARNING: *** OpenSSL was not found.
checking for wolfssl... no
checking for library containing wolfSSL_Init... no
configure: WARNING: *** WolfSSL was not found.
configure: error: *** No SSL/TLS library not found.
[user1@localhost wget2-2.0.1]$ 
[user1@localhost wget2-2.0.1]$ sudo yum -y install gnutls openssl wolfssl
[sudo] password for user1: 
Last metadata expiration check: 0:35:44 ago on Fri 24 Mar 2023 10:43:56 AM CST.
Package gnutls-3.7.6-12.el9_0.x86_64 is already installed.
Package openssl-1:3.0.1-43.el9_0.x86_64 is already installed.
No match for argument: wolfssl
Error: Unable to find a match: wolfssl
[user1@localhost wget2-2.0.1]$

[user1@localhost wget2-2.0.1]$ sudo yum -y install gnutls-devel openssl-devel
Last metadata expiration check: 0:36:38 ago on Fri 24 Mar 2023 10:43:56 AM CST.
Dependencies resolved.
============================================================================
 Package             Arch        Version               Repository      Size
============================================================================
Installing:
 gnutls-devel        x86_64      3.7.6-18.el9_1        appstream      2.2 M
 openssl-devel       x86_64      1:3.0.1-47.el9_1      appstream      2.9 M
Upgrading:
 gnutls              x86_64      3.7.6-18.el9_1        baseos         1.0 M
 libtasn1            x86_64      4.16.0-8.el9_1        baseos          73 k
 openssl             x86_64      1:3.0.1-47.el9_1      baseos         1.1 M
 openssl-libs        x86_64      1:3.0.1-47.el9_1      baseos         2.1 M
Installing dependencies:
 gmp-c++             x86_64      1:6.2.0-10.el9        appstream       19 k
 gmp-devel           x86_64      1:6.2.0-10.el9        appstream      174 k
 gnutls-c++          x86_64      3.7.6-18.el9_1        appstream       33 k
 gnutls-dane         x86_64      3.7.6-18.el9_1        appstream       23 k
 libidn2-devel       x86_64      2.3.0-7.el9           appstream       56 k
 libtasn1-devel      x86_64      4.16.0-8.el9_1        appstream      328 k
 libtasn1-tools      x86_64      4.16.0-8.el9_1        appstream       23 k
 nettle-devel        x86_64      3.8-3.el9_0           appstream      661 k
 p11-kit-devel       x86_64      0.24.1-2.el9          appstream       84 k
 unbound-libs        x86_64      1.16.2-2.el9          appstream      547 k

Transaction Summary
============================================================================
Install  12 Packages
Upgrade   4 Packages

Total download size: 11 M
Downloading Packages:
(1/16): unbound-libs-1.16.2-2.el9.x86_64.rp 1.3 MB/s | 547 kB     00:00    
(2/16): libidn2-devel-2.3.0-7.el9.x86_64.rp 138 kB/s |  56 kB     00:00    
(3/16): gnutls-dane-3.7.6-18.el9_1.x86_64.r 212 kB/s |  23 kB     00:00    
(4/16): gnutls-c++-3.7.6-18.el9_1.x86_64.rp 388 kB/s |  33 kB     00:00    
(5/16): gmp-devel-6.2.0-10.el9.x86_64.rpm   1.0 MB/s | 174 kB     00:00    
(6/16): gmp-c++-6.2.0-10.el9.x86_64.rpm     492 kB/s |  19 kB     00:00    
(7/16): libtasn1-tools-4.16.0-8.el9_1.x86_6 327 kB/s |  23 kB     00:00    
(8/16): openssl-devel-3.0.1-47.el9_1.x86_64 2.4 MB/s | 2.9 MB     00:01    
(9/16): libtasn1-devel-4.16.0-8.el9_1.x86_6 664 kB/s | 328 kB     00:00    
(10/16): p11-kit-devel-0.24.1-2.el9.x86_64. 791 kB/s |  84 kB     00:00    
(11/16): nettle-devel-3.8-3.el9_0.x86_64.rp 1.5 MB/s | 661 kB     00:00    
(12/16): gnutls-devel-3.7.6-18.el9_1.x86_64 1.7 MB/s | 2.2 MB     00:01    
(13/16): gnutls-3.7.6-18.el9_1.x86_64.rpm   1.8 MB/s | 1.0 MB     00:00    
(14/16): openssl-3.0.1-47.el9_1.x86_64.rpm  1.8 MB/s | 1.1 MB     00:00    
(15/16): libtasn1-4.16.0-8.el9_1.x86_64.rpm 2.0 MB/s |  73 kB     00:00    
(16/16): openssl-libs-3.0.1-47.el9_1.x86_64 2.1 MB/s | 2.1 MB     00:01    
----------------------------------------------------------------------------
Total                                       2.5 MB/s |  11 MB     00:04     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                    1/1 
  Upgrading        : libtasn1-4.16.0-8.el9_1.x86_64                    1/20 
  Upgrading        : gnutls-3.7.6-18.el9_1.x86_64                      2/20 
  Upgrading        : openssl-libs-1:3.0.1-47.el9_1.x86_64              3/20 
  Running scriptlet: unbound-libs-1.16.2-2.el9.x86_64                  4/20 
  Installing       : unbound-libs-1.16.2-2.el9.x86_64                  4/20 
  Running scriptlet: unbound-libs-1.16.2-2.el9.x86_64                  4/20 
Created symlink /etc/systemd/system/timers.target.wants/unbound-anchor.timer → /usr/lib/systemd/system/unbound-anchor.timer.

  Installing       : gnutls-dane-3.7.6-18.el9_1.x86_64                 5/20 
  Installing       : gnutls-c++-3.7.6-18.el9_1.x86_64                  6/20 
  Installing       : libtasn1-tools-4.16.0-8.el9_1.x86_64              7/20 
  Installing       : libtasn1-devel-4.16.0-8.el9_1.x86_64              8/20 
  Installing       : p11-kit-devel-0.24.1-2.el9.x86_64                 9/20 
  Installing       : gmp-c++-1:6.2.0-10.el9.x86_64                    10/20 
  Installing       : gmp-devel-1:6.2.0-10.el9.x86_64                  11/20 
  Installing       : nettle-devel-3.8-3.el9_0.x86_64                  12/20 
  Installing       : libidn2-devel-2.3.0-7.el9.x86_64                 13/20 
  Installing       : gnutls-devel-3.7.6-18.el9_1.x86_64               14/20 
  Installing       : openssl-devel-1:3.0.1-47.el9_1.x86_64            15/20 
  Upgrading        : openssl-1:3.0.1-47.el9_1.x86_64                  16/20 
  Cleanup          : openssl-1:3.0.1-43.el9_0.x86_64                  17/20 
  Cleanup          : gnutls-3.7.6-12.el9_0.x86_64                     18/20 
  Cleanup          : libtasn1-4.16.0-7.el9.x86_64                     19/20 
  Cleanup          : openssl-libs-1:3.0.1-43.el9_0.x86_64             20/20 
  Running scriptlet: openssl-libs-1:3.0.1-43.el9_0.x86_64             20/20 
  Verifying        : libidn2-devel-2.3.0-7.el9.x86_64                  1/20 
  Verifying        : openssl-devel-1:3.0.1-47.el9_1.x86_64             2/20 
  Verifying        : unbound-libs-1.16.2-2.el9.x86_64                  3/20 
  Verifying        : gnutls-devel-3.7.6-18.el9_1.x86_64                4/20 
  Verifying        : gnutls-dane-3.7.6-18.el9_1.x86_64                 5/20 
  Verifying        : gnutls-c++-3.7.6-18.el9_1.x86_64                  6/20 
  Verifying        : gmp-devel-1:6.2.0-10.el9.x86_64                   7/20 
  Verifying        : gmp-c++-1:6.2.0-10.el9.x86_64                     8/20 
  Verifying        : libtasn1-tools-4.16.0-8.el9_1.x86_64              9/20 
  Verifying        : libtasn1-devel-4.16.0-8.el9_1.x86_64             10/20 
  Verifying        : nettle-devel-3.8-3.el9_0.x86_64                  11/20 
  Verifying        : p11-kit-devel-0.24.1-2.el9.x86_64                12/20 
  Verifying        : openssl-libs-1:3.0.1-47.el9_1.x86_64             13/20 
  Verifying        : openssl-libs-1:3.0.1-43.el9_0.x86_64             14/20 
  Verifying        : openssl-1:3.0.1-47.el9_1.x86_64                  15/20 
  Verifying        : openssl-1:3.0.1-43.el9_0.x86_64                  16/20 
  Verifying        : gnutls-3.7.6-18.el9_1.x86_64                     17/20 
  Verifying        : gnutls-3.7.6-12.el9_0.x86_64                     18/20 
  Verifying        : libtasn1-4.16.0-8.el9_1.x86_64                   19/20 
  Verifying        : libtasn1-4.16.0-7.el9.x86_64                     20/20 

Upgraded:
  gnutls-3.7.6-18.el9_1.x86_64       libtasn1-4.16.0-8.el9_1.x86_64         
  openssl-1:3.0.1-47.el9_1.x86_64    openssl-libs-1:3.0.1-47.el9_1.x86_64   
Installed:
  gmp-c++-1:6.2.0-10.el9.x86_64                                             
  gmp-devel-1:6.2.0-10.el9.x86_64                                           
  gnutls-c++-3.7.6-18.el9_1.x86_64                                          
  gnutls-dane-3.7.6-18.el9_1.x86_64                                         
  gnutls-devel-3.7.6-18.el9_1.x86_64                                        
  libidn2-devel-2.3.0-7.el9.x86_64                                          
  libtasn1-devel-4.16.0-8.el9_1.x86_64                                      
  libtasn1-tools-4.16.0-8.el9_1.x86_64                                      
  nettle-devel-3.8-3.el9_0.x86_64                                           
  openssl-devel-1:3.0.1-47.el9_1.x86_64                                     
  p11-kit-devel-0.24.1-2.el9.x86_64                                         
  unbound-libs-1.16.2-2.el9.x86_64                                          

Complete!
[user1@localhost wget2-2.0.1]$ 
[user1@localhost wget2-2.0.1]$ ./configure
...(略)
config.status: creating po/Makefile configure: Summary of build options: Version: 2.0.1 Host OS: linux-gnu Install prefix: /usr/local Compiler: gcc CFlags: -I/usr/include/p11-kit-1 -DNDEBUG -g -O2 LDFlags: Libs: -lidn2 -lgnutls Library types: shared=yes, static=yes Small libraries: no SSL/TLS support: gnutls GZIP compression: no BZIP2 compression: no LZMA compression: no Brotli compression: no Zstd compression: no Lzip compression: no IDNA support: IDNA 2008 (libidn2) PSL support: no HSTS support: no HTTP/2.0 support: no Documentation: no (neither Doxygen nor Pandoc found) Wget2 docs: Libwget docs: PCRE support: no Tests: Valgrind testing not enabled Assertions: no POSIX xattr: yes Microhttpd support: no (CFLAGS: -I/usr/include/p11-kit-1 -DNDEBUG -g -O2. LIBS: -lidn2 -lgnutls ) Fuzzing build: no, GPGME: no [user1@localhost wget2-2.0.1]$ make
...(略)
CCLD libtest-utils.la make[2]: Leaving directory '/home/user1/wget2-2.0.1/src' Making all in po make[2]: Entering directory '/home/user1/wget2-2.0.1/po' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/user1/wget2-2.0.1/po' Making all in fuzz make[2]: Entering directory '/home/user1/wget2-2.0.1/fuzz' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/user1/wget2-2.0.1/fuzz' Making all in unit-tests make[2]: Entering directory '/home/user1/wget2-2.0.1/unit-tests' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/user1/wget2-2.0.1/unit-tests' make[2]: Entering directory '/home/user1/wget2-2.0.1' make[2]: Leaving directory '/home/user1/wget2-2.0.1' make[1]: Leaving directory '/home/user1/wget2-2.0.1' [user1@localhost wget2-2.0.1]$
[user1@localhost wget2-2.0.1]$ make check
...(略)
============================================================================ Testsuite summary for wget2 2.0.1 ============================================================================ # TOTAL: 5 # PASS: 5 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ make[3]: Leaving directory '/home/user1/wget2-2.0.1/unit-tests' make[2]: Leaving directory '/home/user1/wget2-2.0.1/unit-tests' make[1]: Leaving directory '/home/user1/wget2-2.0.1/unit-tests' make[1]: Entering directory '/home/user1/wget2-2.0.1' make check-local make[2]: Entering directory '/home/user1/wget2-2.0.1' make[2]: Leaving directory '/home/user1/wget2-2.0.1' make[1]: Leaving directory '/home/user1/wget2-2.0.1' GEN public-submodule-commit [user1@localhost wget2-2.0.1]$
[user1@localhost wget2-2.0.1]$ sudo make install
...(略)
[user1@localhost wget2-2.0.1]$

安裝、編譯主要套件

[user1@localhost wget2-2.0.1]$ wget2
Nothing to do - goodbye
[user1@localhost wget2-2.0.1]$ wget2 --version
GNU Wget2 2.0.1 - multithreaded metalink/file/website downloader

+digest +https +ssl/gnutls +ipv6 +iri +large-file +nls -ntlm -opie -psl -hsts
+iconv +idn2 -zlib -lzma -brotlidec -zstd -bzip2 -lzip -http2 -gpgme

Copyright (C) 2012-2015 Tim Ruehsen
Copyright (C) 2015-2021 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Please send bug reports and questions to <bug-wget@gnu.org>.
[user1@localhost wget2-2.0.1]$ wget --help
GNU Wget 1.21.1, a non-interactive network retriever.
Usage: wget [OPTION]... [URL]...

Mandatory arguments to long options are mandatory for short options too.

Startup:
  -V,  --version                   display the version of Wget and exit
  -h,  --help                      print this help
  -b,  --background                go to background after startup
  -e,  --execute=COMMAND           execute a `.wgetrc'-style command

Logging and input file:
  -o,  --output-file=FILE          log messages to FILE
  -a,  --append-output=FILE        append messages to FILE
  -d,  --debug                     print lots of debugging information
  -q,  --quiet                     quiet (no output)
  -v,  --verbose                   be verbose (this is the default)
  -nv, --no-verbose                turn off verboseness, without being quiet
       --report-speed=TYPE         output bandwidth as TYPE.  TYPE can be bits
  -i,  --input-file=FILE           download URLs found in local or external FILE
  -F,  --force-html                treat input file as HTML
  -B,  --base=URL                  resolves HTML input-file links (-i -F)
                                     relative to URL
       --config=FILE               specify config file to use
       --no-config                 do not read any config file
       --rejected-log=FILE         log reasons for URL rejection to FILE

Download:
  -t,  --tries=NUMBER              set number of retries to NUMBER (0 unlimits)
       --retry-connrefused         retry even if connection is refused
       --retry-on-http-error=ERRORS    comma-separated list of HTTP errors to retry
  -O,  --output-document=FILE      write documents to FILE
  -nc, --no-clobber                skip downloads that would download to
                                     existing files (overwriting them)
       --no-netrc                  don't try to obtain credentials from .netrc
  -c,  --continue                  resume getting a partially-downloaded file
       --start-pos=OFFSET          start downloading from zero-based position OFFSET
       --progress=TYPE             select progress gauge type
       --show-progress             display the progress bar in any verbosity mode
  -N,  --timestamping              don't re-retrieve files unless newer than
                                     local
       --no-if-modified-since      don't use conditional if-modified-since get
                                     requests in timestamping mode
       --no-use-server-timestamps  don't set the local file's timestamp by
                                     the one on the server
  -S,  --server-response           print server response
       --spider                    don't download anything
  -T,  --timeout=SECONDS           set all timeout values to SECONDS
       --dns-timeout=SECS          set the DNS lookup timeout to SECS
       --connect-timeout=SECS      set the connect timeout to SECS
       --read-timeout=SECS         set the read timeout to SECS
  -w,  --wait=SECONDS              wait SECONDS between retrievals
                                     (applies if more then 1 URL is to be retrieved)
       --waitretry=SECONDS         wait 1..SECONDS between retries of a retrieval
                                     (applies if more then 1 URL is to be retrieved)
       --random-wait               wait from 0.5*WAIT...1.5*WAIT secs between retrievals
                                     (applies if more then 1 URL is to be retrieved)
       --no-proxy                  explicitly turn off proxy
  -Q,  --quota=NUMBER              set retrieval quota to NUMBER
       --bind-address=ADDRESS      bind to ADDRESS (hostname or IP) on local host
       --limit-rate=RATE           limit download rate to RATE
       --no-dns-cache              disable caching DNS lookups
       --restrict-file-names=OS    restrict chars in file names to ones OS allows
       --ignore-case               ignore case when matching files/directories
  -4,  --inet4-only                connect only to IPv4 addresses
  -6,  --inet6-only                connect only to IPv6 addresses
       --prefer-family=FAMILY      connect first to addresses of specified family,
                                     one of IPv6, IPv4, or none
       --user=USER                 set both ftp and http user to USER
       --password=PASS             set both ftp and http password to PASS
       --ask-password              prompt for passwords
       --use-askpass=COMMAND       specify credential handler for requesting 
                                     username and password.  If no COMMAND is 
                                     specified the WGET_ASKPASS or the SSH_ASKPASS 
                                     environment variable is used.
       --no-iri                    turn off IRI support
       --local-encoding=ENC        use ENC as the local encoding for IRIs
       --remote-encoding=ENC       use ENC as the default remote encoding
       --unlink                    remove file before clobber
       --xattr                     turn on storage of metadata in extended file attributes

Directories:
  -nd, --no-directories            don't create directories
  -x,  --force-directories         force creation of directories
  -nH, --no-host-directories       don't create host directories
       --protocol-directories      use protocol name in directories
  -P,  --directory-prefix=PREFIX   save files to PREFIX/..
       --cut-dirs=NUMBER           ignore NUMBER remote directory components

HTTP options:
       --http-user=USER            set http user to USER
       --http-password=PASS        set http password to PASS
       --no-cache                  disallow server-cached data
       --default-page=NAME         change the default page name (normally
                                     this is 'index.html'.)
  -E,  --adjust-extension          save HTML/CSS documents with proper extensions
       --ignore-length             ignore 'Content-Length' header field
       --header=STRING             insert STRING among the headers
       --compression=TYPE          choose compression, one of auto, gzip and none. (default: none)
       --max-redirect              maximum redirections allowed per page
       --proxy-user=USER           set USER as proxy username
       --proxy-password=PASS       set PASS as proxy password
       --referer=URL               include 'Referer: URL' header in HTTP request
       --save-headers              save the HTTP headers to file
  -U,  --user-agent=AGENT          identify as AGENT instead of Wget/VERSION
       --no-http-keep-alive        disable HTTP keep-alive (persistent connections)
       --no-cookies                don't use cookies
       --load-cookies=FILE         load cookies from FILE before session
       --save-cookies=FILE         save cookies to FILE after session
       --keep-session-cookies      load and save session (non-permanent) cookies
       --post-data=STRING          use the POST method; send STRING as the data
       --post-file=FILE            use the POST method; send contents of FILE
       --method=HTTPMethod         use method "HTTPMethod" in the request
       --body-data=STRING          send STRING as data. --method MUST be set
       --body-file=FILE            send contents of FILE. --method MUST be set
       --content-disposition       honor the Content-Disposition header when
                                     choosing local file names (EXPERIMENTAL)
       --content-on-error          output the received content on server errors
       --auth-no-challenge         send Basic HTTP authentication information
                                     without first waiting for the server's
                                     challenge

HTTPS (SSL/TLS) options:
       --secure-protocol=PR        choose secure protocol, one of auto, SSLv2,
                                     SSLv3, TLSv1, TLSv1_1, TLSv1_2 and PFS
       --https-only                only follow secure HTTPS links
       --no-check-certificate      don't validate the server's certificate
       --certificate=FILE          client certificate file
       --certificate-type=TYPE     client certificate type, PEM or DER
       --private-key=FILE          private key file
       --private-key-type=TYPE     private key type, PEM or DER
       --ca-certificate=FILE       file with the bundle of CAs
       --ca-directory=DIR          directory where hash list of CAs is stored
       --crl-file=FILE             file with bundle of CRLs
       --pinnedpubkey=FILE/HASHES  Public key (PEM/DER) file, or any number
                                   of base64 encoded sha256 hashes preceded by
                                   'sha256//' and separated by ';', to verify
                                   peer against

       --ciphers=STR           Set the priority string (GnuTLS) or cipher list string (OpenSSL) directly.
                                   Use with care. This option overrides --secure-protocol.
                                   The format and syntax of this string depend on the specific SSL/TLS engine.
HSTS options:
       --no-hsts                   disable HSTS
       --hsts-file                 path of HSTS database (will override default)

FTP options:
       --ftp-user=USER             set ftp user to USER
       --ftp-password=PASS         set ftp password to PASS
       --no-remove-listing         don't remove '.listing' files
       --no-glob                   turn off FTP file name globbing
       --no-passive-ftp            disable the "passive" transfer mode
       --preserve-permissions      preserve remote file permissions
       --retr-symlinks             when recursing, get linked-to files (not dir)

FTPS options:
       --ftps-implicit                 use implicit FTPS (default port is 990)
       --ftps-resume-ssl               resume the SSL/TLS session started in the control connection when
                                         opening a data connection
       --ftps-clear-data-connection    cipher the control channel only; all the data will be in plaintext
       --ftps-fallback-to-ftp          fall back to FTP if FTPS is not supported in the target server
WARC options:
       --warc-file=FILENAME        save request/response data to a .warc.gz file
       --warc-header=STRING        insert STRING into the warcinfo record
       --warc-max-size=NUMBER      set maximum size of WARC files to NUMBER
       --warc-cdx                  write CDX index files
       --warc-dedup=FILENAME       do not store records listed in this CDX file
       --no-warc-compression       do not compress WARC files with GZIP
       --no-warc-digests           do not calculate SHA1 digests
       --no-warc-keep-log          do not store the log file in a WARC record
       --warc-tempdir=DIRECTORY    location for temporary files created by the
                                     WARC writer

Recursive download:
  -r,  --recursive                 specify recursive download
  -l,  --level=NUMBER              maximum recursion depth (inf or 0 for infinite)
       --delete-after              delete files locally after downloading them
  -k,  --convert-links             make links in downloaded HTML or CSS point to
                                     local files
       --convert-file-only         convert the file part of the URLs only (usually known as the basename)
       --backups=N                 before writing file X, rotate up to N backup files
  -K,  --backup-converted          before converting file X, back up as X.orig
  -m,  --mirror                    shortcut for -N -r -l inf --no-remove-listing
  -p,  --page-requisites           get all images, etc. needed to display HTML page
       --strict-comments           turn on strict (SGML) handling of HTML comments

Recursive accept/reject:
  -A,  --accept=LIST               comma-separated list of accepted extensions
  -R,  --reject=LIST               comma-separated list of rejected extensions
       --accept-regex=REGEX        regex matching accepted URLs
       --reject-regex=REGEX        regex matching rejected URLs
       --regex-type=TYPE           regex type (posix|pcre)
  -D,  --domains=LIST              comma-separated list of accepted domains
       --exclude-domains=LIST      comma-separated list of rejected domains
       --follow-ftp                follow FTP links from HTML documents
       --follow-tags=LIST          comma-separated list of followed HTML tags
       --ignore-tags=LIST          comma-separated list of ignored HTML tags
  -H,  --span-hosts                go to foreign hosts when recursive
  -L,  --relative                  follow relative links only
  -I,  --include-directories=LIST  list of allowed directories
       --trust-server-names        use the name specified by the redirection
                                     URL's last component
  -X,  --exclude-directories=LIST  list of excluded directories
  -np, --no-parent                 don't ascend to the parent directory

Email bug reports, questions, discussions to <bug-wget@gnu.org>
and/or open issues at https://savannah.gnu.org/bugs/?func=additem&group=wget.
[user1@localhost wget2-2.0.1]$ 

測試

wget --no-check-certificate --mirror -p --convert-links -r https://www.xxx.idv.tw  

實際測試可以下載繁體中文名稱檔案。約 AM 11:32開始,11:45 結束,約13分鐘。傳輸速度 6.73 MB/s。

(完)

相關

[研究]Wget2 v2.0.1網站下載軟體安裝、試用 (Rocky Linux 9.1)

[研究]wget 1.21.1 網站下載軟體安裝、測試 (Rocky Linux 9.1)
https://shaurong.blogspot.com/2023/03/wget-1211-rocky-linux-91.html

[研究]Wget for Windows 1.21.3試用
https://shaurong.blogspot.com/2023/03/wget-for-windows-1213.html


沒有留言:

張貼留言