SlideShare una empresa de Scribd logo
1 de 9
Descargar para leer sin conexión
Shell vs. Java: Overcoming the
W H I T E PA P E R




                     Challenges of Shell Scripting for
                     UNIX Installations
Shell vs. Java: Overcoming the Challenges
    of Shell Scripting for UNIX Installations
    Introduction                                                       Web servers, shell-based installations are rarely a viable
    A shell is a command-line interpreter that takes and executes      delivery option. This delivery mechanism becomes more
    commands, and in doing so, implements a programming                difficult when you reanalyze how the tar archive is built. The
    language commonly referred to as “shell scripting.” Shell          configuration management team has to produce a directory
    scripting is traditionally used by UNIX system administrators      structure that will mimic the final destination.
    to automate the execution of system tasks, but developers
    also use shell scripts to create enterprise-level software         In addition, it is well known that tar-ball installations are
    installations, and that is where problems occur.                   not user-friendly to regular users. This is due to the absence
                                                                       of visually guided installations, as is the accepted standard
    This white paper highlights the major difficulties with            for Windows applications. As a result, they often introduce
    attempting to develop UNIX installations using shell scripts.      barriers to user adoption of applications, and may even
    It focuses on shell scripting as a language and how it is          cause problems with the installation and maintenance of
    used in the context of UNIX installation development. It also      the applications.
    discusses how Java is being used as a successful alternative
    to shell scripting for enterprise installations.                   UNIX Installations: The Way They Ought to Be
                                                                       Installations, regardless of the targeted operating system,
    Finally, this white paper details how the tools in                 should be easier to implement. The “tar-ball” file archive
    InstallAnywhere®, the multi-platform installation tool from        structure should not be decided upon by the build system.
    Flexera Software, can help developers overcome the                 This should be loosely packaged so that the installation can
    inherent problems with shell scripting and create high-            make the final decision on how the final file structure
    quality multi-platform installations ideal for enterprise          should look.
    environments.
                                                                       The installation technology used should be based on a more
    UNIX Installations: The Tar-Ball Archive                           robust language with built-in parsing capabilities for XML,
    Most UNIX shell-based installations are constructed using          Java properties files, and so on. Finally, the installation
    a “tar-ball” (tar archive) paradigm. A tar file is delivered       should give the user the option of running the installation
    whose contents include a shell script and the files to be          in a graphical mode.
    installed. For the most part the files are stored in a structure
    mimicking that of their final destination. This potentially        Ultimately, customers and installation developers want
    means that a single copy (cp) command is invoked to copy           the same thing, a robust installation system. However,
    the entire directory to the home directory. All necessary          their perspective is different. The customer cares about
    configurations are done with the help of commands such             the final product, whereas the developer cares about
    as “sed”, “awk”, and so on. The user interface provided is         the development environment needed to produce UNIX
    console only.                                                      installations. The following lists are a subset of requirements
                                                                       as demanded by customers and installation developers.
    By and large, the above scenario is acceptable for simple
    applications. However, it becomes very hard to follow when         For customers:
    even the most straightforward enterprise installations are           • Ease of use – Most customers want an easy way to
    attempted. If the installation you are attempting to construct          interact with an installation, preferably one that is
    is required to configure application servers, databases, or             visually guided, such as those offered by Windows.


2                                                                                Flexera Software: InstallAnywhere White Paper Series
Shell vs. Java: Overcoming t he Challenges of Shell Script ing for UNIX Installat ions




  • Single point of initiation – An end user attempting            installation and received the same error. Only this time the
    to invoke your installation should not be confronted           error occurs at line 4559. Debugging is not available unless
    by a plethora of installation options. A single native         you type:
    launcher should suffice.
  • Native look and feel – It is important that users receive          % sh -x install.sh
    an installation that looks and feels like any other
    application targeted for that particular operating             The above does not yield results that someone with limited
    system.                                                        shell-scripting knowledge can understand.
  • Get the product installed – The ultimate goal of
    the installation is to get the product installed and           The problem is worsened when the script contains a
    configured.                                                    statement similar to myvar=`cat $1`. If $1 is not initialized,
                                                                   the script will be stuck. Of course, a diligent programmer
For installation developers:                                       doesn’t allow this to happen, but if it does happen,
                                                                   debugging can be a nightmare.
  • Single point of development – A true cross-platform
    development platform that would allow the developer            Other issues with the script come to light when you consider
    to maintain a single code base for numerous platforms.         the problems associated with localization and permissions
  • The development environment should use a familiar              (“To install, you need admin rightsn”), and dealing with a
    language, preferably object oriented – To allow                nonstandard logging (to install.log) mechanism.
    extensibility, the installation development tool should
    enable the developer to extend it.                             The point of this exercise was to show how difficult it can be
  • Operating system abstraction – When developing                 to develop elaborate enterprise installations using shell.
    cross-platform installations, the developer should focus
    on product installation and configuration tasks and not        Interoperability
    how each operating system works.                               Even though shell was never intended for large
                                                                   development, shell scripting is sometimes used to create
Analyzing the Shell Scripting Environment                          large installation projects, such as enterprise installations.
The concept of shell scripting was introduced to help              These installations need to directly communicate
system administrators automate low-level shell commands.           configuration settings to the product being installed. For
For a long time most companies have used shell scripts as          shell-based installations, this is done using input files or the
delivery mechanisms (that is, installations), which, for the       command line. Error handling, for the most part, is done
most part, worked well. Since shell scripts are delivered          using return codes.
in clear, readable ASCII, they can potentially expose
implementations that can pose as security holes.                   Unfortunately, return codes are not always reliable.
                                                                   Sometimes a command may return 0 when in fact it should
Unfortunately, that is not the only weakness shell scripting       return anything but 0. Extra steps need to be taken to ensure
exposes. The following sections highlight why shell scripting      reliability, which can turn into unnecessary complex if-
does not scale when enterprises attempt to use it as an            statements that make interoperability all the more difficult.
installation development platform.
                                                                   Sharing Code
The Development Environment                                        When developing large-scale enterprise installations, you
Shell is littered with hard-to-understand regular expressions      can expect more than one developer to work on the same
and lacks a true integrated development environment (IDE).         code. Your plan, of course, is to develop reusable libraries
It often takes a truly senior UNIX developers to properly          that can be used across the installation system. However,
handle such complex scripting environments. Consider the           shell was not designed with that in mind. Shell is for the
following syntax:                                                  most part used to automate administration tasks such as
                                                                   “empty the temp space” or “manage users.” It was designed
  CURRENT_USER=`whoami | awk ‘{print $1}’`                         to deal with low-level tasks, not code sharing.
  if [ “$CURRENTUSER” != “root” ] && [ “$CURRENT_USER”
  != “admin” ]; then printf “To install, you need admin            Portability
  rightsn” | tee -a                                               Not all UNIX environments are created equal. Some
  install.log fi                                                   commands work in every UNIX environment; some do
                                                                   not. Sometimes commands such as “pidof” do not exist in
If you take a closer look, you will notice how awkward the         environments other than Linux. Furthermore, some utilities
if-statement really is. If you play with the white-spacing in      do not share the same command-line arguments across all
the if-statement, you may receive an error similar to this one:    UNIX implementations. Besides, would you like to learn all
                                                                   the command-line options offered by UNIX commands such
  ./install.sh: line 2: [CURRENT_USER: command not found]          as “ls”? To account for portability, a great deal of code must
                                                                   be written.
Although this may not seem like a big problem, imagine
what would happen if someone in the field ran your

