Installing StreamBase on Linux

Before You Install

This page describes the installation of the TIBCO StreamBase® base kit on Linux platforms. The base kit for Linux includes the StreamBase Studio authoring environment, StreamBase Server, support files for the StreamBase Client API, TIBCO LiveView Server, and the LiveView extensions for StreamBase Studio.

Before you install TIBCO StreamBase, use the following checklist to make sure each target machine matches the prerequisites.

    Read through the New and Noteworthy page for the current release to look for any late-breaking information about installing StreamBase on Linux.
    You may need to uninstall an existing StreamBase installation before proceeding. You must do this if you are installing a service pack (n.m.x, where x changes) for an existing StreamBase installation. See Uninstalling StreamBase on Linux. Uninstalling does not remove your workspace or its contents.
    Confirm that the target machine is running a supported Linux distribution with the latest updates. See Supported Configurations.
    Confirm that the target machine's RAM and disk space requirements meet or exceed the minimums listed on Supported Configurations.
    Confirm that you have root access on the target machine if you plan to install StreamBase in the default location, /opt/tibco/sb-cep/n.m, or in another location that requires root access.
   

Important! The StreamBase installer cannot finish installing if this library is not found.

On newer Linux distributions, install the Linux package that provides GCC 3.3 compatibility to support a Reuters library included with StreamBase. For example, install compat-libstdc++-33.

   

Confirm that the target machine has a Mozilla-compatible web browser such as Firefox. On Linux, StreamBase Studio's Welcome page and Studio Help require a browser such as Firefox to be installed and locatable on the PATH. If you removed Mozilla or Firefox, or installed it in a non-standard location, the Welcome page or Help may not appear.

A workaround is available: set the environment variable MOZILLA_FIVE_HOME to the path of your Mozilla or Firefox installation, like this example:

MOZILLA_FIVE_HOME=/usr/lib/firefox
   

If you plan to use a supported external JDK, follow the steps in Using an External JDK. Remember that StreamBase is not supported for running with gcj, icedtea, or OpenJDK.

(StreamBase installation kits for all platforms include the runtime components of an Oracle JDK for private use by StreamBase Studio and StreamBase Server. You only need to configure an external JDK in rare cases.)

Installation Options for Linux

The Linux installer for StreamBase is provided in two forms:

  • A set of RPM installation files (rpm-bin) wrapped in a shell script.

  • A tar.gz archive file (archive-bin) wrapped in a shell script.

In both cases, you run the wrapper shell script, which selects a destination folder, displays license information, and then installs the component files. The RPM installer also runs a few configuration steps after installing its files. The archive installer only installs files.

The Linux distributions supported by TIBCO supports RPM installers. TIBCO Software strongly recommends using the RPM installer.

Continue with the instructions in one of the following sections:

Installing with the RPM Installer

As downloaded from the TIBCO distribution site, the StreamBase RPM installer is delivered in a single file named with the following pattern:

  • TIB_sb-cep_version_linux_x86_64.rpm-bin

where version represents the release number in major.minor.servicepack format. The installer file includes StreamBase Studio, StreamBase Server, client utilities, tools and APIs, and documentation.

Install the RPM version of the StreamBase base kit installer with these steps (substituting the actual version number, such as 7.5.0, for version):

  1. Log in as root, or prefix the installer script command with sudo.

  2. If you copied the installer file from another location, it may have lost its executable permission in the copy. Restore executability with a command like the following:

    chmod +x TIB_sb-cep_version_linux_x86_64.rpm-bin
  3. Run the installer wrapper script with:

    ./TIB_sb-cep_version_linux_x86_64.rpm-bin

    Installing with RPMs stops the StreamBase service, if it is currently running. If you start the server from an /etc/init.d script, you must restart it after the installation completes.

  4. The wrapper script prompts for the path to an installation directory. For a standard installation, press Enter to accept the default, /opt/tibco/sb-cep/n.m.

    If you install into a custom installation directory, the installation will not be complete; links in /usr/bin must be removed and corrected by following the procedure in Making Symbolic Links for StreamBase Commands.

    If the script detects an existing RPM installation in the target directory, it displays a notice that it will upgrade the existing installation. If the script detects an existing Archive installation, it halts the installation and prompts you to remove the existing installation first. (In this case, be sure to preserve the TIBCO StreamBase license file in the etc directory.)

  5. The wrapper script displays the text of the TIBCO StreamBase license. Press Space to page through the license text.

  6. The script prompts Do you accept this license agreement? Type yes and press Enter.

  7. The RPM installer then extracts and installs the installation files.

  8. When done, the script prompts: Installation complete.

