How to build a silent installer - linux

What are the ways to create a silent installer for a .bin file.
So, currently, I have a installer.bin file that installs the software on a VM (Linux machine) using GUI wizard. This increases the load on the server so, I am looking for different ways to create a silent installer that does not uses GUI, instead uses CLI for inputs/outputs.
Currently to install the application I run the following command:
$ sudo ./installer.bin -f installer.properties -i gui
The file installer.properties is a response file that has input parameters needed by the gui. The gui takes some input parameters like location, where to install the software etc.
There is one methods, I found on the internet.
Method: I found the -silent flag and passing in the response file.
$ sudo ./installer.bin -f installer.properties -i silent
This method doesn't seem to work well and throws the error: "Installer User Interface Mode Not Supported".
I am looking for various technologies or software or method that can be used to do the task above. I have looked at many other questions. I do not know whether this question has been asked before or not.
I wanted to know, is it possible to do so without changing the codebase. If so, how ?

Related

How to install talend in silent mode (unattended mode)?

I have talend installer in my directory and now i want to run talend in silent mode so it do not give me options while running it on command line
my command to execute talend in silent mode :-
./Talend-Installer-20151214_1327-V6.1.1-linux64-installer.run --optionfile silentMode.txt
As soon as i run the above command i get the version and build detail but I cannot find it in the directory that i have given in me key value text file i.e /opt/talend-6.1.1. below is the result i get after executing the command.
"Talend 6.1.1 --- Built on 2015-12-14 18:02:36 IB: 9.5.3-201412111637"
Can anyone help me installing talend in silent mode ?
You are not specifying what components of Talend you are installing in unattended mode. The option file is there for that. So, let's say you would like to install TAC using included H2 DB and a JobServer, your option file (silentMode.txt that you are specifying) would probably look similar to the following:
mode=unattended
enable-components=tac,jobserver,serv
disable-components=logserv,mdm,dsc,cmdline,soa,runtime,svn,tdqp,sap_rfc,studio,esb
prefix=/opt
installStyle=advanced
installType=custom
licenseFile=/talend_packages/license
tacAdminUser=admin#company.com
tacAdminPwd=admin
tacWebAppName=tac611
svnInstall=create
svnUser=svnadmin
svnPass=admin
Please notice, that you have to specify both enable-components and disable-components together. If you don't, it might try to install all components and result in an error (since it misses necessary information from the option file). Don't ask me why ...
In order to get an exhaustive list of options to put in your optionfile, simply take a look at the installer's options:
# ./Talend-Installer-20151214_1327-V6.1.1-linux64-installer.run --help
The same content is available here
Please also notice that it is recommended to install Talend using root (in order to activate RC scripts, etc.), but you can then, manually change Talend Directory owner to another user and slightly modify the RC scripts to run services as that user.
Some more documentation could be read here

ATG installation in silent mode

Is there a way to install ATG commerce platform in silent mode. I need to do this for puppet module for ATG commerce environment setup.
Installation consists of two parts. Running the installers, and then configuring the instances with CIM.
Running the installers involves accepting licensing terms etc., and legally should not be scripted. However, materially, all it does is expand the compressed file into the appropriate executables and module folder structure in, say, /opt/atg/ATG/ATG10.0.3. Run it by your legal team and/or your Oracle contact, but there is nothing technically stopping you from doing this yourself with your own script that copies a pre-canned folder structure from one place to another.
CIM does support silent running by running a script that you have recorded previously. See the -record command line parameter. Note that the recorded script will only run in an situation identical (or very similar) to when it was recorded. The options CIM presents (and the sequence they are presented in) change depending on which modules and products are installed (in step 1), and their paths.
First time you will need to do the installation manually to generate the response file:
./OCPlatform11.3.2_21REL.bin -r /path/to/ocplatform.rsp
Then, you can use the next command to run the silent installation using the response file:
./OCPlatform11.3.2_21REL.bin -f /path/to/ocplatform.rsp -i silent
Reference:
Usage: OCPlatform11.3.2_21REL [-f <path_to_installer_properties_file> | -options]
(to execute the installer)
where options include:
-?
show this help text
-i [swing | console | silent]
specify the user interface mode for the installer
-D<name>=<value>
specify installer properties
-r <path_to_generate_response_file>
Generates response file.

Installing SoapUI on Amazon AMI Linux command line