Flexera Software: InstallAnywhere White Paper Series                                                                                               3
Shell vs. Java: Overcoming t he Challenges of Shell Script ing for UNIX Installat ions




    Parsing Ability
    Shell was written long before SGML technologies such as                            public String getInstallStatusMessage( ) { return
    XML were available. Therefore, its abilities for parsing such                      “Computing time stamp...”; }
    formats are based on regular expressions. For the most part,
    regular expressions are hard to write and even harder to                           public void uninstall(UninstallerProxy up) { /* do nothing
    debug. To consider writing regular expressions for parsing                         on uninstall */ }
    XML would put you in the business of building XML parsers                          public String getUninstallStatusMessage( ) { return “...”; }
    from scratch. Modern languages such as Java and C++                                }
    have XML parsers built-in.
                                                                                    First and foremost, the above code is standard Java code.
    Parsing becomes more of a problem when unknown formats                          In addition to being able to use standard Java functionality,
    are met. New regular expressions must be built, or you                          Java code can use JNI to call in to native code. The
    could write a native executable using C/C++ to do the job.                      interesting thing about JNI is the fact that as far as the
    Once again, interoperability becomes questionable.                              Java developer is concerned, the JNI call is just another
                                                                                    Java call.
    The Linux Factor
    With the introduction of Linux, a large number of non-                          Worth noticing is also the exception handling offered by
    UNIX users entered the UNIX arena. From a strategic                             Java. Logging is another powerful Java feature. To facilitate
    point of view, it gives a large number of users the chance                      readability, logging information can be categorized by
    to diversify. On the other hand, most of these new users                        severity and the output can be formatted as XML, which in
    come from GUI-driven operating systems, and they want                           turn can be transformed into HTML so that customers can
    everything be done with graphical tools. But shell-based                        view install logs in a readable format.
    installations are made to be console-driven – no
    graphical interface.                                                            Java has emerged as a very popular technology, and for
                                                                                    good reasons. Most educators have embraced Java as
    Mac OS X                                                                        their teaching language of choice, creating a large pool
    Mac OS X is further proof that UNIX is becoming more                            of Java developers. The attractiveness of Java as a “write
    accepted as a graphical operating system. Besides making                        once, run everywhere” language has certainly been another
    Mac OS X the most optimized UNIX environment to run                             contributing factor to its popularity.
    Java, Apple has made Java an integral part of Mac OS X,
    which is good news if your strategy is to create Java-based                     Another strong supporting argument for Java-based
    installations. But shell-based installations must once again                    installations is that numerous companies deploy application
    take a back seat.                                                               servers such as IBM® WebSphere®, BEA® WebLogic®,
                                                                                    Sun® Java Enterprise System, or JBoss. For scalability and
    Java-Based Installations                                                        reliability purposes, these are mostly deployed on the UNIX
    If not shell scripting, what then is a feasible alternative                     platform and are Java-based.
    technology for developing cross-platform installations?
    What about Java? Its “write once, run everywhere” makes                         Most application servers expose Java configuration APIs.
    it an ideal technology for targeting platforms such as UNIX.                    This allows for a seamless integration strategy that can
    Java transforms the installation development into a more                        ultimately give users an out-of-the-box delivery solution. The
    robust environment.                                                             interesting point here is that “write once, run everywhere”
                                                                                    becomes an attainable reality.
    To appreciate the power of Java to extend an installation,
    consider an example. The following is a simple Java class                       As an alternative to shell scripting, however, Java requires
    that computes a time stamp and stores the result in a custom                    additional help before it can be considered as a logical
    InstallAnywhere variable.                                                       successor. A reliable, user-friendly Windows-like setup
                                                                                    experience would be a great thing to have for UNIX
       import com.zerog.ia.api.pub.*;                                               developers. The ability to target UNIX and Windows
       import java.util.*;                                                          platforms with a Java-based application install would be
                                                                                    even better, especially given how difficult it is to accomplish
       public class GenerateTimeStamp extends                                       this with shell scripting.
       CustomCodeAction
       {                                                                            For the developer with lots of experience with tar-balls and
              public void install(InstallerProxy ip)                                cryptic script commands, any alternative needs to offer
              {                                                                     clear and compelling benefits. The balance of this paper
                  // compute time stamp with Java...                                will offer just such an argument, based on the capabilities
                  String now = new Date( ).toString( );                             of InstallAnywhere from Flexera Software.
                  // ...and set a custom variable to the value
                  ip.setVariable(“$NOW$”, now);
              }


4                                                                                             Flexera Software: InstallAnywhere White Paper Series
Shell vs. Java: Overcoming t he Challenges of Shell Script ing for UNIX Installat ions




Building Multi-Platform Installations with                        graphical interface, which allows developers to manage
InstallAnywhere                                                   all aspects of their installer project. All the features of
InstallAnywhere from Flexera Software provides an out-of-         InstallAnywhere are available in this easy to use integrated
the-box Java-based installation solution. Developing cross-       development environment.
platform installations with Java and InstallAnywhere’s multi-
platform installation IDE provides many benefits, including       Advanced Designer Tasks
making it easy to:                                                The Advanced Designer is divided into tasks that are
                                                                  represented by tabs found along the left-hand side of the
  • Tightly integrate installation development into the           window. Each of the following tabs represents tasks and
    development department                                        settings specific to each installation project:
  • Conceal code so that proprietary implementations are
    kept safe                                                        • Project: Settings related to your specific project.
  • Create installations that can be extended and                      These include general settings, file settings, and
    developed using Java technologies                                  localization settings.
                                                                     • Installer UI: Set the look and feel for the installer by
   Learn More about InstallAnywhere                                    adding background images, billboards, and other
   If you wish to learn more about the capabilities of                 graphical components.
   InstallAnywhere, please visit the Flexera Software Web            • Organization: Manages Install Sets, Features,
   site at www.flexerasoftware.com/installanywhere.                    Components, and Merge Modules.
                                                                     • Pre-Install: An ordered sequence of panels and
                                                                       actions that occur before file installation.
With InstallAnywhere, developers can build installers for all        • Install: Manage File installation tree and install
supported platforms from a single project. InstallAnywhere’s           time actions.
capabilities (highlighted below) make it the ideal tool for          • Post-Install: An ordered sequence of panels and actions
quickly developing industrial-strength installers.                     that occur after file installation.
                                                                     • Pre-Uninstall: An ordered sequence of panels and
Rapid Prototyping with the Project Wizard                              actions that occur before file uninstallation.
Developers can build their first installer in less than five         • Post-Uninstall: An ordered sequence of panels and
minutes with InstallAnywhere’s six-step Project Wizard. This           actions that occur after file uninstallation.
intuitive design tool also sets the class path and finds the         • Build: Manage build settings, including bundling of a
main class for a Java application automatically. When you              Java Virtual Machine.
complete the Project Wizard steps, the result is an installer
project that targets a number of major operating systems.         Each Advanced Designer task contains sub-tabs that offer
                                                                  greater fine-tuning of InstallAnywhere’s features.
This working prototype is inline with management demands
that prototypes be produced early in the development
process. The development process demands that the
installation be integrated early so that testing can be
performed in a more realistic environment.




                                                                  Action-Based Installers
                                                                  Actions, which represent the operations the installer
                                                                  performs, are the fundamental elements of InstallAnywhere
                                                                  installers. InstallAnywhere supports an extensible action
                                                                  architecture that provides the ability to perform additional
                                                                  operations during installation, such as installing files
                                                                  and folders, creating shortcuts, executing custom code,
                                                                  or extracting the contents of a compressed file. Some
This, for the most part, means that the installation should       frequently used actions include Install File, Create Folder,
have the capability to run in graphical mode and have a           Create Alias, Link, Shortcut, Execute Target File, Execute
consistent look and feel regardless of the operating system.      Command, and Expand Archive.
InstallAnywhere contains many tools that make rapid
prototyping a reality.

Customizing Projects in the Advanced Designer
The InstallAnywhere Advanced Designer has an intuitive,

Flexera Software: InstallAnywhere White Paper Series                                                                                              5
Shell vs. Java: Overcoming t he Challenges of Shell Script ing for UNIX Installat ions




    Components, Features, and Install Sets
    Components, features, and install sets are organizational
    concepts in the InstallAnywhere IDE. They allow installer
    developers to add structure to the files and actions their
    installers employ and determine what feature choices end
    users have during the install.

    Components are an organization unit installer developers                        Build and Try
    can use to group files and actions; however, components                         InstallAnywhere users can quickly examine the results of
    are internal organization units that are never shown to the                     their project changes by building installers from the project
    end user. Conversely, features can group one or more                            and running the resulting installer with the click of a button.
    components, files, and actions into combinations from                           In addition, InstallAnywhere includes several built in features
    which the installer end users can choose. And groups of                         for previewing and debugging your installers and installer
    features can be combined into install sets—a convention                         panels.
    that allows end users to choose options like Minimal,
    Typical, or Full Install.

    While developers working with relatively simple installers
    can rely on InstallAnywhere to generate basic components,
    features, and install sets automatically, more advanced
    developers take control of components, features, and install
    sets to organize their installer resources in the                               Get User Input Panels
    Advanced Designer.                                                              InstallAnywhere provides many panels for displaying
                                                                                    information to the user and collecting user information.
                                                                                    Moreover, InstallAnywhere includes the Get User Input -
                                                                                    Simple and Get User Input - Advanced panel actions. These
                                                                                    actions enable you to build custom panels by inserting text-
                                                                                    display and user-input controls into the Get User Input panel.

                                                                                    InstallAnywhere provides the architecture to capture the
                                                                                    user input from these panels to InstallAnywhere variables.
                                                                                    For requirements that exceed the Get User Input panel’s
                                                                                    features, you can code custom panels that share the
                                                                                    dimensions, images, navigation buttons, and other elements
                                                                                    used by built-in panels.




    Rules and Variables
    InstallAnywhere keeps track of dynamic values using
    variables. Almost every dynamic value in InstallAnywhere is
    represented by an InstallAnywhere variable. Variables may
    be modified or accessed in order to affect the design or
    output of an installer; they can also be modified during the
    progress of the installer in order to change the
    installer’s behavior.

    InstallAnywhere uses variable-based Boolean rules to control
    most aspects of installer behavior. Rules can be applied
    to any action within the InstallAnywhere installer, as well
    as to organizational units such as Install Sets, Features,                      LaunchAnywhere Launchers
    and Components. Rules commonly direct the execution                             Create launchers that look and behave like the operating
    of platform-specific actions on the target system, but they                     system your installation is running on. Your end users are
    may check other conditions such as system architecture, file                    accustomed to a particular behavior. Windows users are
    and folder attributes, and user-chosen language. Rules can                      quite familiar with the ubiquitous installer.exe concept.
    also be used to compare the values of two InstallAnywhere                       InstallAnywhere LaunchAnywhere launchers extend that
    variables, match a regular expression, or to execute a                          philosophy to all of its supported platforms.
    custom coded rule. (InstallAnywhere Enterprise edition also
    includes rules specific to System i (i5/OS).)


6                                                                                             Flexera Software: InstallAnywhere White Paper Series
Shell vs. Java: Overcoming t he Challenges of Shell Script ing for UNIX Installat ions




A LaunchAnywhere launcher is a unique executable                        custom panels, custom consoles, and custom rules that
that launches a Java application on Windows, UNIX                       interact with and extend InstallAnywhere functionality.
(including Solaris, Linux, HP-UX, AIX, BSD, and others),
and Mac OS X platforms. On Windows, LaunchAnywhere                Custom Dialog Boxes
technology creates double-clickable icons that invoke a           InstallAnywhere provides many built-in dialog boxes for
Java application. For Mac OS X, it generates application          displaying information to the user and collecting user
bundles. On UNIX platforms, end users type a simple               information. Moreover, InstallAnywhere’s Get User Input
command to launch the application.                                panels enable you to build up custom dialog boxes by
                                                                  inserting text-display and user-input components into a
LaunchAnywhere technology sets the classpath, redirects           standard dialog box frame. For more sophisticated user-
stdout and stderr, passes in system properties and command-       interface requirements, you can create custom panels that
line parameters, and performs other configuration functions.      share the dimensions, images, navigation buttons, and
For graphical users a Web-based applet installation is also       other elements used by built-in panels.
available. This further simplifies the distribution model of
your product.                                                     Shell Revisited
                                                                  As mentioned earlier, shell scripting was intended for system
                                                                  administration. To that end, some scripts are worth keeping.
                                                                  InstallAnywhere facilitates launching existing shell scripts
                                                                  (even the ones that take command line arguments). Since
                                                                  most shell scripts are processed through /bin/sh (the first
                                                                  line in a shell script, the shebang—i.e., #!/bin/sh—tells you
                                                                  who is going to process the script), shell scripts can also be
                                                                  launched through Runtime.exec. This command returns a
                                                                  Process object, which in turn can return the exit value from
                                                                  the sh process.

                                                                  Powered by Java
                                                                  InstallAnywhere is powered by Java. Java is a full-fledged,
                                                                  object-oriented language. Its cross-platform capabilities
                                                                  make it the perfect engine for InstallAnywhere.
Customizing and Extending InstallAnywhere
Advanced installer developers or development teams that           Besides the common tasks supplied by InstallAnywhere, you
need to build complex installers can take advantage of a          might want to add custom tasks that do not fit the ordinary.
host of enterprise-strength features:                             Since InstallAnywhere is powered by Java, you can extend
                                                                  its functionality in a number of ways.
  • Merge Modules: Essentially installer sub-projects that
    can be created independently of one another and                  • Create your own custom Java plug-ins: InstallAnywhere
    later merged together, merge module are reusable                   enables you to create custom actions written in Java.
    collections of installation functionality. A Merge                 You can refer to your custom code in a single project,
    Module is just like an installer, complete with features,          or package it as an InstallAnywhere plug-in that can be
    components, panels, actions, and files. However, a                 used in multiple projects.
    Merge Module cannot be installed without being part              • Use InstallAnywhere services: In addition to being able
    of an InstallAnywhere project; instead, use Merge                  to call Java code from your custom code actions, you
    Modules to include the functionality of one installer              can call methods from InstallAnywhere services. These
    within another installer.                                          services extend Java functionality with underlying
  • Support for Deployment to Application Servers and                  native code. Example services are the System Utility
    Database Servers: InstallAnywhere supports installers              Service, for working with environment variables
    that target application servers (such as Geronimo,                 and system startup commands; the Security Service,
    JBoss, Resin, Sun Application Server, Tomcat,                      for working with users and groups; and the Win32
    WebLogic, and WebSphere) and database servers                      and Win32 Registry Services, for programmatically
    (such as MySQL, Oracle, MS SQL Server, and DB2).                   manipulating Windows services and the Windows
  • Team Development Features: InstallAnywhere supports                registry.
    team-based installer development with source paths.              • Java Native Interface (JNI): Although Java is a powerful
    Source paths allow developers to reference file                    language, some operating system APIs have not been
    resources using variable paths instead of absolute                 mapped into the core language. JNI is intended to
    paths. This allows team members to share a project file            breach that gap. If necessary, you can implement
    even when file resources are located at different paths            custom functionality in a native library (a Windows
    on their development systems.                                      DLL or UNIX shared library, for example) and call the
  • Custom Code: With InstallAnywhere’s API, developers                native code from an InstallAnywhere custom code
    can write custom Java code that runs in the same                   action.
    Java VM as InstallAnywhere, creating custom actions,

Flexera Software: InstallAnywhere White Paper Series                                                                                              7
Shell vs. Java: Overcoming t he Challenges of Shell Script ing for UNIX Installat ions




    Custom code development in Java is enhanced further when
    you consider the following:

       • XML parsing: Java provides out-of-the-box XML parsing
         through standard parsing technologies such as DOM
         or SAX.
       • Use any Java IDE: When writing InstallAnywhere
         custom code, you can use your own Java IDE.
       • Unit testing with JUnit: JUnit is a popular regression-
         testing framework, and InstallAnywhere provides
         classes for integrating with JUnit.
       • Coding standards: Create or extend existing common
         coding standards to accommodate the development of
         InstallAnywhere custom code.

    Summary
    Though shell scripting is being criticized for its installation
    development capabilities, this white paper considers
    shell scripting a sound technology for UNIX system
    administration. But for software development, shell scripts
    lack the robustness needed to create platform independent
    installations. Java as a technology has matured to the point
    that creating Java-based installations has become the
    preferred method. Furthermore, technologies such as JDBC,
    CORBA, JNDI, and RMI, make Java-based installations the
    better candidate for targeting platforms such as UNIX.

        Begin a Free Evaluation of InstallAnywhere
        You can download a free trial version of
        InstallAnywhere from the Flexera Software Web site
        at: www.flexerasoftware.com/installanywhere/eval.

        Want to learn more best practices for building quality
        installations? Join an InstallAnywhere training class – visit
        www.flexerasoftware.com/training for available classes.




8                                                                                            Flexera Software: InstallAnywhere White Paper Series
Flexera Software LLC                      Schaumburg                                United Kingdom (Europe,                   Japan (Asia,                              For more office locations visit:
1000 East Woodfield Road,                 (Global Headquarters):                    Middle East Headquarters):                Pacific Headquarters):                    www.flexerasoftware.com
Suite 400                                 +1 800-809-5659                           +44 870-871-1111                          +81 3-4360-8291
Schaumburg, IL 60173 USA                                                            +44 870-873-6300

Copyright © 2011 Flexera Software LLC. All other brand and product names mentioned herein may be the trademarks and registered trademarks of their respective owners.
                                                                                                                                                                                       IA_WP_Shell_Oct11

Más contenido relacionado

La actualidad más candente

開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)
My own sweet home!
 