Partial RPM Installation

The StreamBase RPM installer contains five RPM installers bundled into one installer. The five component RPMs are the following:

  • streambase-client-*.rpm — installs the client utilities such as sbc, sbfeedsim, and others.

  • streambase-devel-*.rpm — installs tools and APIs that let you write StreamBase extensions.

  • streambase-docs-*.rpm — installs the documentation.

  • streambase-server-*.rpm — installs StreamBase Server.

  • streambase-studio-*.rpm — installs StreamBase Studio.

There may be occasions when you only need to install a portion of the full set. The streambase-server and streambase-devel packages each require the streambase-client package to be installed. Other than these requirements, you can install any combination of RPMs.

For example, to install only StreamBase Server without Studio, you only need to install the streambase-server and streambase-client RPMs. To do this, first extract the RPMs from the streambase-rpms-*.bin installer with a the following steps:

  1. Log in as root (or run the following commands with sudo).

  2. If you copied the installer file from another location, it may have lost its executable permission. Restore executability with a command like the following:

    chmod +x TIB_sb-cep_version_linux_x86_64.rpm-bin
  3. Run the installer wrapper script with the unpack argument:

    ./TIB_sb-cep_version_linux_x86_64.rpm-bin unpack
  4. The wrapper script prompts for the path to an installation directory and suggests the current directory by default. Accept the suggestion or specify a relative path to a temporary directory.

  5. The wrapper script displays the text of the StreamBase license. Press Space to page through the license text.

  6. The script prompts Do you accept this license agreement? Type yes and press Enter.

  7. The archive installer then extracts the installation files to the specified temporary directory.

  8. When done, the script prompts: Installation complete.

Next, use an rpm command to install the packages of interest. For example:

rpm -Uvh streambase-server-*.rpm
rpm -Uvh streambase-client-*.rpm

Installing with the Archive Installer

The StreamBase archive installer is delivered in a single file named with the following pattern:

  • TIB_sb-cep_version_linux_x86_64.archive-bin

where version is the release number.

Install the archive version of the StreamBase base kit installer with the following steps:

  1. If you intend to install to the default location in /opt, log in as root, or prefix the installer commands below with sudo.

  2. If you copied the installer file from another location, it may have lost its executable permission in the copy. Restore executability with a command like the following:

    chmod +x ./TIB_sb-cep_7.7.2_linux_x86_64.archive-bin
  3. You can install a new major (n) or minor (n.m) release of StreamBase alongside of an existing installation, in a separate directory that does not already contain a StreamBase installation. Be aware that you can only install multiple versions by using archive installers, and that you cannot install more than one service pack (n.m.x) release for a given minor (n.m) release.

  4. Run the installer wrapper script with a command like the following:

    ./TIB_sb-cep_7.7.2_linux_x86_64.archive-bin
  5. The script checks for a compatible platform and architecture, and warns if you are installing the wrong version for the current platform.

  6. The wrapper script prompts for the path to an installation directory. For a standard installation, press Enter to accept the default, /opt/tibco/sb-cep/n.m.

    If the script detects an existing installation in the target directory, it halts the installation and prompts you to remove the existing installation first. (In this case, be sure to preserve the StreamBase license file in the etc directory.)

    If you do not have root rights on a shared development machine, you can install for evaluation and testing purposes in a home directory subfolder. In this case, specify the full, absolute path to the alternate directory. The installer script does not recognize environment variable expansion or the tilde (~) shortcut. Specify a full path such as the following:

    /home/sbuser/apps/streambase
  7. The wrapper script displays the text of the StreamBase license. Press Space to page through the license text.

  8. The script prompts Do you accept this license agreement? Type yes and press Enter.

  9. The archive installer then extracts and installs the installation files.

  10. When done, the script prompts: Installation complete.

Partial Archive Installation

The archive installation file contains a number of tar.gz files, one for the base StreamBase installation and others for LiveView components and additional adapters. You can unpack the archive installation file into its component tar.gz files by appending the unpack argument when running the installer script:

  1. Log in as root, or prefix the installer script command with sudo.

  2. If you copied the installer file from another location, it may have lost its executable permission in the copy. Restore executability with a command like the following:

    chmod +x ./TIB_sb-cep_7.7.2_linux_x86_64.archive-bin
  3. Run the installer wrapper script with the unpack argument:

    ./TIB_sb-cep_7.7.2_linux_x86_64.archive-bin unpack
  4. The wrapper script prompts for the path to an installation directory and suggests the current directory by default. Accept the suggestion or specify a relative path to a temporary directory.

  5. The wrapper script displays the text of the StreamBase license. Press Space to page through the license text.

  6. The script prompts Do you accept this license agreement? Type yes and press Enter.

  7. The archive installer then extracts the installation tar.gz files to the specified directory.

  8. When done, the script prompts: Installation complete.

