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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-12-2011, 11:21 AM
|
#1
|
LQ Newbie
Registered: Jun 2011
Distribution: Red Hat, Ubuntu, Open SUSE
Posts: 6
Rep: 
|
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!
|
|
|
07-12-2011, 11:29 AM
|
#2
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
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:/
|
|
|
07-12-2011, 11:46 AM
|
#3
|
LQ Newbie
Registered: Jun 2011
Distribution: Red Hat, Ubuntu, Open SUSE
Posts: 6
Original Poster
Rep: 
|
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.
|
|
|
07-12-2011, 12:06 PM
|
#4
|
LQ Newbie
Registered: Jun 2011
Distribution: Red Hat, Ubuntu, Open SUSE
Posts: 6
Original Poster
Rep: 
|
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 12:38 PM.
|
|
|
07-12-2011, 02:55 PM
|
#5
|
LQ Newbie
Registered: Jun 2011
Distribution: Red Hat, Ubuntu, Open SUSE
Posts: 6
Original Poster
Rep: 
|
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 02:57 PM.
|
|
|
07-12-2011, 03:28 PM
|
#6
|
Member
Registered: Nov 2006
Distribution: Fedora 15 x86_64
Posts: 76
Rep:
|
Quote:
Originally Posted by Thoco
... 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 ...
|
|
|
08-04-2011, 04:15 AM
|
#7
|
Member
Registered: Jun 2004
Distribution: Slackware
Posts: 87
Rep:
|
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.
|
08-04-2011, 12:52 PM
|
#8
|
LQ Newbie
Registered: Jun 2011
Distribution: Red Hat, Ubuntu, Open SUSE
Posts: 6
Original Poster
Rep: 
|
Thank you, Kule!
|
|
|
07-03-2013, 01:43 AM
|
#9
|
Member
Registered: May 2013
Location: India
Distribution: Ubuntu 11.10
Posts: 178
Rep: 
|
Quote:
Originally Posted by kule
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
|
|
|
All times are GMT -5. The time now is 11:21 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|