Managing Your Runtime With P2
Managing Your Runtime With P2Managing Your Runtime With P2
Managing Your Runtime With P2
Pascal Rapicault
 
Pankaj_Kapila
Pankaj_Kapila Pankaj_Kapila
Pankaj_Kapila
Panapka
 
OSSA17 - Mixed License FOSS Projects
OSSA17 - Mixed License FOSS ProjectsOSSA17 - Mixed License FOSS Projects
OSSA17 - Mixed License FOSS Projects
The Linux Foundation
 
Dd13.2013.milano.open ntf
Dd13.2013.milano.open ntfDd13.2013.milano.open ntf
Dd13.2013.milano.open ntf
Ulrich Krause
 

La actualidad más candente (17)

開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the Basics
 
Managing Your Runtime With P2
Managing Your Runtime With P2Managing Your Runtime With P2
Managing Your Runtime With P2
 
p2, modular provisioning for OSGi
p2, modular provisioning for OSGip2, modular provisioning for OSGi
p2, modular provisioning for OSGi
 
Pankaj_Kapila
Pankaj_Kapila Pankaj_Kapila
Pankaj_Kapila
 
OSSA17 - Mixed License FOSS Projects
OSSA17 - Mixed License FOSS ProjectsOSSA17 - Mixed License FOSS Projects
OSSA17 - Mixed License FOSS Projects
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 1
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 1Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 1
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 1
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
 