The contents of each tar.gz file is a directory structure rooted at the relative directory streambase. This lets you un-tar the tar.gz files to any location you choose.

Installing Additional Features

Additional adapters may have their own separate installer files, which are provided in either .rpm-bin or .archive-bin formats.

Note

You must use the same installer type for adapters as you used for the base kit. That is, if you installed the base kit with the RPM installer, you must install adapters with the RPM installer, and likewise for the .archive.bin installers.

StreamBase framework installers look for a matching StreamBase base release, and only allow installation of the framework into that base release's directory. By contrast, an external adapter can be installed on a machine that does not have StreamBase installed on it, so the choice of location directory is more flexible.

As download from the TIBCO distribution site, the installers are delivered in a single file named with the following pattern:

  • TIB_productid_major.minor.servicepack_linux_x86_64.archive-bin — Archive (Tarball) installer in a shell wrapper

  • TIB_productid_major.minor.servicepack_linux_x86_64.rpm-bin — RPM-based installer in a shell wrapper

where productid identifies the adapter or framework, major, minor and servicepack identify the specific release.

After completing the installation of StreamBase on Linux, next install any external adapter or framework for which you have a license, using its separate installer.

RPM Installer. After the StreamBase base kit is installed, you can install an external adapter or LiveView component with its RPM installer, using a command like the following examples, run as root:

rpm -Uvh TIB_sb-ad-flume_7.7.2_linux_x86_64.rpm-bin
rpm -Uvh TIB_sb-lvdt_2.4.0_linux_x86_64.rpm-bin

Archive Installer. To install external adapters from their archive installers into a standard StreamBase installation in /opt/tibco/sb-cep/n.m, follow this example, run as root. This example presumes you placed the downloaded installer files in /home/sbuser/kits:

cd /opt
tar -xzf /home/sbuser/kits/streambase-*.tar.gz

Post-Installation Configuration

The following sections describe both mandatory and optional configuration steps that you must perform after running the StreamBase installer.

Installing a License File

Before running StreamBase Server from the command line or from within StreamBase Studio, you must install a license file, as described in Configuring a StreamBase License.

Post-Installation Shell Configuration

For all users who will run or develop with StreamBase or Live Datamart on this machine, you must configure their shell initialization files such as .bash_profile. Follow the instructions in the Linux section of the Configure Shells for StreamBase page.

Making Symbolic Links for StreamBase Commands

If you installed with the RPM installation method into a standard directory, the installer already created symbolic links in /usr/bin for the following sets of files:

  • /opt/tibco/sb-cep/n.m/bin/jsb*

  • /opt/tibco/sb-cep/n.m/bin/sb*

  • /opt/tibco/sb-cep/n.m/bin/sb*.ini