I need to install and run SoapUI on linux OS (Amazon AMI linux).
This is a command line version (no GUI)
I was able to successfully download and unzip SoapUI tar using the below commands
Download SoapUI installation files
wget http://freefr.dl.sourceforge.net/project/soapui/soapui/5.0.0/SoapUI-5.0.0-linux-bin.tar.gz
Extract Contents
tar -xzf SoapUI-5.0.0-linux-bin.tar.gz -C /opt/
Install SoapUI
cd /opt/SoapUI-5.0.0/bin/
After this when i run the following command:
./soapui.sh
I get below exception
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
at java.awt.Window.<init>(Window.java:535)
at java.awt.Frame.<init>(Frame.java:420)
at javax.swing.JFrame.<init>(JFrame.java:218)
at com.eviware.soapui.SoapUI.startSoapUI(SoapUI.java:842)
at com.eviware.soapui.SoapUI$SoapUIRunner.run(SoapUI.java:697)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.r...(EventDispatchThread.java:91)
Is there something missing here or any other commands needs to be called ?
SoapUI itself is a graphical tool, and the main application isn't going to like running without a graphics display.
When I've run the SoapUI stuff on a Linux server without X11, it's been the mock service facility that I'm after - I use it to provide substitute SOAP or REST services for automated testing etc.
The mock service runner runs well without an X11 server - you just have to tell java not to look for a graphical user interface.
So you add -Djava.awt.headless=true to the command line:
./mockservicerunner.sh -Djava.awt.headless=true
If you just to that it will give you a 'help' output, because this tool is designed to use an existing SoapUI project file to provide preconfigured responses, rather than for interactive use.
The alternative is to use X-Forwarding, so SoapUI runs on your server, but the UI is displayed on your local workstation. I've never done that (because, as I said, I'm after the standalone interaction for automated testing), but this page has some detail: http://blog.ashwani.co.in/blog/2013-01-10/soapui-mockservicerunner-on-linux-without-x-config/
(it also mentions the 'headless' option for mockservicerunner.sh.
This page has some detail about setting up a project in SoapUI first before using it for one of the automated tools (loadrunner in this case): http://www.soapui.org/load-testing/command-line-execution.html
I just installed and executed SoapUI in AWS (Red Hat) without using any graphical interface:
1.- Download SoapUI directly from soapui.org; search for the latest Linux version, copy the link address and download the software into any Linux directory using the wget command. This should have downloaded an installation script file (for example, SoapUI-x64--5.3.0.sh).
2.- Execute the previous installation script from command line and answer the installation prompts. Once you have finished go to the directory where you elected to install it and verify that you have all the folders and files (bin, lib, etc.).
3.- To run SoapUI from the command prompt, go to your SoapUI home directory and execute an instruction like this:
sh bin/testrunner.sh -s"Your Suite Name" -c"Your Test Case Name" -f/your/output/path/ /your/project/path/your-soapui-project.xml

Can Linux Bash scripts respond to install options

I need to script the installation of a number of products on Redhat Linux
I am installing from previously downloaded tar files that each contain their own specific install.sh.
My problem is that by executing the install.sh scripts a number of questions are asked such as ...
a). Accept license
b). set default path(s)
c). do i wish to start service
etc...
Can Bash detect these questions and respond correctly? or do i require another linux based product/function?
For windows based installs i have used AutoItScript.
What are my options on Linux Redhat?
To establish whether the scripts support any command line options, you can:
Read the readme file of the software, if there is one. This should explain any options.
Read the top of the install.sh script. Usually options are at least listed there.
Read the code itself, which might be a lot of work.
Once you have established that the scripts do not support options, the standard way of automating this would be with an expect script. See for example automating install.sh script using an expect script.
Depending on how the install script works, you may be able to send it commands on standard input. For example, if you press Tab once, then Enter, then y and lastly Enter again, you can try the following:
printf %s $'\t\ny\n' | ./install.sh

What is the best way to install a .bin file using default installer options?

I'm working on a small shell script to set up my development environment (eclipse + java + a bunch of other stuff) on linux. Installing .bin files is among them - these launch a GUI installer where user input is necessary - how do I simply use the default installer options and force the installation to complete?
You can try running them from a terminal passing the '-h', '--help' or '--usage' arguments to see if they handle it (and provide the listing of commands you can give it), but if it wasn't designed to receive any parameters there won't be much you can do for it.

Resources