BoxGrinder – FOSDEM 2012
BoxGrinder – FOSDEM 2012BoxGrinder – FOSDEM 2012
BoxGrinder – FOSDEM 2012
 
Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)
Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)
Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)
 
Maven nutshell
Maven nutshellMaven nutshell
Maven nutshell
 
SPA 2009 - Acceptance Testing AJAX Web Applications through the GUI
SPA 2009 - Acceptance Testing AJAX Web Applications through the GUISPA 2009 - Acceptance Testing AJAX Web Applications through the GUI
SPA 2009 - Acceptance Testing AJAX Web Applications through the GUI
 
Administration for Oracle ADF Applications
Administration for Oracle ADF ApplicationsAdministration for Oracle ADF Applications
Administration for Oracle ADF Applications
 
installaware_faq
installaware_faqinstallaware_faq
installaware_faq
 
Dd13.2013.milano.open ntf
Dd13.2013.milano.open ntfDd13.2013.milano.open ntf
Dd13.2013.milano.open ntf
 
ApacheCon NA 2015 - Gabriele Columbro - Is Open Source the right model in the...
ApacheCon NA 2015 - Gabriele Columbro - Is Open Source the right model in the...ApacheCon NA 2015 - Gabriele Columbro - Is Open Source the right model in the...
ApacheCon NA 2015 - Gabriele Columbro - Is Open Source the right model in the...
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 

Destacado

Web 20 E Oltre 1202297800291589 3
Web 20 E Oltre 1202297800291589 3Web 20 E Oltre 1202297800291589 3
Web 20 E Oltre 1202297800291589 3
Universita' di Bari
 
Crafting Virtual Space
Crafting Virtual SpaceCrafting Virtual Space
Crafting Virtual Space
Arthur Hash
 

Destacado (20)

India Powerpoint 2011
India Powerpoint 2011India Powerpoint 2011
India Powerpoint 2011
 
SSSSS
SSSSSSSSSS
SSSSS
 
ADLAND Carbon Neutral Business Proposal
ADLAND Carbon Neutral Business ProposalADLAND Carbon Neutral Business Proposal
ADLAND Carbon Neutral Business Proposal
 
Website design
Website designWebsite design
Website design
 
Build vs. Buy: Designing an Effective Software Update Delivery Solution
Build vs. Buy: Designing an Effective Software Update Delivery SolutionBuild vs. Buy: Designing an Effective Software Update Delivery Solution
Build vs. Buy: Designing an Effective Software Update Delivery Solution
 
Designing an Update-Friendly MSI Installation
Designing an Update-Friendly MSI InstallationDesigning an Update-Friendly MSI Installation
Designing an Update-Friendly MSI Installation
 
Web 20 E Oltre 1202297800291589 3
Web 20 E Oltre 1202297800291589 3Web 20 E Oltre 1202297800291589 3
Web 20 E Oltre 1202297800291589 3
 
워크숍발표
워크숍발표워크숍발표
워크숍발표
 
Certificacion a grado 2012 II 08-11-13 ESTUDIOS JURIDICOS
Certificacion a grado 2012 II 08-11-13 ESTUDIOS JURIDICOSCertificacion a grado 2012 II 08-11-13 ESTUDIOS JURIDICOS
Certificacion a grado 2012 II 08-11-13 ESTUDIOS JURIDICOS
 
Listados de Notas Certificadas
Listados de Notas CertificadasListados de Notas Certificadas
Listados de Notas Certificadas
 
Certificación a grado 2012-II PNFE
Certificación a grado 2012-II PNFECertificación a grado 2012-II PNFE
Certificación a grado 2012-II PNFE
 
Time Management By Unni
Time Management By UnniTime Management By Unni
Time Management By Unni
 
Metricas Orientada a Operacion, Metricas de Interfaz de Usuario y WebApps‏
Metricas Orientada a Operacion, Metricas de Interfaz de Usuario y WebApps‏Metricas Orientada a Operacion, Metricas de Interfaz de Usuario y WebApps‏
Metricas Orientada a Operacion, Metricas de Interfaz de Usuario y WebApps‏
 
Storia dei sistemi di elaborazione
Storia dei sistemi di elaborazioneStoria dei sistemi di elaborazione
Storia dei sistemi di elaborazione
 
Older Americans and Residential Stability
Older Americans and Residential StabilityOlder Americans and Residential Stability
Older Americans and Residential Stability
 