The RPM installer created links in /usr/lib for the following files:

  • /opt/tibco/sb-cep/n.m/lib/*.jar

  • /opt/tibco/sb-cep/n.m/lib/libsb*

    or

    /opt/tibco/sb-cep/n.m/lib64/libsb*

If you installed with the RPM installation method into a custom directory, the symbolic links are incorrect and must be removed and recreated using the path in the example, above.

If you installed with the archive installer, you can create the same links manually. These links are not strictly required to run StreamBase Server locally on this machine. However, these links are required to enable remote debugging on this machine so that StreamBase Server can be started remotely by running /usr/bin/sbd.

Create these links by running commands like the following as root or with sudo:

sudo ln -s /opt/tibco/sb-cep/n.m/bin/sb*      /usr/bin/
sudo ln -s /opt/tibco/sb-cep/n.m/bin/jsb*     /usr/bin/
sudo ln -s /opt/tibco/sb-cep/n.m/lib/*.jar    /usr/lib/
sudo ln -s /opt/tibco/sb-cep/n.m/lib64/libsb* /usr/lib/

Setting Up for Remote Studio Access

StreamBase Studio users on remote Windows or Linux client machines can connect to, start, and run StreamBase Server on the Linux machine where you installed StreamBase. For this to work, there are three requirements and one configuration option, as described in Configuring UNIX Servers for Remote Studio Access.

Setting Up for Automatic Server Start

The installer installs configuration files that allow StreamBase Server to automatically start when the host machine boots, but leaves these files disabled. After installation, StreamBase Server is configured only to start on demand, or to start from remote Studio users.

Once you have a working StreamBase application ready to deploy, you can edit these configuration files to configure your UNIX host to automatically start StreamBase Server when the host starts. Follow these steps:

  1. Create and edit a Server configuration file and place it in /opt/tibco/sb-cep/n.m/etc/ with the name sbd.sbconf.

    1. Create a default configuration file with the following command, run as root or with sudo:

      sbd -s > /opt/tibco/sb-cep/n.m/etc/sbd.sbconf
    2. Edit this file, using StreamBase Server Configuration File XML Reference as a guideline. At a minimum, you must specify the full path to the EventFlow or StreamSQL application file you want to run when the host boots. You can also specify the full path to directories containing modules, and the path to locate resource files such as CSV input files.

  2. If you used the RPM installation method, skip to the next step (the RPM installer already performed this step for you). If you used the archive installation method, run a command like the following as root or with sudo to copy the server startup script to /etc/init.d:

    cp -p /opt/tibco/sb-cep/n.m/etc/init.d/streambase /etc/init.d/
  3. Run the following command to enable the streambase startup script:

    chkconfig --add streambase

The streambase startup script makes the following assumptions:

  • The server's executable is found at /usr/bin/sbd (and that, therefore, a symbolic link was made from /opt/tibco/sb-cep/n.m/bin/sbd to /usr/bin/sbd).

  • The server's configuration file is in /opt/tibco/sb-cep/n.m/etc/sbd.sbconf.

  • The configuration file defines the application to be run.

  • The server will run on port 10000.

  • The server will be started with its –b (background) option, which means that the server's log messages are by default redirected to syslog. You can configure logging for background mode as described in Server Background Mode and Logging.

To establish different defaults, edit the /etc/init.d/streambase script .

Uninstalling StreamBase on Linux

To uninstall StreamBase on Linux, follow these steps:

  1. Before uninstalling, prepare and save a version-specific backup copy of your current StreamBase Studio workspace.

  2. Log in as root (if you installed the product in an area that requires root access, such as /opt/tibco/sb-cep/n.m), or run the following commands with sudo.

  3. Confirm that StreamBase Server (sbd) is not running on this machine:

    ps -A | grep sbd

    If StreamBase Server is running, confirm that the server can be shut down without disrupting StreamBase users or applications. At the appropriate time, enter the sbadmin shutdown command.

  4. If you are uninstalling in order to install a newer release, copy and preserve your StreamBase license file with a command like the following:

    cp /opt/tibco/sb-cep/n.m/etc/streambase-license.xml /home/sbuser/importantfiles/
  5. Remove the StreamBase packages or remove the installation directory, depending on the installation method you used on the target machine.

    If you installed using the archive installer, the only step is to remove the installation directory.

    rm -rf /opt/tibco/sb-cep/n.m

    If you installed using the RPM installer, use the following instructions to uninstall:

    1. Use a command like the following to determine the StreamBase packages currently installed:

      rpm -q -a | grep streambase
    2. If you installed external adapters, remove those packages first, using commands like the following examples:

      rpm -e streambase-flume-adapter
    3. Enter a command like the following to remove the StreamBase packages. You only need to specify the first portion of the name, up to the version string. (The command is shown broken onto several lines for clarity. Enter the command as a single unbroken line):

      rpm -e streambase-client \ 
             streambase-studio streambase-server \
             streambase-devel streambase-docs

      If you prefer to uninstall each package separately, then remove streambase-client last, because the other packages depend on its presence.

  6. If you installed with the RPM method, or if you manually established the symbolic links in /usr/bin and /usr/lib as described in Making Symbolic Links, remove those symbolic links now. (If you are uninstalling only in order to reinstall a newer release, you can skip this step.)

  7. Delete any StreamBase startup configuration, if you previously added it:

    chkconfig --del streambase

Downgrading StreamBase Versions

When you upgrade from one StreamBase release to a newer release, on first run, StreamBase Studio may automatically and silently upgrade the XML representation of your application files.

If you need to downgrade back to a previously used StreamBase release (such as to add a feature to an existing application), the older StreamBase Studio may not recognize some of the changes made to your applications by the newer Studio.

Thus, if you find you need to return to an older StreamBase release, specify a separate workspace when you first start the older release's Studio. Then, either start over with new projects in StreamBase Studio, or restore your matching version-specific backup copies to the separate workspace.