This is yet another blog post with tips and tricks to help you (and me) download Oracle software without the help of a Web browser. If you Google “how to download Oracle with wget” you’ll find heaps of posts with useful tips.
I decided to write this post to compile the methods I’m aware of in a single page for future easy reference.
If you have anything to complement this information, please let me know and I’ll update the post with it!
Please note that the methods described below may work for some of the Oracle sites but not others. For each method, I list the sites that are known to work with it. I’ve tested the methods with the following sites:
Works with: OTN, eDelivery and MOS
I came across this method recently while googling for a blog post like this one. Google pointed in the direction of a video by David Ghedini demonstrating a very simple way to download files from Oracle.
This method is very easy to use and the simplest way to download a single file since it doesn’t require exporting and copying cookies to the server. For multiple files, though, method 2 below may be a better option.
Please watch David Ghedini’s video for details on using this method.
It consists of initiating the download using your computer’s browser, pausing the download and copying the download URL, which contains the authentication token in it.
With this URL you can download the file from the remote server using one of the following commands:
download_urlwget "file_name" -OOR
download_url
curl "file_name" -o
Works with: OTN, eDelivery and MOS
This method requires exporting the cookies from you browser to a file and copying that file to the remote server, so that we can use it for the download. The cookies file contains your session’s authentication token as well as the confirmation of the EULA acceptance.
This is a handy method when you have to download multiple files at once.
To use this method it’s necessary to have a tool to export the cookies from the Web browser to a text file. If you don’t already have one, I’d suggest one of the browser extensions below:
After installing the extension(s) above on the browser of your choice, follow the steps below:
./cookies.txtwget --load-cookies=file_url--no-check-certificate "file_name" -OOR
./cookies.txt
curl --location --cookiefile_url--insecure "file_name" -o
Multiple files can be downloaded using the same cookies.txt file. The cookies are valid for 30 minutes and the download must be initiated during that period. After that you’ll have to repeat the process to re-export the cookies.
Works with: MOS
My Oracle Support (MOS) accepts Basic Authentication when downloading files. If you have a valid MOS account you can download files simply by executing the following:
file_urlwget --http-user=araujo@pythian.com --ask-password "file_name" -OOR
file_url
curl --user araujo@pythian.com --cookie-jar cookie-jar.txt --location-trusted "file_name" -o
Regardless of the method you use, it’s good practice to verify the digest of the downloaded files to ensure they are indeed the original files and haven’t been tampered with.
The Oracle download sites always provide digests for the available files in the form of checksums, SHA-1 or MD5 hashes. To verify that the downloaded files are ok, simply execute the corresponding command, as shown in the examples below, and compare the output string with the value shown on the download site:
[araujo@client test]$ cksum p17027533_121010_Linux-x86-64.zip
4109851411 3710976 p17027533_121010_Linux-x86-64.zip
[araujo@client test]$ md5sum p17027533_121010_Linux-x86-64.zip
48a4a957e2d401b324eb89b3f613b8bb p17027533_121010_Linux-x86-64.zip
[araujo@client test]$ sha1sum p17027533_121010_Linux-x86-64.zip
43a70298c09dcd9d59f00498e6659063535fee52 p17027533_121010_Linux-x86-64.zipOracle Database Consulting Services
Ready to optimize your Oracle Database for the future?