The UNIX Forums  



Go Back   The UNIX Forums > Top Forums > Shell Programming and Scripting
Home Forums Register Rules & FAQDonate Members List Search Today's Posts Mark Forums Read

Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

Reply
 
Submit Tools Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 1 Week Ago
Registered User
 
Join Date: May 2008
Posts: 24
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Script to install jdk

Hi,

I need a shell script that would do silent installation of jdk on a linux machine.

Can anyone help me with this?

Thanx
Sundeep Eamani
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 1 Week Ago
Registered User
 
Join Date: Mar 2008
Posts: 10
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
This task is not difficult, you would normally install jdk on linux by doing something like:

./jdk-installer-bin

It'll prompt for you to accept the EULA which just requires "y" along with accepting other defaults.

I would go through the manual process and figure out if you want to use the defaults, come up with an answer file which is just the answer to each question with a newline separating.

Then have a script just do the following:

Code:
#!/bin/sh

./jdk-installer-bin < answer_file
This will provide you with an auto-answer to the installer, I mean you would probably want to check if there's a version that exists/etc. but that's the basic script if you wanted an automated/silent installer.
Reply With Quote
Forum Sponsor
  #3 (permalink)  
Old 1 Week Ago
Registered User
 
Join Date: May 2008
Posts: 24
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Thanks for the reply.

But, I have one more question though,the jdk file I am installing has a 'More' command inside it just before the agreement instructions, that way they are making sure that everyone reads the entire agreement.

is there anyway that i can avoid it. I tried to manipulate the file by removing the "more" command from the script. But ,when I reexecute it would say file has been corrupted.

Is there any other way around?

Thanks in advance.

Sundeep
Reply With Quote
  #4 (permalink)  
Old 1 Week Ago
Registered User
 
Join Date: Mar 2008
Posts: 10
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Last time I checked, it's a general user agreement, once you page down it'll ask if you want to accept. If you pass in "y\n" it should page through that portion. I haven't done an installation lately, but I would suggest looking at passing in some return keys or something that would force the page down.
Reply With Quote
  #5 (permalink)  
Old 4 Days Ago
Registered User
 
Join Date: May 2008
Posts: 24
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
I have tried that too, I have passed in some returns in the answer file, but it is not taking them as input to scroll down, instead it is accepting them at the eula agreement form.

I dont want user to give any kind of input for scrolling down.

Any kind of help would be great

Thanks in advance.

Sundeep
Reply With Quote
  #6 (permalink)  
Old 4 Days Ago
Registered User
 
Join Date: Mar 2008
Posts: 10
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Which JDK are you trying to install, do you have the version you're trying to automate the install? I can try it on my dev box and see what I come up with
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with an install script dhs23 Shell Programming and Scripting 1 02-28-2008 04:01 PM
Failed to install shell script compiler (shc) alfredo HP-UX 0 01-30-2008 09:03 PM
Install a cron from a Perl script garric Shell Programming and Scripting 2 09-13-2007 04:00 AM
Oracle 9i install: Error in invoking target install of makefile chris2005 HP-UX 5 02-21-2007 07:45 AM
Can't install a soft with a script .sh wappyboy UNIX for Dummies Questions & Answers 10 06-27-2006 04:35 AM


web tracker

All times are GMT -5. The time now is 02:29 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
UNIX Forum Content Copyright ©1993-2008 SilkRoad Asia All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93