Downloading EMCLI via Curl

The Enterprise Manager Command Line Interface or EMCLI enables ease of use and automation for administrators. However, in order to install EMCLI you need to access the EM Console to download the jar file.

A question on twitter about downloading EMCLI via command-line. There may be a couple of ways to accomplish it but the one that came to mind used the same technique as method 2 posted on this blog post by Pythian.

curl --header 'Host: oemcc.example.com' --header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:30.0) Gecko/20100101 Firefox/30.0' --header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' --header 'Accept-Language: en-US,en;q=0.5' --header 'DNT: 1' --header 'Referer: https://oemcc.example.com/em/faces/core-uifwk-console-overview?_afrLoop=1867249808458041&_afrWindowMode=0&_afrWindowId=bb8yoxpcb_1' --header 'Cookie: ORA_SMP_EM_AUTH_68934127863622066490=JtCfT0nY2Dq3LMzT2S1V0YLwx8JVQWF11T12vnJPMP5MjJGjd8Mp!1186256006; _WL_AUTHCOOKIE_ORA_SMP_EM_AUTH_68934127863622066490=6CgVs0LAxX1gSBzFxCLy' --header 'Connection: keep-alive' 'https://oemcc.example.com/em/public_lib_download/emcli/kit/emcliadvancedkit.jar' -o 'emcliadvancedkit.jar' -L

I'm sure there many more ways to do this...just "Google it".
Now only if emcli were supported on Mac OS X...

Comments

Popular posts from this blog

Viewing ASM trace files and alert logs in Unix/Linux

ORA-00020: maximum number of processes (%s) exceeded

Troubleshooting RAC Public Network Failure