Turkey report full
Turkey report fullTurkey report full
Turkey report full
 
Shopper Marketing Starts At Home
Shopper Marketing Starts At HomeShopper Marketing Starts At Home
Shopper Marketing Starts At Home
 
Electronic Software Delivery at IOM
Electronic Software Delivery at IOMElectronic Software Delivery at IOM
Electronic Software Delivery at IOM
 
Crafting Virtual Space
Crafting Virtual SpaceCrafting Virtual Space
Crafting Virtual Space
 
Terrorism
TerrorismTerrorism
Terrorism
 

Similar a Shell vs. Java: Overcoming the Challenges of Shell Scripting for UNIX Installations

manu_resume
manu_resumemanu_resume
manu_resume
Manu VS
 
Muraliupdatedpersonal091215
Muraliupdatedpersonal091215Muraliupdatedpersonal091215
Muraliupdatedpersonal091215
Murali Krishna R
 

Similar a Shell vs. Java: Overcoming the Challenges of Shell Scripting for UNIX Installations (20)

Top 10 dev ops tools (1)
Top 10 dev ops tools (1)Top 10 dev ops tools (1)
Top 10 dev ops tools (1)
 
create auto scale jboss cluster with openshift
create auto scale jboss cluster with openshiftcreate auto scale jboss cluster with openshift
create auto scale jboss cluster with openshift
 
manu_resume
manu_resumemanu_resume
manu_resume
 
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
 
Muraliupdatedpersonal091215
Muraliupdatedpersonal091215Muraliupdatedpersonal091215
Muraliupdatedpersonal091215
 
8 good reasons to learn docker
8 good reasons to learn docker8 good reasons to learn docker
8 good reasons to learn docker
 
Development-Environment Up & Running with Docker
Development-Environment Up & Running with DockerDevelopment-Environment Up & Running with Docker
Development-Environment Up & Running with Docker
 
DevOps for database
DevOps for databaseDevOps for database
DevOps for database
 
1061 (m2)
1061 (m2)1061 (m2)
1061 (m2)
 
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkitThe DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
 
The DevOps Paradigm
The DevOps ParadigmThe DevOps Paradigm
The DevOps Paradigm
 
What is Docker?
What is Docker?What is Docker?
What is Docker?
 
At the Crossroads of HPC and Cloud Computing with Openstack
At the Crossroads of HPC and Cloud Computing with OpenstackAt the Crossroads of HPC and Cloud Computing with Openstack
At the Crossroads of HPC and Cloud Computing with Openstack
 
InstallAnywhere 2014
InstallAnywhere 2014InstallAnywhere 2014
InstallAnywhere 2014
 
Musings on Mesos: Docker, Kubernetes, and Beyond.
Musings on Mesos: Docker, Kubernetes, and Beyond.Musings on Mesos: Docker, Kubernetes, and Beyond.
Musings on Mesos: Docker, Kubernetes, and Beyond.
 
Docker In Brief
Docker In BriefDocker In Brief
Docker In Brief
 
Docker dDessi november 2015
Docker dDessi november 2015Docker dDessi november 2015
Docker dDessi november 2015
 
Hitchhiker's guide to Cloud-Native Build Pipelines and Infrastructure as Code
Hitchhiker's guide to Cloud-Native Build Pipelines and Infrastructure as CodeHitchhiker's guide to Cloud-Native Build Pipelines and Infrastructure as Code
Hitchhiker's guide to Cloud-Native Build Pipelines and Infrastructure as Code
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment
 
Making clouds: turning opennebula into a product
Making clouds: turning opennebula into a productMaking clouds: turning opennebula into a product
Making clouds: turning opennebula into a product
 

Más de Flexera

Más de Flexera (20)

Get a Complete View of Your Business Services and IT Estate in ServiceNow wit...
Get a Complete View of Your Business Services and IT Estate in ServiceNow wit...Get a Complete View of Your Business Services and IT Estate in ServiceNow wit...
Get a Complete View of Your Business Services and IT Estate in ServiceNow wit...
 
Make Smarter Cloud Decisions at Every Step of Your Journey
Make Smarter Cloud Decisions at Every Step of Your JourneyMake Smarter Cloud Decisions at Every Step of Your Journey
Make Smarter Cloud Decisions at Every Step of Your Journey
 
10 Tips to Optimize, Automate, and Govern your Hybrid IT Environment
10 Tips to Optimize, Automate, and Govern your Hybrid IT Environment10 Tips to Optimize, Automate, and Govern your Hybrid IT Environment
10 Tips to Optimize, Automate, and Govern your Hybrid IT Environment
 
Using Automated Policies for SaaS Governance and Compliance
Using Automated Policies for SaaS Governance and ComplianceUsing Automated Policies for SaaS Governance and Compliance
Using Automated Policies for SaaS Governance and Compliance
 
The Practical Approach for End-to-End SaaS Management
The Practical Approach for End-to-End SaaS ManagementThe Practical Approach for End-to-End SaaS Management
The Practical Approach for End-to-End SaaS Management
 
7 Things You Need to Know for Your Cloud-First Strategy
7 Things You Need to Know for Your Cloud-First Strategy7 Things You Need to Know for Your Cloud-First Strategy
7 Things You Need to Know for Your Cloud-First Strategy
 
The Role of In-House & External Counsel in Managing Open Source Software
The Role of In-House & External Counsel in Managing Open Source SoftwareThe Role of In-House & External Counsel in Managing Open Source Software
The Role of In-House & External Counsel in Managing Open Source Software
 
Addressing Open Source Risks During M&A: A Legal View
Addressing Open Source Risks During M&A: A Legal ViewAddressing Open Source Risks During M&A: A Legal View
Addressing Open Source Risks During M&A: A Legal View
 
Having Trouble Managing All Your Cloud Services? We Know!
Having Trouble Managing All Your Cloud Services? We Know!Having Trouble Managing All Your Cloud Services? We Know!
Having Trouble Managing All Your Cloud Services? We Know!
 
Webinar: Maximizing the ROI of IT by Simplifying Technology Complexity
Webinar: Maximizing the ROI of IT by Simplifying Technology ComplexityWebinar: Maximizing the ROI of IT by Simplifying Technology Complexity
Webinar: Maximizing the ROI of IT by Simplifying Technology Complexity
 
Webinar: What's New In FlexNet Manager Suite 2018 R1
Webinar: What's New In FlexNet Manager Suite 2018 R1Webinar: What's New In FlexNet Manager Suite 2018 R1
Webinar: What's New In FlexNet Manager Suite 2018 R1
 
Open Source Security - It can be done easily.
Open Source Security - It can be done easily.Open Source Security - It can be done easily.
Open Source Security - It can be done easily.
 
Software Distribution, Customer Experience and the IoT: Get Ready for Fast, S...
Software Distribution, Customer Experience and the IoT: Get Ready for Fast, S...Software Distribution, Customer Experience and the IoT: Get Ready for Fast, S...
Software Distribution, Customer Experience and the IoT: Get Ready for Fast, S...
 
Windows 10 webinar: What’s new for IT pros Windows 10 v 1709
Windows 10 webinar: What’s new for IT pros Windows 10 v 1709Windows 10 webinar: What’s new for IT pros Windows 10 v 1709
Windows 10 webinar: What’s new for IT pros Windows 10 v 1709
 
Don’t Let Hackers Breach Your Data: Shutting Your Risk Window on Apache Struts2
Don’t Let Hackers Breach Your Data:  Shutting Your Risk Window on Apache Struts2Don’t Let Hackers Breach Your Data:  Shutting Your Risk Window on Apache Struts2
Don’t Let Hackers Breach Your Data: Shutting Your Risk Window on Apache Struts2
 
BDNA joins Flexera
BDNA joins FlexeraBDNA joins Flexera
BDNA joins Flexera
 
