How to Download Oracle 11gR2 from command line
Oracle doesn't give direct downloads to the Oracle software. You generally forced to go through a few web pages to login to your Oracle account, then accept a license agreement, then finally get the files. With remote servers you would be forced to download the file locally then push it to the server. Oracle 11 is upwards of 1 GB, so this isn't feasible. Better yet is to download directly to your server. That said, it is really quite simple — just use wget with authentication credentials.
This works as of November 7, 2010. Future changes will break the links and possibly the authentication mechanism, such as with a cookie-based authentication. If you really need to fake the download, do a packet capture of a working download and figure out what authentication/cookies/headers are being exchanged. If you mock those up, you should be set.
Updated January 24, 2010: Commenter pointed out the double-dashes in the command-line arguments were being collapsed to 1, which makes it incorrect. I fixed the HTML to force keeping the — where needed.
Updated July 21, 2011: This doesn't seem to work anymore. It looks like the have added another step which requires some extra authentication tokens. I might redo this sometime, but no guarantees. You can try this, but don't expect it to work. Sorry!
How to use
change the username and password below! Also, make sure wget is actually installed and on your path. For Solaris it isn't, for some damn reason that always drives me nuts.
Explanation of arguments
-c --tries=2 -O filename --user=; --password=
-v |
verbose |
-c |
try to continue if it fails and you restart |
--tries=2 |
retry 2 times if it fails |
-O <filename> |
save to a definite specific filename |
--user=<oracle_login_email@whatever.com> |
Oracle username |
--password=<password> |
Oracle password |
Linux 32-bit:
wget -v -c --tries=2 -O linux.x64_11gR2_database_1of2.zip --user=oracle_login_email@whatever.com --password=oracle_password http://download.oracle.com/otn/linux/oracle11g/R2/linux_11gR2_database_1of2.zip
wget -v -c --tries=2 -O linux.x64_11gR2_database_2of2.zip --user=oracle_login_email@whatever.com --password=oracle_password http://download.oracle.com/otn/linux/oracle11g/R2/linux_11gR2_database_2of2.zip
Linux 64-Bit:
wget -v -c --tries=2 -O linux.x64_11gR2_database_1of2.zip --user=oracle_login_email@whatever.com --password=oracle_password http://download.oracle.com/otn/linux/oracle11g/R2/linux.x64_11gR2_database_1of2.zip
wget -v -c --tries=2 -O linux.x64_11gR2_database_2of2.zip --user=oracle_login_email@whatever.com --password=oracle_password http://download.oracle.com/otn/linux/oracle11g/R2/linux.x64_11gR2_database_2of2.zip
Solaris 64-Bit (x64 Intel):
wget -v -c --tries=2 -O linux.x64_11gR2_database_1of2.zip --user=oracle_login_email@whatever.com --password=oracle_password http://download.oracle.com/otn/solaris/oracle11g/R2/solaris.x64_11gR2_database_1of2.zip
wget -v -c --tries=2 -O linux.x64_11gR2_database_2of2.zip --user=oracle_login_email@whatever.com --password=oracle_password http://download.oracle.com/otn/solaris/oracle11g/R2/solaris.x64_11gR2_database_2of2.zip
Thank you for a tip.
For those who are not familiar with the command line:
the following arguments should be written as "–tries –user, –password" (with precending "double dash")