Linux下通過wget下載Oracle補丁(如11.2.0.2.0)

來源:互聯網
上載者:User

1. 文法:

wget -c --http-user=user --http-password=pwd --output-document=patch.zip "download_url" -o download.log &

各參數含義如下:

-c 表示斷點續傳
--http-user metalink帳號
--http-password metalink密碼
--output-document 下載的檔案名稱
"download_url" (右擊"下載"按鈕後複製的連結地址)
-o 輸出記錄檔名


2. 方法:

在瀏覽器中輸入以下地址:

https://updates.Oracle.com/Orion/PatchDetails/handle_plat_lang_change?plat_lang=267P&patch_file=&file_id=&password_required=&password_required_readme=&merged_trans=&aru=12960454&patch_num=10098816&patch_num_id=1294815&default_release=80112020&default_plat_lang=226P&default_compatible_with=&patch_password=&orderby=&direction=&no_header=0&sortcolpressed=&tab_number=&urlc=v1.2

在此頁面選擇要現在的檔案, 然後右擊"下載"按鈕後, 複製各連結地址備用. 【6688電子商務網站 www.6688.cc  】:



3. 舉例(下載oracle 11.2.0.2.0 for linux x86_64):

先建立下載目錄, 並設定metalink使用者名稱密碼:

$ mkdir -p /u01/software/11g
$ cd /u01/software/11g
$USERNAME=abc@oracle.com
$PASSWORD=jbgsn

然後開始下載此七個檔案(注意下載連結中的matalink使用者名稱已經通過變數$USERNAME替換掉了):

$ wget -c --http-user=$USERNAME --http-password=$PASSWORD \
--output-document=p10098816_112020_Linux-x86-64_1of7.zip \
"https://updates.oracle.com/Orion/Download/process_form/p10098816_112020_Linux-x86-64_1of7.zip?file_id=34840697&aru=13149219&userid=o-$USERNAME&email=$USERNAME&patch_password=&patch_file=p10098816_112020_Linux-x86-64_1of7.zip" \
-o download1.log &

$ wget -c --http-user=$USERNAME --http-password=$PASSWORD \
--output-document=p10098816_112020_Linux-x86-64_2of7.zip \
"https://updates.oracle.com/Orion/Download/process_form/p10098816_112020_Linux-x86-64_2of7.zip?file_id=34840698&aru=13149219&userid=o-$USERNAME&email=$USERNAME&patch_password=&patch_file=p10098816_112020_Linux-x86-64_2of7.zip" \
-o download2.log &

$ wget -c --http-user=$USERNAME --http-password=$PASSWORD \
--output-document=p10098816_112020_Linux-x86-64_3of7.zip \
"https://updates.oracle.com/Orion/Download/process_form/p10098816_112020_Linux-x86-64_3of7.zip?file_id=34840699&aru=13149219&userid=o-$USERNAME&email=$USERNAME&patch_password=&patch_file=p10098816_112020_Linux-x86-64_3of7.zip" \
-o download3.log &

$ wget -c --http-user=$USERNAME --http-password=$PASSWORD \
--output-document=p10098816_112020_Linux-x86-64_4of7.zip \
"https://updates.oracle.com/Orion/Download/process_form/p10098816_112020_Linux-x86-64_4of7.zip?file_id=34840703&aru=13149219&userid=o-$USERNAME&email=$USERNAME&patch_password=&patch_file=p10098816_112020_Linux-x86-64_4of7.zip" \
-o download4.log &

$ wget -c --http-user=$USERNAME --http-password=$PASSWORD \
--output-document=p10098816_112020_Linux-x86-64_5of7.zip \
"https://updates.oracle.com/Orion/Download/process_form/p10098816_112020_Linux-x86-64_5of7.zip?file_id=34840707&aru=13149219&userid=o-$USERNAME&email=$USERNAME&patch_password=&patch_file=p10098816_112020_Linux-x86-64_5of7.zip" \
-o download5.log &

$ wget -c --http-user=$USERNAME --http-password=$PASSWORD \
--output-document=p10098816_112020_Linux-x86-64_6of7.zip \
"https://updates.oracle.com/Orion/Download/process_form/p10098816_112020_Linux-x86-64_6of7.zip?file_id=34840708&aru=13149219&userid=o-$USERNAME&email=$USERNAME&patch_password=&patch_file=p10098816_112020_Linux-x86-64_6of7.zip" \
-o download6.log &

$ wget -c --http-user=$USERNAME --http-password=$PASSWORD \
--output-document=p10098816_112020_Linux-x86-64_7of7.zip \
"https://updates.oracle.com/Orion/Download/process_form/p10098816_112020_Linux-x86-64_7of7.zip?file_id=34840712&aru=13149219&userid=o-$USERNAME&email=$USERNAME&patch_password=&patch_file=p10098816_112020_Linux-x86-64_7of7.zip" \
-o download7.log &

可以查過查看各downloadX.log日誌瞭解下載進度和下載速度.

--End--

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.