Installing StreamBase on Linux

Before You Install

Before you install StreamBase, use this checklist to make sure each target node matches the prerequisites:

  • The target node's resources (CPU, RAM, disk capacity) must meet or exceed the minimum values described on the Supported Configurations page.

  • If you plan to install the StreamBase kit into a directory that requires root access, such as /opt or /usr/local, you must have access to the root account on the target node. (You can install StreamBase into another area, such as a home directory, and will not need root access.)

  • The target node must be running a supported Linux release with the latest updates, as listed in Supported Configurations.

  • To run StreamBase applications, you must have a Sun JDK installed. StreamBase kits for all platforms include the runtime components of a JDK for private use by StreamBase Studio and StreamBase Server. To use an external JDK instead, follow the steps in Using an External JDK.

  • If your StreamBase applications will access external database tables via the StreamBase Adapter for JDBC, you must have installed, or have network access to, a database product as listed in Supported Configurations.

Important

StreamBase Systems does not support the use of multiple StreamBase releases on the same machine. The rpm -Uvh command shown in these instructions automatically performs an upgrade from any previous version of StreamBase to the current release. That is, any previous release in your installation directory (by default, /opt/streambase) is replaced by the new installation. However, if you elect to install StreamBase from the streambase-*.tar.gz file, you must first uninstall the existing StreamBase version, as described in Uninstalling StreamBase on Linux.

Back Up Existing StreamBase Workspaces and Configuration

If you used previous releases of StreamBase on the target machine, create backup copies of your existing StreamBase workspace and configuration directories, before using StreamBase Studio in the current release. Your StreamBase workspace and configuration directories include your projects, which in turn contain your EventFlow applications and associated files for each project. When you create the backup file, have its filename indicate the StreamBase release number (such as 3.5.7) those projects used; for example, mySBWorkspace_3-5-7.tar.

The 3.x workspace and configuration directories are in the following default locations:

~/streambase-workspace/ 
~/.streambase/sbstudio-configuration/

The 5.x and 6.x workspace and configuration directories are in the following default locations:

~/streambase-studio-n.m-workspace
~/.streambase/streambase-studio-n.m-configuration

Installing from the RPMs or the Single Tarball

The StreamBase kit for Linux is packaged in two ways:

  • As a set of Red Hat Package Manager (RPM) files., which can be installed with a command such as:

    rpm -Uvh streambase-*.rpm
    
  • Or as a single tarball, which can be installed with a command such as:

    tar -xzf streambase-*.tar.gz
    
  1. Log into the root account if you plan to install StreamBase into a privileged area such as /opt or /usr/local.

  2. Insert the StreamBase product CD or download the kit. For CD installations, if automount is not enabled, mount the CD. For example:

    mount /mnt/cdrom
    

    On the product CD and in the FTP download site's directories, the kit's RPM files are in the ./rpms directory. The kit's single *.tar.gz file is in the ./tarfiles directory.

    Download Kit Options. Instead of the product CD, you may have downloaded the StreamBase kit from an FTP URL given to you by a StreamBase Systems representative. Or you may have downloaded the StreamBase Developer Edition kit from the Developer Zone. Note that on the DevZone, the download file for Linux users is a self-extracting .bin file that contains the StreamBase installation tarfile. Please remember the location of the downloaded files.

Installing StreamBase from the RPMs

StreamBase is packaged in multiple RPMs. In the following list, RRR refers to the release number, DDD refers to a date string that reflects the date and time when the installation CD was built, and PPPP refers to the processor type (such as i586 or x86_64).

streambase-client-RRR-DDD.PPPP.rpm

Installs the StreamBase client utilities (sbc, sbfeedsim, and so on).

streambase-studio-RRR-DDD.PPPP.rpm

Installs StreamBase Studio.

streambase-server-RRR-DDD.PPPP.rpm

Installs StreamBase Server.

streambase-devel-RRR-DDD.PPPP.rpm

Installs tools and APIs that let you write clients and custom functions.

streambase-docs-RRR-DDD.PPPP.rpm

Installs the StreamBase documentation. (The installation CD contains a copy of the documentation in the doc directory, so that you can read the StreamBase Release Notes, the Supported Configurations topic, and Installation Guide before starting the installation.)

The streambase-server and streambase-devel packages require the streambase-client to be installed. Other than these requirements, you can install any combination of RPMs.

To install the StreamBase RPMs, use the rpm -Uvh filename.rpm command. For example:

cd /mnt/cdrom/rpms/streambase 
rpm -Uvh streambase-*.rpm

By default, the RPMs install the StreamBase software into /opt/streambase. To change the installation directory, use the relocate option.

For example:

rpm -Uvh --relocate /opt/streambase=/usr/local/streambase streambase-*.rpm

Note

If you use the relocate option, make sure that the new installed directory's bin subdirectory is in your PATH.

As with most RPMs, certain applications and libraries are also installed into /usr/bin, /usr/lib, and /usr/share/man.