Flexera Event - The Game Has Changed - Are You Ready?
Flexera Event - The Game Has Changed - Are You Ready?Flexera Event - The Game Has Changed - Are You Ready?
Flexera Event - The Game Has Changed - Are You Ready?
 
Webinar: Take Proactive Control of Your SAP Licensing, Indirect Usage and Ven...
Webinar: Take Proactive Control of Your SAP Licensing, Indirect Usage and Ven...Webinar: Take Proactive Control of Your SAP Licensing, Indirect Usage and Ven...
Webinar: Take Proactive Control of Your SAP Licensing, Indirect Usage and Ven...
 
Keeping a Lid on Costs for Cloud Infrastructure and SaaS Applications
Keeping a Lid on Costs for Cloud Infrastructure and SaaS ApplicationsKeeping a Lid on Costs for Cloud Infrastructure and SaaS Applications
Keeping a Lid on Costs for Cloud Infrastructure and SaaS Applications
 
Do You Manage Software? Understanding Your Role in Cybersecurity Defense
Do You Manage Software? Understanding Your Role in Cybersecurity DefenseDo You Manage Software? Understanding Your Role in Cybersecurity Defense
Do You Manage Software? Understanding Your Role in Cybersecurity Defense
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Shell vs. Java: Overcoming the Challenges of Shell Scripting for UNIX Installations

  • 1. Shell vs. Java: Overcoming the W H I T E PA P E R Challenges of Shell Scripting for UNIX Installations
  • 2. Shell vs. Java: Overcoming the Challenges of Shell Scripting for UNIX Installations Introduction Web servers, shell-based installations are rarely a viable A shell is a command-line interpreter that takes and executes delivery option. This delivery mechanism becomes more commands, and in doing so, implements a programming difficult when you reanalyze how the tar archive is built. The language commonly referred to as “shell scripting.” Shell configuration management team has to produce a directory scripting is traditionally used by UNIX system administrators structure that will mimic the final destination. to automate the execution of system tasks, but developers also use shell scripts to create enterprise-level software In addition, it is well known that tar-ball installations are installations, and that is where problems occur. not user-friendly to regular users. This is due to the absence of visually guided installations, as is the accepted standard This white paper highlights the major difficulties with for Windows applications. As a result, they often introduce attempting to develop UNIX installations using shell scripts. barriers to user adoption of applications, and may even It focuses on shell scripting as a language and how it is cause problems with the installation and maintenance of used in the context of UNIX installation development. It also the applications. discusses how Java is being used as a successful alternative to shell scripting for enterprise installations. UNIX Installations: The Way They Ought to Be Installations, regardless of the targeted operating system, Finally, this white paper details how the tools in should be easier to implement. The “tar-ball” file archive InstallAnywhere®, the multi-platform installation tool from structure should not be decided upon by the build system. Flexera Software, can help developers overcome the This should be loosely packaged so that the installation can inherent problems with shell scripting and create high- make the final decision on how the final file structure quality multi-platform installations ideal for enterprise should look. environments. The installation technology used should be based on a more UNIX Installations: The Tar-Ball Archive robust language with built-in parsing capabilities for XML, Most UNIX shell-based installations are constructed using Java properties files, and so on. Finally, the installation a “tar-ball” (tar archive) paradigm. A tar file is delivered should give the user the option of running the installation whose contents include a shell script and the files to be in a graphical mode. installed. For the most part the files are stored in a structure mimicking that of their final destination. This potentially Ultimately, customers and installation developers want means that a single copy (cp) command is invoked to copy the same thing, a robust installation system. However, the entire directory to the home directory. All necessary their perspective is different. The customer cares about configurations are done with the help of commands such the final product, whereas the developer cares about as “sed”, “awk”, and so on. The user interface provided is the development environment needed to produce UNIX console only. installations. The following lists are a subset of requirements as demanded by customers and installation developers. By and large, the above scenario is acceptable for simple applications. However, it becomes very hard to follow when For customers: even the most straightforward enterprise installations are • Ease of use – Most customers want an easy way to attempted. If the installation you are attempting to construct interact with an installation, preferably one that is is required to configure application servers, databases, or visually guided, such as those offered by Windows. 2 Flexera Software: InstallAnywhere White Paper Series
  • 3. Shell vs. Java: Overcoming t he Challenges of Shell Script ing for UNIX Installat ions • Single point of initiation – An end user attempting installation and received the same error. Only this time the to invoke your installation should not be confronted error occurs at line 4559. Debugging is not available unless by a plethora of installation options. A single native you type: launcher should suffice. • Native look and feel – It is important that users receive % sh -x install.sh an installation that looks and feels like any other application targeted for that particular operating The above does not yield results that someone with limited system. shell-scripting knowledge can understand. • Get the product installed – The ultimate goal of the installation is to get the product installed and The problem is worsened when the script contains a configured. statement similar to myvar=`cat $1`. If $1 is not initialized, the script will be stuck. Of course, a diligent programmer For installation developers: doesn’t allow this to happen, but if it does happen, debugging can be a nightmare. • Single point of development – A true cross-platform development platform that would allow the developer Other issues with the script come to light when you consider to maintain a single code base for numerous platforms. the problems associated with localization and permissions • The development environment should use a familiar (“To install, you need admin rightsn”), and dealing with a language, preferably object oriented – To allow nonstandard logging (to install.log) mechanism. extensibility, the installation development tool should enable the developer to extend it. The point of this exercise was to show how difficult it can be • Operating system abstraction – When developing to develop elaborate enterprise installations using shell. cross-platform installations, the developer should focus on product installation and configuration tasks and not Interoperability how each operating system works. Even though shell was never intended for large development, shell scripting is sometimes used to create Analyzing the Shell Scripting Environment large installation projects, such as enterprise installations. The concept of shell scripting was introduced to help These installations need to directly communicate system administrators automate low-level shell commands. configuration settings to the product being installed. For For a long time most companies have used shell scripts as shell-based installations, this is done using input files or the delivery mechanisms (that is, installations), which, for the command line. Error handling, for the most part, is done most part, worked well. Since shell scripts are delivered using return codes. in clear, readable ASCII, they can potentially expose implementations that can pose as security holes. Unfortunately, return codes are not always reliable. Sometimes a command may return 0 when in fact it should Unfortunately, that is not the only weakness shell scripting return anything but 0. Extra steps need to be taken to ensure exposes. The following sections highlight why shell scripting reliability, which can turn into unnecessary complex if- does not scale when enterprises attempt to use it as an statements that make interoperability all the more difficult. installation development platform. Sharing Code The Development Environment When developing large-scale enterprise installations, you Shell is littered with hard-to-understand regular expressions can expect more than one developer to work on the same and lacks a true integrated development environment (IDE). code. Your plan, of course, is to develop reusable libraries It often takes a truly senior UNIX developers to properly that can be used across the installation system. However, handle such complex scripting environments. Consider the shell was not designed with that in mind. Shell is for the following syntax: most part used to automate administration tasks such as “empty the temp space” or “manage users.” It was designed CURRENT_USER=`whoami | awk ‘{print $1}’` to deal with low-level tasks, not code sharing. if [ “$CURRENTUSER” != “root” ] && [ “$CURRENT_USER” != “admin” ]; then printf “To install, you need admin Portability rightsn” | tee -a Not all UNIX environments are created equal. Some install.log fi commands work in every UNIX environment; some do not. Sometimes commands such as “pidof” do not exist in If you take a closer look, you will notice how awkward the environments other than Linux. Furthermore, some utilities if-statement really is. If you play with the white-spacing in do not share the same command-line arguments across all the if-statement, you may receive an error similar to this one: UNIX implementations. Besides, would you like to learn all the command-line options offered by UNIX commands such ./install.sh: line 2: [CURRENT_USER: command not found] as “ls”? To account for portability, a great deal of code must be written. Although this may not seem like a big problem, imagine what would happen if someone in the field ran your Flexera Software: InstallAnywhere White Paper Series 3
  • 4. Shell vs. Java: Overcoming t he Challenges of Shell Script ing for UNIX Installat ions Parsing Ability Shell was written long before SGML technologies such as public String getInstallStatusMessage( ) { return XML were available. Therefore, its abilities for parsing such “Computing time stamp...”; } formats are based on regular expressions. For the most part, regular expressions are hard to write and even harder to public void uninstall(UninstallerProxy up) { /* do nothing debug. To consider writing regular expressions for parsing on uninstall */ } XML would put you in the business of building XML parsers public String getUninstallStatusMessage( ) { return “...”; } from scratch. Modern languages such as Java and C++ } have XML parsers built-in. First and foremost, the above code is standard Java code. Parsing becomes more of a problem when unknown formats In addition to being able to use standard Java functionality, are met. New regular expressions must be built, or you Java code can use JNI to call in to native code. The could write a native executable using C/C++ to do the job. interesting thing about JNI is the fact that as far as the Once again, interoperability becomes questionable. Java developer is concerned, the JNI call is just another Java call. The Linux Factor With the introduction of Linux, a large number of non- Worth noticing is also the exception handling offered by UNIX users entered the UNIX arena. From a strategic Java. Logging is another powerful Java feature. To facilitate point of view, it gives a large number of users the chance readability, logging information can be categorized by to diversify. On the other hand, most of these new users severity and the output can be formatted as XML, which in come from GUI-driven operating systems, and they want turn can be transformed into HTML so that customers can everything be done with graphical tools. But shell-based view install logs in a readable format. installations are made to be console-driven – no graphical interface. Java has emerged as a very popular technology, and for good reasons. Most educators have embraced Java as Mac OS X their teaching language of choice, creating a large pool Mac OS X is further proof that UNIX is becoming more of Java developers. The attractiveness of Java as a “write accepted as a graphical operating system. Besides making once, run everywhere” language has certainly been another Mac OS X the most optimized UNIX environment to run contributing factor to its popularity. Java, Apple has made Java an integral part of Mac OS X, which is good news if your strategy is to create Java-based Another strong supporting argument for Java-based installations. But shell-based installations must once again installations is that numerous companies deploy application take a back seat. servers such as IBM® WebSphere®, BEA® WebLogic®, Sun® Java Enterprise System, or JBoss. For scalability and Java-Based Installations reliability purposes, these are mostly deployed on the UNIX If not shell scripting, what then is a feasible alternative platform and are Java-based. technology for developing cross-platform installations? What about Java? Its “write once, run everywhere” makes Most application servers expose Java configuration APIs. it an ideal technology for targeting platforms such as UNIX. This allows for a seamless integration strategy that can Java transforms the installation development into a more ultimately give users an out-of-the-box delivery solution. The robust environment. interesting point here is that “write once, run everywhere” becomes an attainable reality. To appreciate the power of Java to extend an installation, consider an example. The following is a simple Java class As an alternative to shell scripting, however, Java requires that computes a time stamp and stores the result in a custom additional help before it can be considered as a logical InstallAnywhere variable. successor. A reliable, user-friendly Windows-like setup experience would be a great thing to have for UNIX import com.zerog.ia.api.pub.*; developers. The ability to target UNIX and Windows import java.util.*; platforms with a Java-based application install would be even better, especially given how difficult it is to accomplish public class GenerateTimeStamp extends this with shell scripting. CustomCodeAction { For the developer with lots of experience with tar-balls and public void install(InstallerProxy ip) cryptic script commands, any alternative needs to offer { clear and compelling benefits. The balance of this paper // compute time stamp with Java... will offer just such an argument, based on the capabilities String now = new Date( ).toString( ); of InstallAnywhere from Flexera Software. // ...and set a custom variable to the value ip.setVariable(“$NOW$”, now); } 4 Flexera Software: InstallAnywhere White Paper Series
  • 5. Shell vs. Java: Overcoming t he Challenges of Shell Script ing for UNIX Installat ions Building Multi-Platform Installations with graphical interface, which allows developers to manage InstallAnywhere all aspects of their installer project. All the features of InstallAnywhere from Flexera Software provides an out-of- InstallAnywhere are available in this easy to use integrated the-box Java-based installation solution. Developing cross- development environment. platform installations with Java and InstallAnywhere’s multi- platform installation IDE provides many benefits, including Advanced Designer Tasks making it easy to: The Advanced Designer is divided into tasks that are represented by tabs found along the left-hand side of the • Tightly integrate installation development into the window. Each of the following tabs represents tasks and development department settings specific to each installation project: • Conceal code so that proprietary implementations are kept safe • Project: Settings related to your specific project. • Create installations that can be extended and These include general settings, file settings, and developed using Java technologies localization settings. • Installer UI: Set the look and feel for the installer by Learn More about InstallAnywhere adding background images, billboards, and other If you wish to learn more about the capabilities of graphical components. InstallAnywhere, please visit the Flexera Software Web • Organization: Manages Install Sets, Features, site at www.flexerasoftware.com/installanywhere. Components, and Merge Modules. • Pre-Install: An ordered sequence of panels and actions that occur before file installation. With InstallAnywhere, developers can build installers for all • Install: Manage File installation tree and install supported platforms from a single project. InstallAnywhere’s time actions. capabilities (highlighted below) make it the ideal tool for • Post-Install: An ordered sequence of panels and actions quickly developing industrial-strength installers. that occur after file installation. • Pre-Uninstall: An ordered sequence of panels and Rapid Prototyping with the Project Wizard actions that occur before file uninstallation. Developers can build their first installer in less than five • Post-Uninstall: An ordered sequence of panels and minutes with InstallAnywhere’s six-step Project Wizard. This actions that occur after file uninstallation. intuitive design tool also sets the class path and finds the • Build: Manage build settings, including bundling of a main class for a Java application automatically. When you Java Virtual Machine. complete the Project Wizard steps, the result is an installer project that targets a number of major operating systems. Each Advanced Designer task contains sub-tabs that offer greater fine-tuning of InstallAnywhere’s features. This working prototype is inline with management demands that prototypes be produced early in the development process. The development process demands that the installation be integrated early so that testing can be performed in a more realistic environment. Action-Based Installers Actions, which represent the operations the installer performs, are the fundamental elements of InstallAnywhere installers. InstallAnywhere supports an extensible action architecture that provides the ability to perform additional operations during installation, such as installing files and folders, creating shortcuts, executing custom code, or extracting the contents of a compressed file. Some This, for the most part, means that the installation should frequently used actions include Install File, Create Folder, have the capability to run in graphical mode and have a Create Alias, Link, Shortcut, Execute Target File, Execute consistent look and feel regardless of the operating system. Command, and Expand Archive. InstallAnywhere contains many tools that make rapid prototyping a reality. Customizing Projects in the Advanced Designer The InstallAnywhere Advanced Designer has an intuitive, Flexera Software: InstallAnywhere White Paper Series 5
  • 6. Shell vs. Java: Overcoming t he Challenges of Shell Script ing for UNIX Installat ions Components, Features, and Install Sets Components, features, and install sets are organizational concepts in the InstallAnywhere IDE. They allow installer developers to add structure to the files and actions their installers employ and determine what feature choices end users have during the install. Components are an organization unit installer developers Build and Try can use to group files and actions; however, components InstallAnywhere users can quickly examine the results of are internal organization units that are never shown to the their project changes by building installers from the project end user. Conversely, features can group one or more and running the resulting installer with the click of a button. components, files, and actions into combinations from In addition, InstallAnywhere includes several built in features which the installer end users can choose. And groups of for previewing and debugging your installers and installer features can be combined into install sets—a convention panels. that allows end users to choose options like Minimal, Typical, or Full Install. While developers working with relatively simple installers can rely on InstallAnywhere to generate basic components, features, and install sets automatically, more advanced developers take control of components, features, and install sets to organize their installer resources in the Get User Input Panels Advanced Designer. InstallAnywhere provides many panels for displaying information to the user and collecting user information. Moreover, InstallAnywhere includes the Get User Input - Simple and Get User Input - Advanced panel actions. These actions enable you to build custom panels by inserting text- display and user-input controls into the Get User Input panel. InstallAnywhere provides the architecture to capture the user input from these panels to InstallAnywhere variables. For requirements that exceed the Get User Input panel’s features, you can code custom panels that share the dimensions, images, navigation buttons, and other elements used by built-in panels. Rules and Variables InstallAnywhere keeps track of dynamic values using variables. Almost every dynamic value in InstallAnywhere is represented by an InstallAnywhere variable. Variables may be modified or accessed in order to affect the design or output of an installer; they can also be modified during the progress of the installer in order to change the installer’s behavior. InstallAnywhere uses variable-based Boolean rules to control most aspects of installer behavior. Rules can be applied to any action within the InstallAnywhere installer, as well as to organizational units such as Install Sets, Features, LaunchAnywhere Launchers and Components. Rules commonly direct the execution Create launchers that look and behave like the operating of platform-specific actions on the target system, but they system your installation is running on. Your end users are may check other conditions such as system architecture, file accustomed to a particular behavior. Windows users are and folder attributes, and user-chosen language. Rules can quite familiar with the ubiquitous installer.exe concept. also be used to compare the values of two InstallAnywhere InstallAnywhere LaunchAnywhere launchers extend that variables, match a regular expression, or to execute a philosophy to all of its supported platforms. custom coded rule. (InstallAnywhere Enterprise edition also includes rules specific to System i (i5/OS).) 6 Flexera Software: InstallAnywhere White Paper Series
  • 7. Shell vs. Java: Overcoming t he Challenges of Shell Script ing for UNIX Installat ions A LaunchAnywhere launcher is a unique executable custom panels, custom consoles, and custom rules that that launches a Java application on Windows, UNIX interact with and extend InstallAnywhere functionality. (including Solaris, Linux, HP-UX, AIX, BSD, and others), and Mac OS X platforms. On Windows, LaunchAnywhere Custom Dialog Boxes technology creates double-clickable icons that invoke a InstallAnywhere provides many built-in dialog boxes for Java application. For Mac OS X, it generates application displaying information to the user and collecting user bundles. On UNIX platforms, end users type a simple information. Moreover, InstallAnywhere’s Get User Input command to launch the application. panels enable you to build up custom dialog boxes by inserting text-display and user-input components into a LaunchAnywhere technology sets the classpath, redirects standard dialog box frame. For more sophisticated user- stdout and stderr, passes in system properties and command- interface requirements, you can create custom panels that line parameters, and performs other configuration functions. share the dimensions, images, navigation buttons, and For graphical users a Web-based applet installation is also other elements used by built-in panels. available. This further simplifies the distribution model of your product. Shell Revisited As mentioned earlier, shell scripting was intended for system administration. To that end, some scripts are worth keeping. InstallAnywhere facilitates launching existing shell scripts (even the ones that take command line arguments). Since most shell scripts are processed through /bin/sh (the first line in a shell script, the shebang—i.e., #!/bin/sh—tells you who is going to process the script), shell scripts can also be launched through Runtime.exec. This command returns a Process object, which in turn can return the exit value from the sh process. Powered by Java InstallAnywhere is powered by Java. Java is a full-fledged, object-oriented language. Its cross-platform capabilities make it the perfect engine for InstallAnywhere. Customizing and Extending InstallAnywhere Advanced installer developers or development teams that Besides the common tasks supplied by InstallAnywhere, you need to build complex installers can take advantage of a might want to add custom tasks that do not fit the ordinary. host of enterprise-strength features: Since InstallAnywhere is powered by Java, you can extend its functionality in a number of ways. • Merge Modules: Essentially installer sub-projects that can be created independently of one another and • Create your own custom Java plug-ins: InstallAnywhere later merged together, merge module are reusable enables you to create custom actions written in Java. collections of installation functionality. A Merge You can refer to your custom code in a single project, Module is just like an installer, complete with features, or package it as an InstallAnywhere plug-in that can be components, panels, actions, and files. However, a used in multiple projects. Merge Module cannot be installed without being part • Use InstallAnywhere services: In addition to being able of an InstallAnywhere project; instead, use Merge to call Java code from your custom code actions, you Modules to include the functionality of one installer can call methods from InstallAnywhere services. These within another installer. services extend Java functionality with underlying • Support for Deployment to Application Servers and native code. Example services are the System Utility Database Servers: InstallAnywhere supports installers Service, for working with environment variables that target application servers (such as Geronimo, and system startup commands; the Security Service, JBoss, Resin, Sun Application Server, Tomcat, for working with users and groups; and the Win32 WebLogic, and WebSphere) and database servers and Win32 Registry Services, for programmatically (such as MySQL, Oracle, MS SQL Server, and DB2). manipulating Windows services and the Windows • Team Development Features: InstallAnywhere supports registry. team-based installer development with source paths. • Java Native Interface (JNI): Although Java is a powerful Source paths allow developers to reference file language, some operating system APIs have not been resources using variable paths instead of absolute mapped into the core language. JNI is intended to paths. This allows team members to share a project file breach that gap. If necessary, you can implement even when file resources are located at different paths custom functionality in a native library (a Windows on their development systems. DLL or UNIX shared library, for example) and call the • Custom Code: With InstallAnywhere’s API, developers native code from an InstallAnywhere custom code can write custom Java code that runs in the same action. Java VM as InstallAnywhere, creating custom actions, Flexera Software: InstallAnywhere White Paper Series 7
  • 8. Shell vs. Java: Overcoming t he Challenges of Shell Script ing for UNIX Installat ions Custom code development in Java is enhanced further when you consider the following: • XML parsing: Java provides out-of-the-box XML parsing through standard parsing technologies such as DOM or SAX. • Use any Java IDE: When writing InstallAnywhere custom code, you can use your own Java IDE. • Unit testing with JUnit: JUnit is a popular regression- testing framework, and InstallAnywhere provides classes for integrating with JUnit. • Coding standards: Create or extend existing common coding standards to accommodate the development of InstallAnywhere custom code. Summary Though shell scripting is being criticized for its installation development capabilities, this white paper considers shell scripting a sound technology for UNIX system administration. But for software development, shell scripts lack the robustness needed to create platform independent installations. Java as a technology has matured to the point that creating Java-based installations has become the preferred method. Furthermore, technologies such as JDBC, CORBA, JNDI, and RMI, make Java-based installations the better candidate for targeting platforms such as UNIX. Begin a Free Evaluation of InstallAnywhere You can download a free trial version of InstallAnywhere from the Flexera Software Web site at: www.flexerasoftware.com/installanywhere/eval. Want to learn more best practices for building quality installations? Join an InstallAnywhere training class – visit www.flexerasoftware.com/training for available classes. 8 Flexera Software: InstallAnywhere White Paper Series
  • 9. Flexera Software LLC Schaumburg United Kingdom (Europe, Japan (Asia, For more office locations visit: 1000 East Woodfield Road, (Global Headquarters): Middle East Headquarters): Pacific Headquarters): www.flexerasoftware.com Suite 400 +1 800-809-5659 +44 870-871-1111 +81 3-4360-8291 Schaumburg, IL 60173 USA +44 870-873-6300 Copyright © 2011 Flexera Software LLC. All other brand and product names mentioned herein may be the trademarks and registered trademarks of their respective owners. IA_WP_Shell_Oct11