Updated on 2022-08-16 GMT+08:00

Packaging Services on a Linux OS

Scenario

Storm supports packaging in a Linux environment. You can upload JAR packages exported from IntelliJ IDEA and other related JAR packages to a Linux environment and perform packaging.

Prerequisites

  • You have installed the Storm client.
  • Packaging IntelliJ IDEA Code is complete.
  • When the host where the Linux OS runs is not a node of the cluster, you are required to set the mapping between the host name and IP address in the hosts file of the node where the Linux OS runs. The host name must be correctly mapped to the IP address.

Procedure

  1. Copy the JAR package exported from IntelliJ IDEA to a specified directory on the Linux client(for example, /opt/jarsource) .
  2. If the service needs to access external components, obtain the configuration files and place them in the directory specified in 1 For details about the dependency configuration files, see related development guidelines.
  3. If the service needs to access external components, obtain the JAR packages and place them in the directory specified in 1 For details about the dependency JAR packages, see the related development guidelines.
  4. Run the packaging command in the Storm client installation directory Storm/storm-1.2.1/bin to package the preceding JAR packages into a complete service JAR package and place the package in the /opt/jartarget directory (which can be any empty directory). After the sh storm-jartool.sh /opt/jarsource/ /opt/jartarget command is executed, source.jar is generated in the /opt/jartarget directory.