Installing StreamBase from the Single Tarfile

Note

If you downloaded the StreamBase for Linux kit from the Developer Zone, the following step assumes that you have already run the StreamBase bin script to extract the installation tar file.

To install StreamBase from the single tar file, enter commands like the following. This example assumes that a downloaded StreamBase kit temporarily resides in a /home/sbuser/kits directory. If you are using the product CD, instead specify the mounted CD's path plus the streambase-*.tar.gz filename.

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

Or if you want to install the files in a non-privileged area, such as one of your /home directories, enter commands like the following. In this example, we are installing from the kit on the mounted product CD:

mkdir /home/sbuser/streambase
cd /home/sbuser/streambase
tar -xzf /mnt/cdrom/tarfiles/streambase-*.tar.gz

Important

After installing StreamBase from the tar file, run the following command, to set up the environment:

eval `streambase-install-dir/bin/sb-config --env`

This command sets the STREAMBASE_HOME environment variable and modifies the PATH, LD_LIBRARY_PATH, and MANPATH environment variables, for the current shell. Note the use of the backquote character ( ` ) in the preceding example; it is not a single quote character.

Installing StreamBase Server RPMs Only

To install only the StreamBase Server RPM and its dependencies, use commands like the following to install the minimum set of RPMs.

cd /mnt/cdrom/rpms/streambase 
rpm -Uvh streambase-server-*.rpm streambase-client-*.rpm

To develop StreamBase clients or custom functions on the production machine, install the streambase-devel and streambase-docs RPMs (only excluding the streambase-studio RPM). For example:

cd /mnt/cdrom/rpms/streambase
rpm -Uvh streambase-server-*.rpm streambase-client-*.rpm 
streambase-devel-*.rpm streambase-docs-*.rpm

Post-Installation: Licensing

Configure the StreamBase license as described in the Configuring a StreamBase License topic.

Initial Configuration on a Single Machine

To support StreamBase Studio users on Windows or Linux client machines connecting to the remote Linux machine where StreamBase Server is installed, your Linux host must have an SSH daemon running with TCP port forwarding enabled, and password authentication enabled. To enable TCP port forwarding, ensure that your /etc/ssh/sshd_config file does not contain the following lines:

AllowTcpForwarding No
PasswordAuthentication No

If you update the sshd_config, remember to restart your SSH daemon before the StreamBase Studio users start their sessions.

Note

Remote users who connect from StreamBase Studio to your host must also have valid UNIX accounts on the machine where you install StreamBase Server. Remote users connecting StreamBase Studio from their Windows or Linux machine must provide valid username and password credentials to connect to your server.

Scripts and Configuration Files Installed

The following scripts and files were installed as part of the streambase-server RPM:

  • Initialization scripts in the /etc/init.d directory:

    streambase
    
  • Configuration files in streambase_install_dir/etc:

    sbd.sbconf
    

The StreamBase scripts in /etc/init.d point to the configuration files, as follows:

This start script... Points to this configuration file...
/etc/init.d/streambase streambase_install_dir/etc/sbd.sbconf
streambase_install_dir is the StreamBase installation directory (/opt/streambase by default).

Enter the following command if you want the StreamBase Server to run when the Linux system boots:

chkconfig --add streambase

You can also run the streambase script at any time to start StreamBase, without having to reboot.

By default, StreamBase uses skeleton configuration files. To customize the configuration files for use with one of your applications, use the -s flag as shown in the next set of example, and pipe the output to a file. For example:

sbd -s > ~/myapps/sbd.sbconf

For details about the StreamBase configuration file, see StreamBase Server Configuration XML.

Later in the development cycle, when you are ready to deploy the application to a staging server, the recommended location for the .sbapp application file is:

streambase_install_dir/var/applications

For example, /opt/streambase/var/applications

Web Browser Requirement

On Linux, the StreamBase Studio Welcome page and Help require that a browser such as Firefox is installed and can be located. 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-2.0.0.14

Uninstalling StreamBase on Linux

Before uninstalling, keep a version-specific backup copy of your StreamBase Studio workspace. When you move from one StreamBase release to the next release, StreamBase Studio may automatically upgrade the XML representation of your applications. If you develop applications and then decide to downgrade to a previously used release, the older StreamBase Studio may not recognize some of the settings. If you must use an older StreamBase release, you may need to delete the existing Studio workspace and configuration directories, and either start over with new projects in StreamBase Studio, or restore your matching version-specific backup copies.

To uninstall StreamBase on Linux, follow these steps:

  1. Log into the root account, if you installed the product in an area that requires root access, such as /opt/streambase.

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

    ps -A | grep sbd
    

    If the 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.

  3. Enter these commands to remove the StreamBase packages:

    rpm -e streambase-client streambase-studio streambase-server streambase-devel streambase-docs
    
  4. Delete any StreamBase startup configuration, if you previously added it:

    chkconfig --del streambase