README.TXT 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. WebSphere Application Server Version 21.0.0.11 Liberty - (21.0.0.11-cl211120211019-1900)
  2. I. CONTROLLING WEBSPHERE APPLICATION SERVER LIBERTY
  3. The bin directory contains a server script to help control the server process.
  4. The script supports the following actions:
  5. * create -- creates a new server
  6. * start -- launches the server as a background process
  7. * run -- launches the server in the foreground
  8. * debug -- launches the server in the foreground with JVM debug options
  9. * stop -- stops a running server
  10. * status -- check to see if a specified server is running
  11. * package -- packages server runtime and target server configuration/application(s) into zip archive file
  12. * dump -- dump diagnostic information from the server into an archive
  13. * javadump -- dump diagnostic information from the server JVM
  14. * list -- list existing servers
  15. * version -- displays the version of the server runtime
  16. * pause -- pause all the components in the server that can be paused
  17. * resume -- resume all paused components in the server
  18. * help -- get command-line/script help, including descriptions of additional options
  19. To use the script on Windows (the .bat extension is optional):
  20. > bin\server.bat create <serverName>
  21. > bin\server.bat start <serverName>
  22. > bin\server.bat help
  23. To use the script on other platforms:
  24. > bin/server create <serverName>
  25. > bin/server start <serverName>
  26. > bin/server help
  27. If a serverName is not specified, "defaultServer" will be used.
  28. Notes:
  29. The server requires Java 7 or 8. See the WebSphere Application Server Knowledge
  30. Center for details about minimum requirements for your development environment
  31. (Java and operating system). To download IBM Java SDKs, visit
  32. http://www.ibm.com/developerworks/java/jdk/
  33. The script will try to find the java executable in your environment by
  34. looking for JAVA_HOME and JRE_HOME before falling back to the java executable
  35. present on the path.
  36. You may need to set one of these variables in your environment; for example,
  37. to set JAVA_HOME:
  38. Set JAVA_HOME to where you have your JDK installed:
  39. > export JAVA_HOME=/java/jre
  40. If JAVA_HOME\bin is not in the PATH, add it to the path:
  41. > export PATH=$JAVA_HOME/bin:$PATH
  42. By default, the server uses TCP/IP port 9080 for HTTP traffic, and port
  43. 9443 for HTTPS traffic. The server management script does not track or
  44. manage port number assignments. For more information defining the ports
  45. used by the server, see the WebSphere Application Server Knowledge
  46. Center.
  47. II. SERVER CONFIGURATION FILES
  48. The server requires one configuration file: server.xml.
  49. This file describes the configuration of the server, either through
  50. direct assignment of values, or by including other configuration files.
  51. III. INSTALLING AN APPLICATION
  52. No applications are installed by default.
  53. Before installing an application, update the server configuration file,
  54. server.xml, to include any required features and resources. For more
  55. information, see the WebSphere Application Server Knowledge Center.
  56. * Adding the application as a dropin
  57. If application-specific configuration is not required, you can place the
  58. application (as an archive or a directory) in the monitored dropins directory.
  59. Be sure to maintain the file extension of the archive or directory so that
  60. the server can determine the type of the application. Do not define the
  61. dropin applications in the server configuration.
  62. When using the dropin approach, you can add or remove an application
  63. while the server is running and the changes will be detected by the server.
  64. The server will detect changes to static or dynamically compiled resources
  65. like JSPs as soon as they are made. To update the pre-compiled portions of
  66. an application, like servlets, delete the application from the dropins
  67. directory, pause briefly, and add the updated application to the dropins
  68. directory.
  69. * Adding the application to the server configuration
  70. If application-specific configuration is required, place the application
  71. into the apps directory and define the application in the server
  72. configuration. To remove the application, remove the application from the
  73. server configuration. The server can be configured to monitor changes
  74. in configured applications, and will restart the application for you
  75. if changes are detected.
  76. For example:
  77. +- wlp
  78. | +- usr/ User directory (wlp.user.dir)
  79. | | +- servers/
  80. | | | +- <serverName> Server configuration directory (server.config.dir)
  81. | | | | +- dropins/ Default application dropins directory
  82. | | | | | +- GuestList.war
  83. | | | | +- apps/ Configured application directory
  84. | | | | | +- OrderForm.war
  85. For more information, see the WebSphere Application Server Knowledge Center.
  86. IV. DIRECTORY LOCATIONS AND VARIABLES
  87. By default, the runtime uses the following directory structure:
  88. Directory/File Variable Description
  89. ------------------------------ ------------------- -----------------------
  90. wlp / wlp.install.dir Root of WebSphere Liberty installation
  91. +- bin/ Liberty scripts
  92. +- clients/ Liberty client and thin client libraries
  93. +- dev/ Root for developer resources (APIs, SPIs, specifications, and tools)
  94. +- etc/ User customizations (optional: settings apply to all servers)
  95. | +- server.env Default server script environment variables (optional)
  96. | +- jvm.options Default JVM options (optional)
  97. +- lib/ Platform runtime (internal)
  98. +- templates/ Runtime customization templates and examples
  99. | +- servers/ Server configuration templates
  100. | +- zos/ z/OS-specific templates
  101. | | +- procs/ z/OS proc templates for starting a Liberty server
  102. +- usr/ wlp.user.dir User directory
  103. | +- shared/
  104. | | +- jvm.options Server JVM options (optional: merged with server specific jvm.options)
  105. | | +- server.env Server script envrionment variables (optional: merged with wlp/etc/server.env)
  106. | | +- apps/ shared.app.dir Shared applications
  107. | | +- config/ shared.config.dir Shared server configuration files
  108. | | +- resources/ shared.resource.dir Shared resource definitions: adapters, data sources
  109. | +- servers/
  110. | | +- <serverName> ** server.config.dir Server configuration directory
  111. | | | wlp.server.name The name of the server is the directory name
  112. | | | +- bootstrap.properties Server bootstrap properties (optional)
  113. | | | +- jvm.options Server JVM options (optional: replaces wlp/etc/jvm.options)
  114. | | | +- server.env Server script environment variables (optional: merged with wlp/usr/shared/server.env)
  115. | | | +- server.xml Server configuration file (required)
  116. | | | +- apps/ Server's configured applications directory
  117. | | | | +- <application.type> Application directory or archive
  118. | | | +- dropins Server's default application dropins directory
  119. | | | | +- <application.type> Application directory or archive
  120. | | +- <serverName> ** server.output.dir Server output directory: logs and workarea
  121. | | | +- logs Server's logs directory (including FFDC logs)
  122. | | | | +- state Files that contain information about the runtime state, such as JMX addresses
  123. | | | +- workarea Server's workarea directory
  124. ** Note: The individual server directory appears in the above list twice. In
  125. advanced installation patterns, read-only configuration data may be stored
  126. separately from the read-write space required by a running server. See Section V.
  127. The variables associated with each directory (where present) can be used to
  128. specify file locations when configuring the server in server.xml. For example, you
  129. can specify a shared application location as "${shared.app.dir}/myShared.war".
  130. Tip: To ensure configuration portability, use the most specific variable that is
  131. appropriate, and avoid relying on the relationship between resources; for
  132. example, the install location, ${wlp.install.dir}, might not be the parent of
  133. the custom configuration directory, ${wlp.user.dir}, in some configurations.
  134. Likewise, the server directory itself might be split in half; use ${server.config.dir}
  135. to reference server-specific configuration (applications), and ${server.output.dir}
  136. to describe artifacts generated by the server (log files).
  137. V. CUSTOMIZING THE SERVER ENVIRONMENT
  138. The server management script uses certain environment variables to support
  139. the placement of product binaries and shared resources in read-only file
  140. systems.
  141. The ${wlp.install.dir} shown in Section IV has an inferred location; the
  142. installation directory is always set to the parent of the directory containing
  143. the launch script.
  144. The WLP_USER_DIR environment variable can be used to specify an alternate
  145. location for ${wlp.user.dir}. If this is specified, the runtime will look for
  146. shared resources and server definitions in the specified directory.
  147. ${server.config.dir} is equivalent to ${wlp.user.dir}/servers/serverName.
  148. The WLP_OUTPUT_DIR environment variable can be used to specify an alternate
  149. location for server generated output (logs, the server's workarea, generated
  150. files, etc). If this environment variable is specified, ${server.output.dir}
  151. is set to the equivalent of WLP_OUTPUT_DIR/serverName. If not,
  152. ${server.output.dir} is the same as ${server.config.dir}.
  153. 1. Specifying environment variables with server.env
  154. Use server.env files at the install and server levels to specify environment
  155. variables such as JAVA_HOME, WLP_USER_DIR, and WLP_OUTPUT_DIR. These files
  156. support only KEY=value pairs. Key values should not contain any white space
  157. characters. All characters in the value are considered to be literal, including
  158. back-slashes and leading and trailing white space. Shell and variable expansion
  159. are not supported.
  160. The server management script will search for server.env files in a few locations:
  161. ${wlp.install.dir}/etc/, ${wlp.user.dir}/shared/ and ${server.config.dir}/.
  162. All these files are read in the order specified above. If the same property
  163. is specified in multiple files then values in later files will take precedence.
  164. It should be noted that WLP_USER_DIR is special in that it can only be specified
  165. in the etc/server.env since it dictates the locations of the other server.env files.
  166. 2. Customizing JVM options
  167. Use jvm.options files at the runtime and server levels to specify additional
  168. server startup options, for example, -X arguments. The options will be applied
  169. when the start, run, and debug actions are invoked through the server management
  170. script. Be sure to specify only one option per line.
  171. The server management script will search for jvm.options files in multiple locations.
  172. It will look for jvm.options in: ${wlp.usr.dir}/shared/,
  173. ${server.config.dir}/configDropins/defaults, ${server.config.dir}/,
  174. ${server.config.dir}/configDropins/overrides/ it will read all these files and
  175. then append the options in order. If none of those files exist then the
  176. ${wlp.install.dir}/etc/jvm.options will be used.
  177. 3. Bootstrap properties
  178. Bootstrap properties affect the configuration and initialization of the
  179. server's OSGi framework and platform core. These properties can be specified
  180. through system properties or in a bootstrap.properties file located in the
  181. server directory.
  182. Note: Variables in bootstrap.properties are not exported as system properties;
  183. however, the variables are available for use in server.xml.