Installing with the Command Line
|
You can automate the administrator installation by writing a script that invokes the installer from a command line without a graphical user interface. A command line installation is equivalent to a Full installation performed with the graphical user interface, that is, it installs the Sun Java System Application Server, the Relay, the Central Installation, and the test packs.
The Java Device Test Suite Tester’s Guide describes how to perform a tester installation with the command line.
This chapter has these sections:
Note - Command line installation does no error checking. A mistake can produce an aborted or incorrect installation. To minimize the chance for error, you can install with the graphical interface first (see Chapter 2), write down the property values that you enter, verify the installation, then use the same value in the command line installation.
|
Creating admin.properties
Before invoking the installer from a command line, you must create a file called anything.properties. This chapter uses admin.properties as an example file name. Create this file with a text editor. The lines in the file specify the same installation information that the graphical installer’s default Full option asks for. The file content has the general syntax of a Java programming language properties file. For a technical description of this syntax, see http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#load(java.io.inputStream). Be sure that no line has a trailing space (blank) character.
TABLE 3-1 describes the entries that must be in an admin.properties file.
TABLE 3-1 admin.properties File Entries
Property
|
Value Description
|
INSTALLER_UI
|
silent
Enter this exact string.
|
USER_INSTALL_DIR
|
If the directory does not exist, the installer creates it. After installation, the directory contains the Central Installation, test packs, the administrator harness launch script, and installation logs.
Examples:
Windows operating system:
c\:\\JDTS-CI
Solaris operating system:
/home/userName/opt/JDTS-CI
|
INSTALL_DRIVE_ROOT
|
Root directory of USER_INSTALL_DIR.
Examples:
Windows operating system:
c\:\\
Solaris operating system:
/
|
JDK_FOLDER
|
Java Development Kit folder.
Examples:
Windows operating system:
C\:\\Java\\jdk1.6.0_03
Solaris operating system:
/home/userName/bin/jdk1.6.0_03
|
JAVA_HOME
|
Same as JDK_FOLDER value.
|
INSTALLER_JAVA_DOT_HOME
|
Same as JDK_FOLDER value.
|
CHOSEN_INSTALL_SET
|
Default
Enter exactly this string.
|
SERVER_ADMIN_PASSWORD
|
Sun Java System Application Server administrator password. The value must be at least eight characters.
Example: adminpass
|
SERVER_ADMIN_PASSWORD_RETYPE
|
Same value as SERVER_ADMIN_PASSWORD.
|
SERVER_ADMIN_USERNAME
|
Sun Java System Application Server administrator user name
Example: admin
|
SERVER_ADDRESS
|
Real IP address of the computer receiving the installation.
|
SERVER_HTTP_PORT
|
IP port a client uses to contact the Sun Java System Application Server. This port must not be assigned to any other application. After installation, this port must be accessible to test devices and harnesses.
Example: 8080
|
SERVER_HTTPS_PORT
|
This port is reserved for possible future use.
Example: 8181
|
SERVER_ADMIN_PORT
|
Sun Java System Application Server administration login port.
Example: 4848
Note - This port must be accessible by HTTP (not HTTPS) during the installation. If necessary, reconfigure the Sun Java System Application Server before and after installation.
|
JDTS_SERVER_APP_CONTEXT
|
Enter a name that identifies this installation’s Relay’s application context (appContext). The graphical installer’s default name is JdtsServer. which is suitable for the first Relay on an application server. Additional Relays must have different values.
Example: JdtsServer3
Note - If you install multiple Relays on an application server, you must give each Relay a different application context name.
|
SJSAS_PS_ROOT_DIR
|
Enter the absolute path of a directory where the Relay can store test-related files, such as media samples. The path must be expressed from the Sun Java System Application Server host’s point of view. If the directory does not exist, it will be created. If it exists, it must be empty.
Examples:
Windows operating system:
C\:\\JdtsServer3StorageRoot
Solaris operating system:
/home/userName/JdtsServer3StorageRoot
Note - If you install multiple Relays on an application server, you must give each Relay a different storage directory.
|
TEST_SERVER_PORT_RANGE
|
Enter about 100 free ports on the Java System Application Server host for each test harness that you expect to run tests simultaneously.
Examples:
any
6100-6200
6100,6200-6300
Note - If you install multiple Relays on an application server, you must give each Relay a different port range.
Note - You must supply a value for this entry. If you do not, the Relay does not start. Unless security or administrative requirements dictate the use of particular ports, the value any is recommended.
|
SJSAS_DIR
|
Directory in which to install the Sun Java System Application Server. If the directory exists, it must be empty.
Examples:
Windows operating system:
C\:\\Sun\\AppServer
Solaris operating system:
/home/userName/bin/Sun/AppServer
|
Invoking the InstallerWindows Operating System Hosts
Run this command:
> jdts_admin-build_windows-date.exe -f admin.properties
The value of build and date depend on when the software was built.
Solaris Operating System Hosts
1. Make the installer file executable.
The installer file is jdts_admin-build_solaris-date.bin.
The value of build and date depend on when the software was built.
2. Run this command:
% sh jdts_admin-build_solaris-date.bin -f admin.properties
The value of build and date depend on when the software was built.
Note - If you uninstall an installation that was created from the command line, the harness is uninstalled “silently,” that is, without a graphical user interface.
|
Verifying the Installation
A command line installation does not provide visual feedback, console messages, or an error code. You can monitor its progress with an operating system tool that shows the status of processes.
The installation is complete when the file CentralInstallDir/JDTSversion_InstallLog.log has been created. Open this file with a text editor and search for messages containing the string “FATAL”. If there are no such messages, installation was successful. The “FATAL” messages describe the details of the problems encountered, if any.