LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-12-2011, 12:21 PM   #1
Thoco
LQ Newbie
 
Registered: Jun 2011
Location: MA
Distribution: Red Hat, Ubuntu, Open SUSE
Posts: 6

Rep: Reputation: Disabled
Java JDK Silent Install Help


Hello,

I am attempting a java.bin silent install using two files.

The bash script is this:
sh jdk-6u20-linux-x64.bin -i silent -f /<location>/installer.properties 1>console.txt 2>&1
sleep 5 #this may be unnecessary, just testing it
printf "yes"

The properties file is this:
INSTALLER_UI=silent
USER_INSTALL_DIR=/opt/java/

I am able to bypass the license agreement prompts but when viewing the console.txt output, it looks like the install is waiting for a "yes" to be typed in at the console window. Any advice? Thanks!
 
Old 07-12-2011, 12:29 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,390
Blog Entries: 1

Rep: Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101
Is it a possibility for you to just run the Java installer, then zip up the directory it spits out and use that zip as an installer(technically, just unzipping it on another machine)?

Code:
./jdk-1.6.0.bin
tar zxvf jdk-installed.tar.gz jdk-1.6.0
scp jdk-installed.tar.gz somewhere.nice:/
 
Old 07-12-2011, 12:46 PM   #3
Thoco
LQ Newbie
 
Registered: Jun 2011
Location: MA
Distribution: Red Hat, Ubuntu, Open SUSE
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks, I'm unsure if I can tar an existing install and use that tar to drop over or extract to other servers.

I will goto a server that already has java installed, tar it, and then extract it to a server that does not have java installed.

Only problem is, I'm unsure if java.bin extracts/installs files to other directories on the box outside of the target destination folder. If that is the case, it makes this more difficult.
 
Old 07-12-2011, 01:06 PM   #4
Thoco
LQ Newbie
 
Registered: Jun 2011
Location: MA
Distribution: Red Hat, Ubuntu, Open SUSE
Posts: 6

Original Poster
Rep: Reputation: Disabled
If any one else has a response to sending a "yes" and an ENTER to the console, please let me know. Thanks again for any reply's.

The last line in console.txt shows me this: Do you agree to the above license terms? [yes or no]

Last edited by Thoco; 07-12-2011 at 01:38 PM.
 
Old 07-12-2011, 03:55 PM   #5
Thoco
LQ Newbie
 
Registered: Jun 2011
Location: MA
Distribution: Red Hat, Ubuntu, Open SUSE
Posts: 6

Original Poster
Rep: Reputation: Disabled
Since I cannot get the silent install to work, I have an alternate solution below.

My solution was to perform a standard Java JDK install to one server doing the following: sh java.bin
Once Java was completely installed to my folder of choice, I zipped that folder and all subdirectories to a single file.

Using the following command, I can extract Java and also script the environment variables.

unzip /my/location/jdkfiles.zip -d /

(Note I used / as the location because the full path was listed for all files in the zip)

For the environment variables I simply updated /etc/profile as needed.

Thanks for the idea on tar'ing. I ended up with this solution because of it.

Long term though, it would be nice to figure out how to complete a JDK silent install.

Last edited by Thoco; 07-12-2011 at 03:57 PM.
 
Old 07-12-2011, 04:28 PM   #6
sandwormusmc
Member
 
Registered: Nov 2006
Distribution: Fedora 15 x86_64
Posts: 75

Rep: Reputation: 24
Quote:
Originally Posted by Thoco View Post
... Long term though, it would be nice to figure out how to complete a JDK silent install.
We ended up using the tar method to solve this, but there was another way that worked okay on the command line, had minor issues in a script, though ...

Code:
# ./jdk-1.6.0.1234.whatever.bin < answer_file.txt
Code:
# cat answer_file.txt
q
yes
Give that a try, also, if you're curious ...
 
Old 08-04-2011, 05:15 AM   #7
kule
Member
 
Registered: Jun 2004
Distribution: Slackware
Posts: 87

Rep: Reputation: 16
This is what worked for me and you don't need an answers file:

Code:
./jdk-6uXX-linux-XXX.bin >/dev/null < <(echo y) >/dev/null < <(echo y)
 
1 members found this post helpful.
Old 08-04-2011, 01:52 PM   #8
Thoco
LQ Newbie
 
Registered: Jun 2011
Location: MA
Distribution: Red Hat, Ubuntu, Open SUSE
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank you, Kule!
 
Old 07-03-2013, 02:43 AM   #9
rohaanembedded
Member
 
Registered: May 2013
Location: India
Distribution: Ubuntu 11.10
Posts: 178

Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by kule View Post
This is what worked for me and you don't need an answers file:

Code:
./jdk-6uXX-linux-XXX.bin >/dev/null < <(echo y) >/dev/null < <(echo y)

Dear sir,
thanks i found this very helpful

Regards
Rohaan
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install Java jdk and jre in linux BuhRock Linux - Newbie 2 03-27-2011 05:28 PM
how do I install java jdk on slackware rob.rice Slackware 4 12-18-2010 06:00 PM
How to install a very specific subversion of Java (JDK/JRE) rose_bud4201 Linux - Software 2 06-16-2008 10:45 AM
LXer: How To Install Sun Java SE 6 JDK and NetBeans 5.5.1 - Fedora 7 LXer Syndicated Linux News 0 08-22-2007 07:51 PM
How do I install java jdk 1.5 on RHEL? daveb1040 Linux - Software 2 12-23-2006 05:23 AM


All times are GMT -5. The time now is 05:01 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration